- scriptified the pistol to test if struct member functions work.
- made APlayerPawn::PlayAttacking(2) virtual script functions so that mods have better control over player animations. Note that these have no native base so they skip the templated interface for managing virtual functions.
This commit is contained in:
parent
de8cacc465
commit
d50da34664
15 changed files with 214 additions and 126 deletions
|
|
@ -1280,12 +1280,22 @@ void APlayerPawn::PlayRunning ()
|
|||
|
||||
void APlayerPawn::PlayAttacking ()
|
||||
{
|
||||
if (MissileState != NULL) SetState (MissileState);
|
||||
static int VIndex = -1;
|
||||
if (VIndex < 0) VIndex = GetVirtualIndex(RUNTIME_CLASS(APlayerPawn), "PlayAttacking");
|
||||
// Without the type cast this picks the 'void *' assignment...
|
||||
VMValue params[1] = { (DObject*)this };
|
||||
VMFrameStack stack;
|
||||
stack.Call(this->GetClass()->Virtuals[VIndex], params, 1, nullptr, 0, nullptr);
|
||||
}
|
||||
|
||||
void APlayerPawn::PlayAttacking2 ()
|
||||
{
|
||||
if (MeleeState != NULL) SetState (MeleeState);
|
||||
static int VIndex = -1;
|
||||
if (VIndex < 0) VIndex = GetVirtualIndex(RUNTIME_CLASS(APlayerPawn), "PlayAttacking2");
|
||||
// Without the type cast this picks the 'void *' assignment...
|
||||
VMValue params[1] = { (DObject*)this };
|
||||
VMFrameStack stack;
|
||||
stack.Call(this->GetClass()->Virtuals[VIndex], params, 1, nullptr, 0, nullptr);
|
||||
}
|
||||
|
||||
void APlayerPawn::ThrowPoisonBag ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue