KF2-Server-Extension/ServerExt/Classes/Ext_T_HealthRegHelp.uc

26 lines
461 B
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_T_HealthRegHelp extends Info
transient;
var KFPawn_Human PawnOwner;
var byte RegCount;
function PostBeginPlay()
{
PawnOwner = KFPawn_Human(Owner);
if( PawnOwner==None )
Destroy();
else SetTimer(9+FRand(),true);
}
function Timer()
{
if( PawnOwner==None || PawnOwner.Health<=0 )
Destroy();
else if( PawnOwner.Health<PawnOwner.HealthMax )
{
PawnOwner.Health = Min(PawnOwner.Health+RegCount,PawnOwner.HealthMax);
}
}
defaultproperties
{
}