mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 14:52:06 +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
244e0cfa01
commit
08a6bfd4df
1 changed files with 2 additions and 2 deletions
|
@ -375,9 +375,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