Add damagesource
This commit is contained in:
parent
f13bc09840
commit
83165dccbf
4 changed files with 7 additions and 0 deletions
|
|
@ -168,6 +168,7 @@ IMPLEMENT_POINTERS_START(AActor)
|
|||
IMPLEMENT_POINTER(target)
|
||||
IMPLEMENT_POINTER(lastenemy)
|
||||
IMPLEMENT_POINTER(tracer)
|
||||
IMPLEMENT_POINTER(damagesource)
|
||||
IMPLEMENT_POINTER(goal)
|
||||
IMPLEMENT_POINTER(LastLookActor)
|
||||
IMPLEMENT_POINTER(Inventory)
|
||||
|
|
@ -6286,6 +6287,9 @@ AActor *P_SpawnPuff (AActor *source, PClassActor *pufftype, const DVector3 &pos1
|
|||
if ( puff && (puff->flags5 & MF5_PUFFGETSOWNER))
|
||||
puff->target = source;
|
||||
|
||||
// [AA] Track the source of the attack unconditionally in a separate field.
|
||||
puff->damagesource = source;
|
||||
|
||||
// Angle is the opposite of the hit direction (i.e. the puff faces the source.)
|
||||
puff->Angles.Yaw = hitdir + DAngle::fromDeg(180);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue