- took several methods out of the native PlayerPawn implementation, either by scriptification or moving them to other places.
This commit is contained in:
parent
4cc78c3273
commit
2258a71c36
18 changed files with 203 additions and 235 deletions
|
|
@ -2279,7 +2279,7 @@ explode:
|
|||
// Don't affect main player when voodoo dolls stop:
|
||||
if (player && player->mo == mo && !(player->cheats & CF_PREDICTING))
|
||||
{
|
||||
player->mo->PlayIdle ();
|
||||
PlayIdle (player->mo);
|
||||
}
|
||||
|
||||
mo->Vel.X = mo->Vel.Y = 0;
|
||||
|
|
@ -5077,7 +5077,11 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
|
|||
|
||||
if (deathmatch)
|
||||
{ // Give all cards in death match mode.
|
||||
p->mo->GiveDeathmatchInventory ();
|
||||
IFVIRTUALPTR(p->mo, APlayerPawn, GiveDeathmatchInventory)
|
||||
{
|
||||
VMValue params[1] = { p->mo };
|
||||
VMCall(func, params, 1, nullptr, 0);
|
||||
}
|
||||
}
|
||||
else if ((multiplayer || (level.flags2 & LEVEL2_ALLOWRESPAWN) || sv_singleplayerrespawn ||
|
||||
!!G_SkillProperty(SKILLP_PlayerRespawn)) && state == PST_REBORN && oldactor != NULL)
|
||||
|
|
@ -7072,6 +7076,18 @@ int AActor::SpawnHealth() const
|
|||
}
|
||||
}
|
||||
|
||||
int AActor::GetMaxHealth(bool withupgrades) const
|
||||
{
|
||||
int ret = 100;
|
||||
IFVIRTUAL(AActor, GetMaxHealth)
|
||||
{
|
||||
VMValue param[] = { const_cast<AActor*>(this), withupgrades };
|
||||
VMReturn r(&ret);
|
||||
VMCall(func, param, 2, &r, 1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
FState *AActor::GetRaiseState()
|
||||
{
|
||||
if (!(flags & MF_CORPSE))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue