Improved Slam functionality:
*Added ONLYSLAMSOLID flag to ignore non-solid Actors that aren't shootable while SKULLFLY is on. *Added Slam state that gets entered when slamming an Actor.
This commit is contained in:
parent
15e00f22e8
commit
aea346f1f3
4 changed files with 16 additions and 2 deletions
|
|
@ -3140,6 +3140,12 @@ DEFINE_ACTION_FUNCTION(AActor, Howl)
|
|||
|
||||
bool AActor::Slam (AActor *thing)
|
||||
{
|
||||
if ((flags8 & MF8_ONLYSLAMSOLID)
|
||||
&& !(thing->flags & MF_SOLID) && !(thing->flags & MF_SHOOTABLE))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
flags &= ~MF_SKULLFLY;
|
||||
Vel.Zero();
|
||||
if (health > 0)
|
||||
|
|
@ -3152,8 +3158,13 @@ bool AActor::Slam (AActor *thing)
|
|||
// The charging monster may have died by the target's actions here.
|
||||
if (health > 0)
|
||||
{
|
||||
if (SeeState != NULL && !(flags8 & MF8_RETARGETAFTERSLAM)) SetState (SeeState);
|
||||
else SetIdle();
|
||||
FState *slam = FindState(NAME_Slam);
|
||||
if (slam != NULL)
|
||||
SetState(slam);
|
||||
else if (SeeState != NULL && !(flags8 & MF8_RETARGETAFTERSLAM))
|
||||
SetState (SeeState);
|
||||
else
|
||||
SetIdle();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue