mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- Simplify more, found by code inspection.
This commit is contained in:
parent
6aca7604eb
commit
6cfd82f500
1 changed files with 3 additions and 17 deletions
|
@ -603,26 +603,12 @@ void cht_Give (player_t *player, const char *name, int amount)
|
|||
{
|
||||
if (amount > 0)
|
||||
{
|
||||
if (player->mo)
|
||||
{
|
||||
player->mo->health += amount;
|
||||
player->health = player->mo->health;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->health += amount;
|
||||
}
|
||||
player->mo->health += amount;
|
||||
player->health = player->mo->health;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->mo != NULL)
|
||||
{
|
||||
player->health = player->mo->health = player->mo->GetMaxHealth();
|
||||
}
|
||||
else
|
||||
{
|
||||
player->health = deh.GodHealth;
|
||||
}
|
||||
player->health = player->mo->health = player->mo->GetMaxHealth();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue