mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-28 14:52:01 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
a957f72875
4 changed files with 7 additions and 5 deletions
|
@ -358,7 +358,7 @@ void DBot::WhatToGet (AActor *item)
|
|||
}
|
||||
else if ((typeis (Megasphere) || typeis (Soulsphere) || typeis (HealthBonus)) && player->mo->health >= deh.MaxSoulsphere)
|
||||
return;
|
||||
else if (item->IsKindOf (RUNTIME_CLASS(AHealth)) && player->mo->health >= deh.MaxHealth /*MAXHEALTH*/)
|
||||
else if (item->IsKindOf (RUNTIME_CLASS(AHealth)) && player->mo->health >= player->mo->GetMaxHealth() + player->mo->stamina)
|
||||
return;
|
||||
|
||||
if ((dest == NULL ||
|
||||
|
|
|
@ -1172,7 +1172,7 @@ void G_Ticker ()
|
|||
}
|
||||
|
||||
// check for turbo cheats
|
||||
if (cmd->ucmd.forwardmove > TURBOTHRESHOLD &&
|
||||
if (turbo > 100.f && cmd->ucmd.forwardmove > TURBOTHRESHOLD &&
|
||||
!(gametic&31) && ((gametic>>5)&(MAXPLAYERS-1)) == i )
|
||||
{
|
||||
Printf ("%s is turbo!\n", players[i].userinfo.GetName());
|
||||
|
|
|
@ -671,6 +671,7 @@ public:
|
|||
{
|
||||
return FOptionMenuItem::MenuEvent(mkey, fromcontroller);
|
||||
}
|
||||
if (fabs(value) < FLT_EPSILON) value = 0;
|
||||
SetSliderValue(clamp(value, mMin, mMax));
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
return true;
|
||||
|
|
|
@ -2678,10 +2678,11 @@ void P_PlayerThink (player_t *player)
|
|||
// Apply degeneration.
|
||||
if (dmflags2 & DF2_YES_DEGENERATION)
|
||||
{
|
||||
if ((level.time % TICRATE) == 0 && player->health > deh.MaxHealth)
|
||||
int maxhealth = player->mo->GetMaxHealth() + player->mo->stamina;
|
||||
if ((level.time % TICRATE) == 0 && player->health > maxhealth)
|
||||
{
|
||||
if (player->health - 5 < deh.MaxHealth)
|
||||
player->health = deh.MaxHealth;
|
||||
if (player->health - 5 < maxhealth)
|
||||
player->health = maxhealth;
|
||||
else
|
||||
player->health--;
|
||||
|
||||
|
|
Loading…
Reference in a new issue