- Simplify more, found by code inspection.

This commit is contained in:
Edoardo Prezioso 2016-04-21 16:03:33 +02:00
parent 6aca7604eb
commit 6cfd82f500

View file

@ -603,26 +603,12 @@ void cht_Give (player_t *player, const char *name, int amount)
{ {
if (amount > 0) if (amount > 0)
{ {
if (player->mo) player->mo->health += amount;
{ player->health = player->mo->health;
player->mo->health += amount;
player->health = player->mo->health;
}
else
{
player->health += amount;
}
} }
else else
{ {
if (player->mo != NULL) player->health = player->mo->health = player->mo->GetMaxHealth();
{
player->health = player->mo->health = player->mo->GetMaxHealth();
}
else
{
player->health = deh.GodHealth;
}
} }
} }