Fix Health Not Displaying Properly past 255

This commit is contained in:
secretagentjr 2023-07-20 12:18:08 -07:00
parent b2d0d28946
commit 53f63934b1

View File

@ -736,6 +736,23 @@ event BeginState(Name N)
} }
} }
function UpdateReplicatedPlayerHealth()
{
local Pawn OwnerPawn;
if( KFPlayerOwner != none )
{
OwnerPawn = KFPlayerOwner.Pawn;
if( OwnerPawn != none && OwnerPawn.Health != PlayerHealth )
{
PlayerHealth = OwnerPawn.Health;
//PlayerHealthPercent = FloatToByte( float(OwnerPawn.Health) / float(OwnerPawn.HealthMax) );
PlayerHealthPercent *= float(OwnerPawn.Health) / float(OwnerPawn.HealthMax);
}
}
}
defaultproperties defaultproperties
{ {
RespawnCounter=-1 RespawnCounter=-1