42 lines
618 B
Ucode
42 lines
618 B
Ucode
class a_SpectateManager extends a_ActorBase;
|
|
|
|
var KFPlayerController PC;
|
|
var bool isSpectator;
|
|
|
|
|
|
function friendlyShoot(KFPlayerController inPC, float timerTime)
|
|
{
|
|
PC = inPC;
|
|
KFHumanPawn(PC.pawn).weapon.serverStartFire(0);
|
|
SetTimer(timerTime, true);
|
|
}
|
|
|
|
|
|
function Timer()
|
|
{
|
|
if(!isSpectator)
|
|
{
|
|
PC.BecomeSpectator();
|
|
isSpectator = true;
|
|
SetTimer(0.10, false);
|
|
}
|
|
else
|
|
{
|
|
PC.BecomeActivePlayer();
|
|
SetTimer(0.00, false);
|
|
Destroyed();
|
|
}
|
|
}
|
|
|
|
|
|
// self cleanup
|
|
function Termination()
|
|
{
|
|
pc = none;
|
|
super.Termination();
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
}
|