- fixed three crashes found when testing WW2GI.

This commit is contained in:
Christoph Oelckers 2020-11-03 18:43:08 +01:00
parent a514910aa4
commit 61013af910
3 changed files with 3 additions and 3 deletions

View file

@ -1505,7 +1505,7 @@ static bool ifcansee(DDukeActor* actor, int pnum)
int ParseState::parse(void)
{
int j, l, s;
auto g_sp = &g_ac->s;
auto g_sp = g_ac? &g_ac->s : nullptr;
if(killit_flag) return 1;

View file

@ -1117,7 +1117,7 @@ void shootbloodsplat(int i, int p, int sx, int sy, int sz, int sa, int atwith, i
spawned->s.y = hity;
spawned->s.z = hitz;
spawned->s.cstat |= (krand() & 4);
ssp(k, CLIPMASK0);
ssp(spawned, CLIPMASK0);
setsprite(spawned, spawned->s.pos);
if (s->picnum == OOZFILTER || s->picnum == NEWBEAST)
spawned->s.pal = 6;

View file

@ -320,7 +320,7 @@ static void shootweapon(int i, int p, int sx, int sy, int sz, int sa, int atwith
auto s = &actor->s;
int sect = s->sectnum;
int zvel;
short hitsect, hitspr, hitwall, l, j, k;
short hitsect, hitspr, hitwall, l, j, k = -1;
int hitx, hity, hitz;
if (s->extra >= 0) s->shade = -96;