mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- Exhumed: Split out player invincibility code.
This commit is contained in:
parent
1a8dcda5b6
commit
04ab6f4640
1 changed files with 17 additions and 6 deletions
|
@ -947,6 +947,22 @@ static void doPlayerInvisibility(Player* const pPlayer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
static void doPlayerInvincibility(Player* const pPlayer)
|
||||||
|
{
|
||||||
|
pPlayer->invincibility--;
|
||||||
|
|
||||||
|
if (pPlayer->invincibility == 150 && pPlayer->nPlayer == nLocalPlayer)
|
||||||
|
{
|
||||||
|
PlayAlert(GStrings("TXT_EX_INVINCEX"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// this function is pure spaghetti madness... :(
|
// this function is pure spaghetti madness... :(
|
||||||
|
@ -991,12 +1007,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
||||||
doPlayerInvisibility(pPlayer);
|
doPlayerInvisibility(pPlayer);
|
||||||
|
|
||||||
if (pPlayer->invincibility > 0)
|
if (pPlayer->invincibility > 0)
|
||||||
{
|
doPlayerInvincibility(pPlayer);
|
||||||
pPlayer->invincibility--;
|
|
||||||
if (pPlayer->invincibility == 150 && nPlayer == nLocalPlayer) {
|
|
||||||
PlayAlert(GStrings("TXT_EX_INVINCEX"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pPlayer->nQuake != 0)
|
if (pPlayer->nQuake != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue