Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wyykak
ygopro
Commits
b57d9402
Commit
b57d9402
authored
Jun 23, 2019
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary retry paramter
parent
96e26ba2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
gframe/duelclient.cpp
gframe/duelclient.cpp
+4
-4
gframe/duelclient.h
gframe/duelclient.h
+1
-1
No files found.
gframe/duelclient.cpp
View file @
b57d9402
...
@@ -862,11 +862,11 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -862,11 +862,11 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
}
}
}
}
}
}
int
DuelClient
::
ClientAnalyze
(
char
*
msg
,
unsigned
int
len
,
bool
retry
)
{
int
DuelClient
::
ClientAnalyze
(
char
*
msg
,
unsigned
int
len
)
{
char
*
pbuf
=
msg
;
char
*
pbuf
=
msg
;
wchar_t
textBuffer
[
256
];
wchar_t
textBuffer
[
256
];
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
if
(
mainGame
->
dInfo
.
curMsg
!=
MSG_RETRY
&&
!
retry
)
{
if
(
mainGame
->
dInfo
.
curMsg
!=
MSG_RETRY
)
{
memcpy
(
last_successful_msg
,
msg
,
len
);
memcpy
(
last_successful_msg
,
msg
,
len
);
last_successful_msg_length
=
len
;
last_successful_msg_length
=
len
;
}
}
...
@@ -891,7 +891,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
...
@@ -891,7 +891,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
mainGame
->
dInfo
.
time_player
=
2
;
mainGame
->
dInfo
.
time_player
=
2
;
switch
(
mainGame
->
dInfo
.
curMsg
)
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_RETRY
:
{
case
MSG_RETRY
:
{
if
(
!
retry
&&
last_successful_msg_length
)
{
if
(
last_successful_msg_length
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
stMessage
->
setText
(
dataManager
.
GetDesc
(
1422
));
mainGame
->
stMessage
->
setText
(
dataManager
.
GetDesc
(
1422
));
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
...
@@ -899,7 +899,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
...
@@ -899,7 +899,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len, bool retry) {
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
actionSignal
.
Wait
();
select_hint
=
last_select_hint
;
select_hint
=
last_select_hint
;
ClientAnalyze
(
last_successful_msg
,
last_successful_msg_length
,
true
);
ClientAnalyze
(
last_successful_msg
,
last_successful_msg_length
);
break
;
break
;
}
}
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
...
...
gframe/duelclient.h
View file @
b57d9402
...
@@ -44,7 +44,7 @@ public:
...
@@ -44,7 +44,7 @@ public:
static
void
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
);
static
void
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
);
static
int
ClientThread
(
void
*
param
);
static
int
ClientThread
(
void
*
param
);
static
void
HandleSTOCPacketLan
(
char
*
data
,
unsigned
int
len
);
static
void
HandleSTOCPacketLan
(
char
*
data
,
unsigned
int
len
);
static
int
ClientAnalyze
(
char
*
msg
,
unsigned
int
len
,
bool
retry
=
false
);
static
int
ClientAnalyze
(
char
*
msg
,
unsigned
int
len
);
static
void
SetResponseI
(
int
respI
);
static
void
SetResponseI
(
int
respI
);
static
void
SetResponseB
(
void
*
respB
,
unsigned
char
len
);
static
void
SetResponseB
(
void
*
respB
,
unsigned
char
len
);
static
void
SendResponse
();
static
void
SendResponse
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment