Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
9e246d0d
Commit
9e246d0d
authored
Jun 27, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fixed various memory curruption instances (#141)"
This reverts commit
e50e6fea
.
parent
323b0cc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
field.h
field.h
+0
-1
libduel.cpp
libduel.cpp
+6
-6
operations.cpp
operations.cpp
+7
-7
No files found.
field.h
View file @
9e246d0d
...
@@ -227,7 +227,6 @@ struct processor {
...
@@ -227,7 +227,6 @@ struct processor {
card_set
discarded_set
;
card_set
discarded_set
;
card_set
destroy_canceled
;
card_set
destroy_canceled
;
card_set
delayed_enable_set
;
card_set
delayed_enable_set
;
card_set
temp_set
;
effect_set_v
disfield_effects
;
effect_set_v
disfield_effects
;
effect_set_v
extram_effects
;
effect_set_v
extram_effects
;
effect_set_v
extras_effects
;
effect_set_v
extras_effects
;
...
...
libduel.cpp
View file @
9e246d0d
...
@@ -435,9 +435,9 @@ int32 scriptlib::duel_special_summon(lua_State *L) {
...
@@ -435,9 +435,9 @@ int32 scriptlib::duel_special_summon(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
8
)
if
(
lua_gettop
(
L
)
>=
8
)
zone
=
lua_tointeger
(
L
,
8
);
zone
=
lua_tointeger
(
L
,
8
);
if
(
pcard
)
{
if
(
pcard
)
{
pduel
->
game_field
->
core
.
temp_set
.
clear
()
;
field
::
card_set
cset
;
pduel
->
game_field
->
core
.
temp_
set
.
insert
(
pcard
);
c
set
.
insert
(
pcard
);
pduel
->
game_field
->
special_summon
(
&
pduel
->
game_field
->
core
.
temp_
set
,
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
pduel
->
game_field
->
special_summon
(
&
c
set
,
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
}
else
}
else
pduel
->
game_field
->
special_summon
(
&
(
pgroup
->
container
),
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
pduel
->
game_field
->
special_summon
(
&
(
pgroup
->
container
),
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_SPSUMMON_S
;
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_SPSUMMON_S
;
...
@@ -629,9 +629,9 @@ int32 scriptlib::duel_change_form(lua_State *L) {
...
@@ -629,9 +629,9 @@ int32 scriptlib::duel_change_form(lua_State *L) {
if
(
top
>
5
&&
lua_toboolean
(
L
,
6
))
flag
|=
NO_FLIP_EFFECT
;
if
(
top
>
5
&&
lua_toboolean
(
L
,
6
))
flag
|=
NO_FLIP_EFFECT
;
if
(
top
>
6
&&
lua_toboolean
(
L
,
7
))
flag
|=
FLIP_SET_AVAILABLE
;
if
(
top
>
6
&&
lua_toboolean
(
L
,
7
))
flag
|=
FLIP_SET_AVAILABLE
;
if
(
pcard
)
{
if
(
pcard
)
{
pduel
->
game_field
->
core
.
temp_set
.
clear
()
;
field
::
card_set
cset
;
pduel
->
game_field
->
core
.
temp_
set
.
insert
(
pcard
);
c
set
.
insert
(
pcard
);
pduel
->
game_field
->
change_position
(
&
pduel
->
game_field
->
core
.
temp_
set
,
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
au
,
ad
,
du
,
dd
,
flag
,
TRUE
);
pduel
->
game_field
->
change_position
(
&
c
set
,
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
au
,
ad
,
du
,
dd
,
flag
,
TRUE
);
}
else
}
else
pduel
->
game_field
->
change_position
(
&
(
pgroup
->
container
),
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
au
,
ad
,
du
,
dd
,
flag
,
TRUE
);
pduel
->
game_field
->
change_position
(
&
(
pgroup
->
container
),
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
au
,
ad
,
du
,
dd
,
flag
,
TRUE
);
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_CHANGEPOS_S
;
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_CHANGEPOS_S
;
...
...
operations.cpp
View file @
9e246d0d
...
@@ -1425,7 +1425,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
...
@@ -1425,7 +1425,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
cset
.
insert
(
equip_card
);
cset
.
insert
(
equip_card
);
raise_single_event
(
target
,
&
cset
,
EVENT_EQUIP
,
core
.
reason_effect
,
0
,
core
.
reason_player
,
PLAYER_NONE
,
0
);
raise_single_event
(
target
,
&
cset
,
EVENT_EQUIP
,
core
.
reason_effect
,
0
,
core
.
reason_player
,
PLAYER_NONE
,
0
);
raise_event
(
&
cset
,
EVENT_EQUIP
,
core
.
reason_effect
,
0
,
core
.
reason_player
,
PLAYER_NONE
,
0
);
raise_event
(
&
cset
,
EVENT_EQUIP
,
core
.
reason_effect
,
0
,
core
.
reason_player
,
PLAYER_NONE
,
0
);
core
.
hint_timing
[
target
->
overlay_target
?
target
->
overlay_target
->
current
.
controler
:
target
->
current
.
controler
]
|=
TIMING_EQUIP
;
core
.
hint_timing
[
target
->
current
.
controler
]
|=
TIMING_EQUIP
;
process_single_event
();
process_single_event
();
process_instant_event
();
process_instant_event
();
return
FALSE
;
return
FALSE
;
...
@@ -3235,7 +3235,7 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3235,7 +3235,7 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
continue
;
continue
;
}
}
pcard
->
current
.
reason
|=
REASON_DESTROY
;
pcard
->
current
.
reason
|=
REASON_DESTROY
;
core
.
hint_timing
[
pcard
->
overlay_target
?
pcard
->
overlay_target
->
current
.
controler
:
pcard
->
current
.
controler
]
|=
TIMING_DESTROY
;
core
.
hint_timing
[
pcard
->
current
.
controler
]
|=
TIMING_DESTROY
;
raise_single_event
(
pcard
,
0
,
EVENT_DESTROY
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
raise_single_event
(
pcard
,
0
,
EVENT_DESTROY
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
}
adjust_instant
();
adjust_instant
();
...
@@ -3775,15 +3775,15 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3775,15 +3775,15 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
uint8
dest
=
pcard
->
sendto_param
.
location
;
uint8
dest
=
pcard
->
sendto_param
.
location
;
uint8
seq
=
pcard
->
sendto_param
.
sequence
;
uint8
seq
=
pcard
->
sendto_param
.
sequence
;
if
(
dest
==
LOCATION_GRAVE
)
{
if
(
dest
==
LOCATION_GRAVE
)
{
core
.
hint_timing
[
pcard
->
overlay_target
?
pcard
->
overlay_target
->
current
.
controler
:
pcard
->
current
.
controler
]
|=
TIMING_TOGRAVE
;
core
.
hint_timing
[
pcard
->
current
.
controler
]
|=
TIMING_TOGRAVE
;
}
else
if
(
dest
==
LOCATION_HAND
)
{
}
else
if
(
dest
==
LOCATION_HAND
)
{
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
core
.
hint_timing
[
pcard
->
overlay_target
?
pcard
->
overlay_target
->
current
.
controler
:
pcard
->
current
.
controler
]
|=
TIMING_TOHAND
;
core
.
hint_timing
[
pcard
->
current
.
controler
]
|=
TIMING_TOHAND
;
}
else
if
(
dest
==
LOCATION_DECK
)
{
}
else
if
(
dest
==
LOCATION_DECK
)
{
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
core
.
hint_timing
[
pcard
->
overlay_target
?
pcard
->
overlay_target
->
current
.
controler
:
pcard
->
current
.
controler
]
|=
TIMING_TODECK
;
core
.
hint_timing
[
pcard
->
current
.
controler
]
|=
TIMING_TODECK
;
}
else
if
(
dest
==
LOCATION_REMOVED
)
{
}
else
if
(
dest
==
LOCATION_REMOVED
)
{
core
.
hint_timing
[
pcard
->
overlay_target
?
pcard
->
overlay_target
->
current
.
controler
:
pcard
->
current
.
controler
]
|=
TIMING_REMOVE
;
core
.
hint_timing
[
pcard
->
current
.
controler
]
|=
TIMING_REMOVE
;
}
}
//call move_card()
//call move_card()
if
(
pcard
->
current
.
controler
!=
playerid
||
pcard
->
current
.
location
!=
dest
)
{
if
(
pcard
->
current
.
controler
!=
playerid
||
pcard
->
current
.
location
!=
dest
)
{
...
@@ -3800,7 +3800,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3800,7 +3800,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
}
}
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
param
->
show_decktop
[
pcard
->
overlay_target
?
pcard
->
overlay_target
->
current
.
controler
:
pcard
->
current
.
controler
]
=
true
;
param
->
show_decktop
[
pcard
->
current
.
controler
]
=
true
;
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
...
...
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