mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- fixed some potential NULL pointer accesses.
SVN r3285 (trunk)
This commit is contained in:
parent
eafb9da2c1
commit
f2a457206c
3 changed files with 3 additions and 3 deletions
|
@ -120,10 +120,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit)
|
||||||
|
|
||||||
// Boss cubes should move freely to their destination so it's
|
// Boss cubes should move freely to their destination so it's
|
||||||
// probably best to disable all collision detection for them.
|
// probably best to disable all collision detection for them.
|
||||||
if (spit->flags & MF_NOCLIP) spit->flags5 |= MF5_NOINTERACTION;
|
|
||||||
|
|
||||||
if (spit != NULL)
|
if (spit != NULL)
|
||||||
{
|
{
|
||||||
|
if (spit->flags & MF_NOCLIP) spit->flags5 |= MF5_NOINTERACTION;
|
||||||
spit->target = targ;
|
spit->target = targ;
|
||||||
spit->master = self;
|
spit->master = self;
|
||||||
// [RH] Do this correctly for any trajectory. Doom would divide by 0
|
// [RH] Do this correctly for any trajectory. Doom would divide by 0
|
||||||
|
|
|
@ -586,7 +586,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray)
|
||||||
damage += (pr_bfgspray() & 7) + 1;
|
damage += (pr_bfgspray() & 7) + 1;
|
||||||
|
|
||||||
thingToHit = linetarget;
|
thingToHit = linetarget;
|
||||||
P_DamageMobj (thingToHit, self->target, self->target, damage, spray->DamageType);
|
P_DamageMobj (thingToHit, self->target, self->target, damage, spray != NULL? FName(spray->DamageType) : FName(NAME_BFGSplash));
|
||||||
P_TraceBleed (damage, thingToHit, self->target);
|
P_TraceBleed (damage, thingToHit, self->target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,9 +61,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_PotteryExplode)
|
||||||
for(i = (pr_pottery()&3)+3; i; i--)
|
for(i = (pr_pottery()&3)+3; i; i--)
|
||||||
{
|
{
|
||||||
mo = Spawn ("PotteryBit", self->x, self->y, self->z, ALLOW_REPLACE);
|
mo = Spawn ("PotteryBit", self->x, self->y, self->z, ALLOW_REPLACE);
|
||||||
mo->SetState (mo->SpawnState + (pr_pottery()%5));
|
|
||||||
if (mo)
|
if (mo)
|
||||||
{
|
{
|
||||||
|
mo->SetState (mo->SpawnState + (pr_pottery()%5));
|
||||||
mo->velz = ((pr_pottery()&7)+5)*(3*FRACUNIT/4);
|
mo->velz = ((pr_pottery()&7)+5)*(3*FRACUNIT/4);
|
||||||
mo->velx = (pr_pottery.Random2())<<(FRACBITS-6);
|
mo->velx = (pr_pottery.Random2())<<(FRACBITS-6);
|
||||||
mo->vely = (pr_pottery.Random2())<<(FRACBITS-6);
|
mo->vely = (pr_pottery.Random2())<<(FRACBITS-6);
|
||||||
|
|
Loading…
Reference in a new issue