mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-12 13:21:51 +00:00
Add Travelled virtual for PlayerPawn, akin to the same function for Inventory. (#1169)
This commit is contained in:
parent
0255ee7719
commit
0bc5bccb3b
2 changed files with 18 additions and 0 deletions
|
@ -1475,6 +1475,12 @@ int G_FinishTravel ()
|
||||||
{
|
{
|
||||||
pawn->Speed = pawn->GetDefault()->Speed;
|
pawn->Speed = pawn->GetDefault()->Speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IFVIRTUALPTRNAME(pawn, NAME_PlayerPawn, Travelled)
|
||||||
|
{
|
||||||
|
VMValue params[1] = { pawn };
|
||||||
|
VMCall(func, params, 1, nullptr, 0);
|
||||||
|
}
|
||||||
// [ZZ] we probably don't want to fire any scripts before all players are in, especially with runNow = true.
|
// [ZZ] we probably don't want to fire any scripts before all players are in, especially with runNow = true.
|
||||||
pawns[pawnsnum++] = pawn;
|
pawns[pawnsnum++] = pawn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2446,6 +2446,18 @@ class PlayerPawn : Actor
|
||||||
return wasdrowning;
|
return wasdrowning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// PlayerPawn :: Travelled
|
||||||
|
//
|
||||||
|
// Called when the player moves to another map, in case it needs to do
|
||||||
|
// special reinitialization. This is called after all carried items have
|
||||||
|
// executed their respective Travelled() virtuals too.
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
|
virtual void Travelled() {}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue