update integration gsc
This commit is contained in:
parent
f567a03fa7
commit
287635fa36
@ -65,6 +65,8 @@ OnPlayerConnect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
player thread OnPlayerSpawned();
|
player thread OnPlayerSpawned();
|
||||||
|
player thread OnPlayerJoinedTeam();
|
||||||
|
player thread OnPlayerJoinedSpectators();
|
||||||
player thread PlayerTrackingOnInterval();
|
player thread PlayerTrackingOnInterval();
|
||||||
|
|
||||||
// only toggle if it's enabled
|
// only toggle if it's enabled
|
||||||
@ -97,6 +99,30 @@ OnPlayerDisconnect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OnPlayerJoinedTeam()
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
self waittill( "joined_team" );
|
||||||
|
// join spec and join team occur at the same moment - out of order logging would be problematic
|
||||||
|
wait( 0.25 );
|
||||||
|
LogPrint( GenerateJoinTeamString( false ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPlayerJoinedSpectators()
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
self waittill( "joined_spectators" );
|
||||||
|
LogPrint( GenerateJoinTeamString( true ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
OnGameEnded()
|
OnGameEnded()
|
||||||
{
|
{
|
||||||
level endon ( "disconnect" );
|
level endon ( "disconnect" );
|
||||||
@ -215,6 +241,37 @@ DecrementClientMeta( metaKey, decrementValue, clientId )
|
|||||||
SetClientMeta( metaKey, decrementValue, clientId, "decrement" );
|
SetClientMeta( metaKey, decrementValue, clientId, "decrement" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GenerateJoinTeamString( isSpectator )
|
||||||
|
{
|
||||||
|
team = self.team;
|
||||||
|
|
||||||
|
if ( IsDefined( self.joining_team ) )
|
||||||
|
{
|
||||||
|
team = self.joining_team;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( isSpectator || !IsDefined( team ) )
|
||||||
|
{
|
||||||
|
team = "spectator";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
guid = self GetXuid();
|
||||||
|
|
||||||
|
if ( guid == "0" )
|
||||||
|
{
|
||||||
|
guid = self.guid;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !IsDefined( guid ) || guid == "0" )
|
||||||
|
{
|
||||||
|
guid = "undefined";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "JT;" + guid + ";" + self getEntityNumber() + ";" + team + ";" + self.name + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
SetClientMeta( metaKey, metaValue, clientId, direction )
|
SetClientMeta( metaKey, metaValue, clientId, direction )
|
||||||
{
|
{
|
||||||
data = "key=" + metaKey + "|value=" + metaValue;
|
data = "key=" + metaKey + "|value=" + metaValue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user