thanks WotgrealExporter tool.
Code: Select all
//================================================================================
// AutoSpectate.
//================================================================================
class AutoSpectate extends Info;
var PlayerPawn P;
var Rotator targRot;
var Rotator myRot;
var Rotator prevRot;
var bool bfoundflag;
var bool bviewingFC;
var string blueFC;
var string redFC;
var bool bautoFC;
var bool bAFCOFFmsg;
var bool bAFCONmsg;
var private bool ;
var private int ;
var private int ;
var int ydelta;
var int pdelta;
var private int ;
var private int ;
var int Offset;
function int (int X, int Y, out int diff)
{
local int newdiff;
diff = UnknownFunction147(X,Y);
newdiff = diff;
if ( UnknownFunction132(UnknownFunction151(newdiff,20000),UnknownFunction150(newdiff,-20000)) )
{
newdiff = 20000;
}
return UnknownFunction145(UnknownFunction144(newdiff,newdiff),500000);
}
event Tick (float Delta)
{
if ( UnknownFunction129(P.PlayerReplicationInfo.bIsSpectator) )
{
return;
}
if ( UnknownFunction119(P.ViewTarget,None) )
{
if ( UnknownFunction119(Pawn(P.ViewTarget),None) )
{
targRot = Pawn(P.ViewTarget).ViewRotation;
myRot = P.ViewRotation;
ydelta = (targRot.Yaw,myRot.Yaw,);
pdelta = (targRot.Pitch,myRot.Pitch,);
if ( UnknownFunction154(ydelta,-9999) )
{
();
= True;
}
if ( UnknownFunction151(Pawn(P.ViewTarget).Health,0) )
{
if ( UnknownFunction132(UnknownFunction130(UnknownFunction151(,0),UnknownFunction150(,33650)),UnknownFunction150(,-33650)) )
{
if ( UnknownFunction151(UnknownFunction146(ydelta,P.ViewRotation.Yaw),65536) )
{
P.ViewRotation.Yaw = 0;
return;
}
UnknownFunction161(P.ViewRotation.Yaw,ydelta);
} else {
if ( UnknownFunction132(UnknownFunction130(UnknownFunction150(,0),UnknownFunction151(,-33650)),UnknownFunction151(,33650)) )
{
if ( UnknownFunction150(UnknownFunction147(P.ViewRotation.Yaw,ydelta),0) )
{
P.ViewRotation.Yaw = 65536;
return;
}
UnknownFunction162(P.ViewRotation.Yaw,ydelta);
}
}
if ( UnknownFunction132(UnknownFunction130(UnknownFunction151(,0),UnknownFunction150(,33650)),UnknownFunction150(,-33650)) )
{
UnknownFunction161(P.ViewRotation.Pitch,pdelta);
} else {
if ( UnknownFunction132(UnknownFunction130(UnknownFunction150(,0),UnknownFunction151(,-33650)),UnknownFunction151(,33650)) )
{
UnknownFunction162(P.ViewRotation.Pitch,pdelta);
}
}
if ( UnknownFunction155(P.ViewRotation.Roll,0) )
{
P.ViewRotation.Roll = 0;
}
}
}
}
Offset = UnknownFunction126(P.Player.Console.MsgText[P.Player.Console.TopLine],"mutate AFCOFF");
if ( UnknownFunction130(UnknownFunction155(Offset,-1),UnknownFunction129(bAFCOFFmsg)) )
{
bautoFC = False;
P.ClientMessage("Auto FC feature off");
bAFCOFFmsg = True;
bAFCONmsg = False;
}
Offset = UnknownFunction126(P.Player.Console.MsgText[P.Player.Console.TopLine],"mutate AFCON");
if ( UnknownFunction130(UnknownFunction155(Offset,-1),UnknownFunction129(bAFCONmsg)) )
{
bautoFC = True;
P.ClientMessage("Auto FC feature on");
bAFCOFFmsg = False;
bAFCONmsg = True;
}
if ( UnknownFunction130(bautoFC,UnknownFunction129()) )
{
Offset = UnknownFunction126(P.Player.Console.MsgText[P.Player.Console.TopLine],"captured the red flag!");
if ( UnknownFunction155(Offset,-1) )
{
return;
}
Offset = UnknownFunction126(P.Player.Console.MsgText[P.Player.Console.TopLine],"captured the blue flag!");
if ( UnknownFunction155(Offset,-1) )
{
return;
}
Offset = UnknownFunction126(P.Player.Console.MsgText[P.Player.Console.TopLine],"has the red flag!");
if ( UnknownFunction155(Offset,-1) )
{
redFC = UnknownFunction128(P.Player.Console.MsgText[P.Player.Console.TopLine],UnknownFunction147(Offset,1));
}
Offset = UnknownFunction126(P.Player.Console.MsgText[P.Player.Console.TopLine],"has the blue flag!");
if ( UnknownFunction155(Offset,-1) )
{
redFC = UnknownFunction128(P.Player.Console.MsgText[P.Player.Console.TopLine],UnknownFunction147(Offset,1));
}
Offset = UnknownFunction126(P.Player.Console.MsgText[P.Player.Console.TopLine],"Failed to change view");
if ( UnknownFunction155(Offset,-1) )
{
redFC = "";
blueFC = "";
}
if ( UnknownFunction129(bviewingFC) )
{
if ( UnknownFunction114(P.ViewTarget,None) )
{
if ( UnknownFunction123(redFC,"") )
{
();
} else {
if ( UnknownFunction123(blueFC,"") )
{
();
}
}
} else {
if ( UnknownFunction114(Pawn(P.ViewTarget),None) )
{
if ( UnknownFunction123(redFC,"") )
{
();
} else {
if ( UnknownFunction123(blueFC,"") )
{
();
}
}
} else {
if ( UnknownFunction114(Pawn(P.ViewTarget).PlayerReplicationInfo.HasFlag,None) )
{
if ( UnknownFunction122(redFC,Pawn(P.ViewTarget).PlayerReplicationInfo.PlayerName) )
{
redFC = "";
} else {
if ( (redFC) )
{
();
} else {
if ( UnknownFunction122(blueFC,Pawn(P.ViewTarget).PlayerReplicationInfo.PlayerName) )
{
blueFC = "";
} else {
if ( (blueFC) )
{
();
}
}
}
}
}
}
}
UnknownFunction280(0.31,False);
bviewingFC = True;
}
}
}
function bool (string S)
{
local int i;
local TournamentGameReplicationInfo ptgri;
ptgri = TournamentGameReplicationInfo(P.GameReplicationInfo);
i = 0;
if ( UnknownFunction150(i,32) )
{
if ( UnknownFunction114(ptgri.PRIArray[i],None) )
{
goto JL00C8;
}
if ( ptgri.PRIArray[i].bIsSpectator )
{
goto JL00BE;
}
if ( UnknownFunction119(ptgri.PRIArray[i].HasFlag,None) )
{
if ( UnknownFunction122(ptgri.PRIArray[i].PlayerName,S) )
{
return True;
} else {
return False;
}
}
UnknownFunction165(i);
goto JL0020;
}
return False;
}
function ()
{
P.ViewPlayer(redFC);
P.ViewRotation = Pawn(P.ViewTarget).ViewRotation;
}
function ()
{
P.ViewPlayer(blueFC);
P.ViewRotation = Pawn(P.ViewTarget).ViewRotation;
}
function ()
{
P.ClientMessage("-----------------------------------------");
P.ClientMessage("MAC Addresses don't match.");
P.ClientMessage("AutoSpec will cease to function.");
P.ClientMessage("-----------------------------------------");
}
function Timer ()
{
bviewingFC = False;
}
function setpawn (PlayerPawn o)
{
P = o;
}
defaultproperties
{
bautoFC=True
}