diff --git a/src/b_think.cpp b/src/b_think.cpp index 5a98b5c1ae..d097db8640 100644 --- a/src/b_think.cpp +++ b/src/b_think.cpp @@ -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 || diff --git a/src/g_game.cpp b/src/g_game.cpp index ec79d59e60..810a29da10 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -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()); diff --git a/src/menu/optionmenuitems.h b/src/menu/optionmenuitems.h index 76718809e1..0fadeca374 100644 --- a/src/menu/optionmenuitems.h +++ b/src/menu/optionmenuitems.h @@ -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; diff --git a/src/p_user.cpp b/src/p_user.cpp index 232214bfd2..206bfc23ea 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -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--;