mirror of
https://github.com/yquake2/rogue.git
synced 2025-04-11 20:52:51 +00:00
Fix current health being reset to 100 if >100 at level change.
This is another code inconsistency, we must not clamp the current health to the client max health (which apparently is always 100) but to the current max health of the player entity. Analyzed and fix suggest by @BjossiAlfreds, fixes yquake2/yquake2#441.
This commit is contained in:
parent
119b9369e8
commit
e4daf3c070
1 changed files with 2 additions and 2 deletions
|
@ -396,9 +396,9 @@ ExitLevel(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (ent->health > ent->client->pers.max_health)
|
||||
if (ent->health > ent->max_health)
|
||||
{
|
||||
ent->health = ent->client->pers.max_health;
|
||||
ent->health = ent->max_health;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue