- scriptified A_SelectWeapon and inlined the last remaining use of APlayerPawn::SelectWeapon.

This commit is contained in:
Christoph Oelckers 2018-12-04 17:41:55 +01:00
commit 2459b27895
3 changed files with 8 additions and 26 deletions

View file

@ -938,29 +938,6 @@ void APlayerPawn::PostBeginPlay()
}
}
//===========================================================================
//
// APlayerPawn :: PickNewWeapon
//
// Picks a new weapon for this player. Used mostly for running out of ammo,
// but it also works when an ACS script explicitly takes the ready weapon
// away or the player picks up some ammo they had previously run out of.
//
//===========================================================================
AActor *APlayerPawn::PickNewWeapon(PClassActor *ammotype)
{
AActor *best = nullptr;
IFVM(PlayerPawn, PickNewWeapon)
{
VMValue param[] = { player->mo, ammotype };
VMReturn ret((void**)&best);
VMCall(func, param, 2, &ret, 1);
}
return best;
}
//===========================================================================
//
// APlayerPawn :: GiveDeathmatchInventory