mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +00:00
- changed the trip bomb indexing to use a separate counter for robustness.
This commit is contained in:
parent
0eb10f0313
commit
5cf288a05c
4 changed files with 8 additions and 2 deletions
|
@ -890,7 +890,10 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bomb->s.hitag = bomb->GetIndex(); // sigh...
|
// this originally used the sprite index as tag to link the laser segments.
|
||||||
|
// This value is never used again to reference an actor by index. Decouple this for robustness.
|
||||||
|
ud.bomb_tag = (ud.bomb_tag + 1) & 32767;
|
||||||
|
bomb->s.hitag = ud.bomb_tag;
|
||||||
S_PlayActorSound(LASERTRIP_ONWALL, bomb);
|
S_PlayActorSound(LASERTRIP_ONWALL, bomb);
|
||||||
bomb->s.xvel = -20;
|
bomb->s.xvel = -20;
|
||||||
ssp(bomb, CLIPMASK0);
|
ssp(bomb, CLIPMASK0);
|
||||||
|
|
|
@ -379,6 +379,7 @@ void GameInterface::SerializeGameState(FSerializer& arc)
|
||||||
("marker", ud.marker)
|
("marker", ud.marker)
|
||||||
("ffire", ud.ffire)
|
("ffire", ud.ffire)
|
||||||
("levelclock", ud.levelclock)
|
("levelclock", ud.levelclock)
|
||||||
|
("bomb_tag", ud.bomb_tag)
|
||||||
|
|
||||||
.Array("sectorextra", sectorextra, numsectors)
|
.Array("sectorextra", sectorextra, numsectors)
|
||||||
("rtsplaying", rtsplaying)
|
("rtsplaying", rtsplaying)
|
||||||
|
|
|
@ -339,7 +339,8 @@ int spawn_d(int j, int pn)
|
||||||
sp->yrepeat=5;
|
sp->yrepeat=5;
|
||||||
|
|
||||||
act->SetOwner(act);
|
act->SetOwner(act);
|
||||||
sp->hitag = i; // hijack
|
ud.bomb_tag = (ud.bomb_tag + 1) & 32767;
|
||||||
|
sp->hitag = ud.bomb_tag;
|
||||||
|
|
||||||
sp->xvel = 16;
|
sp->xvel = 16;
|
||||||
ssp(act, CLIPMASK0);
|
ssp(act, CLIPMASK0);
|
||||||
|
|
|
@ -132,6 +132,7 @@ struct user_defs
|
||||||
|
|
||||||
short from_bonus;
|
short from_bonus;
|
||||||
short last_level, secretlevel;
|
short last_level, secretlevel;
|
||||||
|
short bomb_tag;
|
||||||
|
|
||||||
int const_visibility;
|
int const_visibility;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue