Add Travelled virtual for PlayerPawn, akin to the same function for Inventory. (#1169)

This commit is contained in:
Marisa Kirisame 2020-09-02 12:12:58 +02:00 committed by GitHub
commit 58f5c030fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -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;
}