- scriptified A_SelectWeapon and inlined the last remaining use of APlayerPawn::SelectWeapon.
This commit is contained in:
parent
44e43c48b5
commit
2459b27895
3 changed files with 8 additions and 26 deletions
|
|
@ -49,6 +49,7 @@
|
|||
#include "g_levellocals.h"
|
||||
#include "actorinlines.h"
|
||||
#include "scriptutil.h"
|
||||
#include "vm.h"
|
||||
|
||||
static FRandom pr_script("FScript");
|
||||
|
||||
|
|
@ -2550,8 +2551,13 @@ void FParser::SF_PlayerWeapon()
|
|||
if (players[playernum].PendingWeapon==wp) players[playernum].PendingWeapon=WP_NOCHANGE;
|
||||
if (players[playernum].ReadyWeapon==wp)
|
||||
{
|
||||
players[playernum].ReadyWeapon=NULL;
|
||||
players[playernum].mo->PickNewWeapon(NULL);
|
||||
players[playernum].ReadyWeapon=nullptr;
|
||||
|
||||
IFVM(PlayerPawn, PickNewWeapon)
|
||||
{
|
||||
VMValue param[] = { players[playernum].mo, (void*)nullptr };
|
||||
VMCall(func, param, 2, nullptr, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue