mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
Add Travelled virtual for PlayerPawn, akin to the same function for Inventory. (#1169)
This commit is contained in:
parent
e0aa8db616
commit
58f5c030fe
2 changed files with 18 additions and 0 deletions
|
@ -1564,6 +1564,12 @@ int FLevelLocals::FinishTravel ()
|
|||
{
|
||||
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.
|
||||
pawns[pawnsnum++] = pawn;
|
||||
}
|
||||
|
|
|
@ -2432,6 +2432,18 @@ class PlayerPawn : Actor
|
|||
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