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++) {
|
||||
auto who = shmup::pc[i];
|
||||
if(!who) { println(hlog, "who missing"); continue; }
|
||||
who->reset();
|
||||
// this is intentionally not hrand
|
||||
|
||||
for(int j=0; j<100; j++) {
|
||||
|
19
shmup.cpp
19
shmup.cpp
@ -64,13 +64,20 @@ struct monster {
|
||||
int split_owner; ///< in splitscreen mode, which player handles this
|
||||
int split_tick; ///< in which tick was split_owner computed
|
||||
|
||||
monster() {
|
||||
dead = false; inBoat = false; parent = NULL; nextshot = 0;
|
||||
stunoff = 0; blowoff = 0; fragoff = 0; footphase = 0; no_targetting = false;
|
||||
swordangle = 0; inertia = Hypc; ori = Id; refs = 1;
|
||||
split_tick = -1; split_owner = -1;
|
||||
void reset() {
|
||||
nextshot = 0;
|
||||
stunoff = 0; blowoff = 0; fragoff = 0; footphase = 0;
|
||||
inertia = Hypc; ori = Id; vel = 0;
|
||||
swordangle = 0;
|
||||
}
|
||||
|
||||
|
||||
monster() {
|
||||
reset();
|
||||
refs = 1; split_tick = -1; split_owner = -1;
|
||||
no_targetting = false;
|
||||
dead = false; inBoat = false; parent = NULL;
|
||||
}
|
||||
|
||||
eMonster get_parenttype() { return parent ? parent->type : moNone; }
|
||||
|
||||
void store();
|
||||
|
Loading…
Reference in New Issue
Block a user