- fixed: P_SpawnPuff must set the puff's owner before doing any state jumps.

SVN r2128 (trunk)
This commit is contained in:
Christoph Oelckers 2010-01-24 09:46:31 +00:00
parent c363f169d7
commit 8b9d8137fc

View file

@ -4446,6 +4446,11 @@ AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t
puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE);
if (puff == NULL) return NULL;
// [BB] If the puff came from a player, set the target of the puff to this player.
if ( puff && (puff->flags5 & MF5_PUFFGETSOWNER))
puff->target = source;
if (source != NULL) puff->angle = R_PointToAngle2(x, y, source->x, source->y);
// If a puff has a crash state and an actor was not hit,
@ -4481,10 +4486,6 @@ AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t
}
}
// [BB] If the puff came from a player, set the target of the puff to this player.
if ( puff && (puff->flags5 & MF5_PUFFGETSOWNER))
puff->target = source;
return puff;
}