Merge remote-tracking branch 'origin/new_wallscan' into qzdoom

This commit is contained in:
Magnus Norddahl 2016-11-05 04:49:54 +01:00
commit 484e1b56be
4 changed files with 7 additions and 5 deletions

View file

@ -358,7 +358,7 @@ void DBot::WhatToGet (AActor *item)
} }
else if ((typeis (Megasphere) || typeis (Soulsphere) || typeis (HealthBonus)) && player->mo->health >= deh.MaxSoulsphere) else if ((typeis (Megasphere) || typeis (Soulsphere) || typeis (HealthBonus)) && player->mo->health >= deh.MaxSoulsphere)
return; 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; return;
if ((dest == NULL || if ((dest == NULL ||

View file

@ -1172,7 +1172,7 @@ void G_Ticker ()
} }
// check for turbo cheats // check for turbo cheats
if (cmd->ucmd.forwardmove > TURBOTHRESHOLD && if (turbo > 100.f && cmd->ucmd.forwardmove > TURBOTHRESHOLD &&
!(gametic&31) && ((gametic>>5)&(MAXPLAYERS-1)) == i ) !(gametic&31) && ((gametic>>5)&(MAXPLAYERS-1)) == i )
{ {
Printf ("%s is turbo!\n", players[i].userinfo.GetName()); Printf ("%s is turbo!\n", players[i].userinfo.GetName());

View file

@ -671,6 +671,7 @@ public:
{ {
return FOptionMenuItem::MenuEvent(mkey, fromcontroller); return FOptionMenuItem::MenuEvent(mkey, fromcontroller);
} }
if (fabs(value) < FLT_EPSILON) value = 0;
SetSliderValue(clamp(value, mMin, mMax)); SetSliderValue(clamp(value, mMin, mMax));
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE); S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
return true; return true;

View file

@ -2678,10 +2678,11 @@ void P_PlayerThink (player_t *player)
// Apply degeneration. // Apply degeneration.
if (dmflags2 & DF2_YES_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) if (player->health - 5 < maxhealth)
player->health = deh.MaxHealth; player->health = maxhealth;
else else
player->health--; player->health--;