- Fixed: "give health" without an amount would set your health to IDDQD health

instead of the player class's maximum.
- Fixed: A_CStaffCheck() assumed the player's max health was 100 instead
  of getting checking for the true maximum.


SVN r1876 (trunk)
This commit is contained in:
Randy Heit 2009-09-25 03:07:20 +00:00
commit d816747c7e
4 changed files with 19 additions and 12 deletions

View file

@ -52,7 +52,7 @@
void cht_DoCheat (player_t *player, int cheat)
{
static const PClass *BeholdPowers[9] =
static const PClass * const BeholdPowers[9] =
{
RUNTIME_CLASS(APowerInvulnerable),
RUNTIME_CLASS(APowerStrength),
@ -631,10 +631,14 @@ void cht_Give (player_t *player, const char *name, int amount)
}
else
{
if (player->mo)
player->mo->health = deh.GodHealth;
player->health = deh.GodHealth;
if (player->mo != NULL)
{
player->health = player->mo->health = player->mo->GetMaxHealth();
}
else
{
player->health = deh.GodHealth;
}
}
if (!giveall)