- Fixed: A_SorcOffense2 depended on args being bytes and overflowing.

- Fixed: Even though P_DamageMobj checked an attack's originator
  for MF2_NODMGTHRUST the same check was missing from P_RadiusAttack.
- Fixed: A_MinotaurRoam should not assume without check that it was
  called by a MinotaurFriend.
- Fixed: The Minotaur declared A_MntrFloorFire which it did not use.
- Fixed: All Spawnspot functions did not check for a spot tid of 0 as
  the script's activator.
- Fixed: Friendly monsters ignored team association of their owning
  players.


SVN r1770 (trunk)
This commit is contained in:
Christoph Oelckers 2009-08-12 18:57:31 +00:00
commit 385350efae
9 changed files with 83 additions and 48 deletions

View file

@ -4064,25 +4064,28 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
if (!bombdodamage || !(bombspot->flags2 & MF2_NODMGTHRUST))
{
thrust = points * 0.5f / (float)thing->Mass;
if (bombsource == thing)
if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST))
{
thrust *= selfthrustscale;
thrust = points * 0.5f / (float)thing->Mass;
if (bombsource == thing)
{
thrust *= selfthrustscale;
}
velz = (float)(thing->z + (thing->height>>1) - bombspot->z) * thrust;
if (bombsource != thing)
{
velz *= 0.5f;
}
else
{
velz *= 0.8f;
}
angle_t ang = R_PointToAngle2 (bombspot->x, bombspot->y, thing->x, thing->y) >> ANGLETOFINESHIFT;
thing->velx += fixed_t (finecosine[ang] * thrust);
thing->vely += fixed_t (finesine[ang] * thrust);
if (bombdodamage)
thing->velz += (fixed_t)velz; // this really doesn't work well
}
velz = (float)(thing->z + (thing->height>>1) - bombspot->z) * thrust;
if (bombsource != thing)
{
velz *= 0.5f;
}
else
{
velz *= 0.8f;
}
angle_t ang = R_PointToAngle2 (bombspot->x, bombspot->y, thing->x, thing->y) >> ANGLETOFINESHIFT;
thing->velx += fixed_t (finecosine[ang] * thrust);
thing->vely += fixed_t (finesine[ang] * thrust);
if (bombdodamage)
thing->velz += (fixed_t)velz; // this really doesn't work well
}
}
}