mirror of
https://github.com/diamante0018/InfectedGSC.git
synced 2025-06-28 23:31:50 +00:00
Style
This commit is contained in:
@ -11,76 +11,83 @@ ANTI_CAMP_RADIUS = 350;
|
||||
|
||||
init()
|
||||
{
|
||||
thread onConnect();
|
||||
thread onConnect();
|
||||
}
|
||||
|
||||
onConnect()
|
||||
{
|
||||
for ( ;; )
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
player thread monitorKillStreak();
|
||||
player thread connected();
|
||||
}
|
||||
for ( ;; )
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
player thread monitorKillStreak();
|
||||
player thread connected();
|
||||
}
|
||||
}
|
||||
|
||||
connected()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
for ( ;; )
|
||||
{
|
||||
self waittill( "spawned_player" );
|
||||
if ( self.pers["team"] != "allies" )
|
||||
self.anti_camp = false;
|
||||
}
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
self waittill( "spawned_player" );
|
||||
|
||||
if ( self.pers["team"] != "allies" )
|
||||
self.anti_camp = false;
|
||||
}
|
||||
}
|
||||
|
||||
startAntiCamp()
|
||||
{
|
||||
assert( self.pers["team"] == "allies" );
|
||||
assert( self.pers["team"] == "allies" );
|
||||
|
||||
level endon( "game_ended" );
|
||||
self endon ( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
self endon ( "disconnect" );
|
||||
|
||||
oldPosition = self.origin;
|
||||
self iPrintLnBold( "^1Run ^:For Your Life^7!" );
|
||||
self scripts\_inf_utils::playLeaderDialog( "pushforward" );
|
||||
for ( ;; )
|
||||
{
|
||||
wait( 7.5 );
|
||||
if ( !self.anti_camp ) return;
|
||||
oldPosition = self.origin;
|
||||
self iPrintLnBold( "^1Run ^:For Your Life^7!" );
|
||||
self scripts\_inf_utils::playLeaderDialog( "pushforward" );
|
||||
|
||||
if ( self isUsingRemote() ) continue;
|
||||
for ( ;; )
|
||||
{
|
||||
wait( 7.5 );
|
||||
|
||||
newPosition = self.origin;
|
||||
if ( !self.anti_camp ) return;
|
||||
|
||||
if ( distance2D( oldPosition, newPosition ) < ANTI_CAMP_RADIUS )
|
||||
{
|
||||
dmg = 80;
|
||||
if ( self.health > 100 ) dmg = 300; // Jugg ?
|
||||
if ( self isUsingRemote() ) continue;
|
||||
|
||||
radiusDamage( newPosition, 36, dmg, dmg * 0.75, undefined, "MOD_TRIGGER_HURT" );
|
||||
self scripts\_inf_utils::playLeaderDialog( "new_positions" );
|
||||
}
|
||||
newPosition = self.origin;
|
||||
|
||||
oldPosition = self.origin;
|
||||
}
|
||||
if ( distance2D( oldPosition, newPosition ) < ANTI_CAMP_RADIUS )
|
||||
{
|
||||
dmg = 80;
|
||||
|
||||
if ( self.health > 100 ) dmg = 300; // Jugg ?
|
||||
|
||||
radiusDamage( newPosition, 36, dmg, dmg * 0.75, undefined, "MOD_TRIGGER_HURT" );
|
||||
self scripts\_inf_utils::playLeaderDialog( "new_positions" );
|
||||
}
|
||||
|
||||
oldPosition = self.origin;
|
||||
}
|
||||
}
|
||||
|
||||
monitorKillStreak()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
self endon ( "disconnect" );
|
||||
for ( ;; )
|
||||
{
|
||||
self waittill( "killed_enemy" );
|
||||
count = self getPlayerData( "killstreaksState", "count" );
|
||||
if ( count > 24 && self.pers["team"] != "axis" )
|
||||
{
|
||||
self.anti_camp = true;
|
||||
self thread startAntiCamp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
level endon( "game_ended" );
|
||||
self endon ( "disconnect" );
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
self waittill( "killed_enemy" );
|
||||
count = self getPlayerData( "killstreaksState", "count" );
|
||||
|
||||
if ( count > 24 && self.pers["team"] != "axis" )
|
||||
{
|
||||
self.anti_camp = true;
|
||||
self thread startAntiCamp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user