mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-18 23:10:26 +00:00
fixed race reset
This commit is contained in:
parent
952b99856d
commit
3b816f46fc
@ -677,6 +677,7 @@ EX void reset_race() {
|
|||||||
for(int i=0; i<multi::players; i++) {
|
for(int i=0; i<multi::players; i++) {
|
||||||
auto who = shmup::pc[i];
|
auto who = shmup::pc[i];
|
||||||
if(!who) { println(hlog, "who missing"); continue; }
|
if(!who) { println(hlog, "who missing"); continue; }
|
||||||
|
who->reset();
|
||||||
// this is intentionally not hrand
|
// this is intentionally not hrand
|
||||||
|
|
||||||
for(int j=0; j<100; j++) {
|
for(int j=0; j<100; j++) {
|
||||||
|
15
shmup.cpp
15
shmup.cpp
@ -64,11 +64,18 @@ struct monster {
|
|||||||
int split_owner; ///< in splitscreen mode, which player handles this
|
int split_owner; ///< in splitscreen mode, which player handles this
|
||||||
int split_tick; ///< in which tick was split_owner computed
|
int split_tick; ///< in which tick was split_owner computed
|
||||||
|
|
||||||
|
void reset() {
|
||||||
|
nextshot = 0;
|
||||||
|
stunoff = 0; blowoff = 0; fragoff = 0; footphase = 0;
|
||||||
|
inertia = Hypc; ori = Id; vel = 0;
|
||||||
|
swordangle = 0;
|
||||||
|
}
|
||||||
|
|
||||||
monster() {
|
monster() {
|
||||||
dead = false; inBoat = false; parent = NULL; nextshot = 0;
|
reset();
|
||||||
stunoff = 0; blowoff = 0; fragoff = 0; footphase = 0; no_targetting = false;
|
refs = 1; split_tick = -1; split_owner = -1;
|
||||||
swordangle = 0; inertia = Hypc; ori = Id; refs = 1;
|
no_targetting = false;
|
||||||
split_tick = -1; split_owner = -1;
|
dead = false; inBoat = false; parent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
eMonster get_parenttype() { return parent ? parent->type : moNone; }
|
eMonster get_parenttype() { return parent ? parent->type : moNone; }
|
||||||
|
Loading…
Reference in New Issue
Block a user