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

31 lines
496 B
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_T_UnCloakHelper extends Info
transient;
var Pawn PawnOwner;
var float HandleRadius;
function PostBeginPlay()
{
PawnOwner = Pawn(Owner);
2020-11-28 20:12:58 +00:00
if (PawnOwner==None)
2017-10-20 02:00:49 +00:00
Destroy();
else SetTimer(0.5+FRand()*0.1,true);
}
2020-11-28 21:54:57 +00:00
2017-10-20 02:00:49 +00:00
function Timer()
{
local KFPawn_Monster M;
2020-11-28 20:12:58 +00:00
if (PawnOwner==None || PawnOwner.Health<=0)
2017-10-20 02:00:49 +00:00
Destroy();
else
{
foreach WorldInfo.AllPawns(class'KFPawn_Monster',M,PawnOwner.Location,HandleRadius)
2020-11-28 20:12:58 +00:00
if (M.bCanCloak)
2017-10-20 02:00:49 +00:00
M.CallOutCloaking();
}
}
defaultproperties
{
}