- added a larger batch of function exports.

- cleaned up the virtual function interface of APlayerPawn which still had many virtual declarations from old times when class properties were handled through virtual overrides. None of this makes sense these days anymore.
This commit is contained in:
Christoph Oelckers 2016-11-30 01:25:51 +01:00
commit bbf62132d8
12 changed files with 499 additions and 42 deletions

View file

@ -1285,6 +1285,13 @@ bool APlayerPawn::ResetAirSupply (bool playgasp)
return wasdrowning;
}
DEFINE_ACTION_FUNCTION(APlayerPawn, ResetAirSupply)
{
PARAM_SELF_PROLOGUE(APlayerPawn);
PARAM_BOOL_DEF(playgasp);
ACTION_RETURN_BOOL(self->ResetAirSupply(playgasp));
}
//===========================================================================
//
// Animations
@ -1293,14 +1300,22 @@ bool APlayerPawn::ResetAirSupply (bool playgasp)
void APlayerPawn::PlayIdle ()
{
if (InStateSequence(state, SeeState))
SetState (SpawnState);
IFVIRTUAL(APlayerPawn, PlayIdle)
{
VMValue params[1] = { (DObject*)this };
VMFrameStack stack;
stack.Call(func, params, 1, nullptr, 0, nullptr);
}
}
void APlayerPawn::PlayRunning ()
{
if (InStateSequence(state, SpawnState) && SeeState != NULL)
SetState (SeeState);
IFVIRTUAL(APlayerPawn, PlayRunning)
{
VMValue params[1] = { (DObject*)this };
VMFrameStack stack;
stack.Call(func, params, 1, nullptr, 0, nullptr);
}
}
void APlayerPawn::PlayAttacking ()
@ -1323,10 +1338,6 @@ void APlayerPawn::PlayAttacking2 ()
}
}
void APlayerPawn::ThrowPoisonBag ()
{
}
//===========================================================================
//
// APlayerPawn :: GiveDefaultInventory