- 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:
parent
2ad438d696
commit
d816747c7e
4 changed files with 19 additions and 12 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue