mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2026-10-18 06:23:25 +00:00
Compare commits
2
Commits
94bf78b364
...
e07fa6ad6d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e07fa6ad6d | ||
|
|
f1a24027d8 |
No files matched your search
@@ -388,6 +388,7 @@ onPlayerConnect()
|
|||||||
player thread connected();
|
player thread connected();
|
||||||
player thread onDeath();
|
player thread onDeath();
|
||||||
player thread watchWeapons();
|
player thread watchWeapons();
|
||||||
|
player thread watchGrenades();
|
||||||
player thread watchVelocity();
|
player thread watchVelocity();
|
||||||
player thread watchVars();
|
player thread watchVars();
|
||||||
player thread doPlayerModelFix();
|
player thread doPlayerModelFix();
|
||||||
@@ -405,6 +406,39 @@ doPlayerModelFix()
|
|||||||
self.bot_model_fix = true;
|
self.bot_model_fix = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CoD2
|
||||||
|
*/
|
||||||
|
watchGrenades()
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
grenadeTypes = getGrenadeTypes();
|
||||||
|
grenadeAmmoCount = [];
|
||||||
|
|
||||||
|
for ( i = 0; i < grenadeTypes.size; i++ )
|
||||||
|
{
|
||||||
|
grenadeAmmoCount[ i ] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
for ( i = 0; i < grenadeTypes.size; i++ )
|
||||||
|
{
|
||||||
|
frac = self getAmmoCount( grenadeTypes[ i ] );
|
||||||
|
oldFrac = grenadeAmmoCount[ i ];
|
||||||
|
grenadeAmmoCount[ i ] = frac;
|
||||||
|
|
||||||
|
if ( frac < oldFrac && isalive( self ) )
|
||||||
|
{
|
||||||
|
self notify( "grenade_fire", undefined, grenadeTypes[ i ] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CoD2
|
CoD2
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1326,7 +1326,7 @@ aim_loop()
|
|||||||
|
|
||||||
if ( self.bot.is_cur_sniper )
|
if ( self.bot.is_cur_sniper )
|
||||||
{
|
{
|
||||||
if ( self.pers[ "bots" ][ "behavior" ][ "quickscope" ] && self.bot.last_fire_time != -1 && gettime() - self.bot.last_fire_time < 1000 )
|
if ( self.pers[ "bots" ][ "behavior" ][ "quickscope" ] && self.bot.last_fire_time != -1 && gettime() - self.bot.last_fire_time < 1250 )
|
||||||
{
|
{
|
||||||
stopAdsOverride = true;
|
stopAdsOverride = true;
|
||||||
}
|
}
|
||||||
@@ -1389,7 +1389,7 @@ aim_loop()
|
|||||||
|
|
||||||
if ( self.bot.is_cur_sniper )
|
if ( self.bot.is_cur_sniper )
|
||||||
{
|
{
|
||||||
if ( self.pers[ "bots" ][ "behavior" ][ "quickscope" ] && self.bot.last_fire_time != -1 && gettime() - self.bot.last_fire_time < 1000 )
|
if ( self.pers[ "bots" ][ "behavior" ][ "quickscope" ] && self.bot.last_fire_time != -1 && gettime() - self.bot.last_fire_time < 1250 )
|
||||||
{
|
{
|
||||||
stopAdsOverride = true;
|
stopAdsOverride = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -676,13 +676,26 @@ start_bot_threads()
|
|||||||
self thread bot_listen_to_steps();
|
self thread bot_listen_to_steps();
|
||||||
self thread bot_uav_think();
|
self thread bot_uav_think();
|
||||||
|
|
||||||
|
// camp and follow
|
||||||
|
if ( getcvarint( "bots_play_camp" ) )
|
||||||
|
{
|
||||||
|
self thread bot_think_follow();
|
||||||
|
self thread bot_think_camp();
|
||||||
|
}
|
||||||
|
|
||||||
if ( getcvarint( "bots_play_nade" ) )
|
if ( getcvarint( "bots_play_nade" ) )
|
||||||
{
|
{
|
||||||
// self thread bot_use_grenade_think();
|
self thread bot_use_grenade_think();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( getcvarint( "bots_play_obj" ) )
|
if ( getcvarint( "bots_play_obj" ) )
|
||||||
{
|
{
|
||||||
|
// self thread bot_hq();
|
||||||
|
|
||||||
|
// self thread bot_sd_defenders();
|
||||||
|
// self thread bot_sd_attackers();
|
||||||
|
|
||||||
|
// self thread bot_cap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1233,3 +1246,483 @@ bot_weapon_think()
|
|||||||
self bot_weapon_think_loop( data );
|
self bot_weapon_think_loop( data );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bot logic for bot determining to follow another player.
|
||||||
|
*/
|
||||||
|
bot_think_follow_loop()
|
||||||
|
{
|
||||||
|
follows = [];
|
||||||
|
distSq = self.pers[ "bots" ][ "skill" ][ "help_dist" ] * self.pers[ "bots" ][ "skill" ][ "help_dist" ];
|
||||||
|
|
||||||
|
for ( i = level.players.size - 1; i >= 0; i-- )
|
||||||
|
{
|
||||||
|
player = level.players[ i ];
|
||||||
|
|
||||||
|
if ( !player IsPlayerModelOK() )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( player == self )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !isalive( player ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( player.team != self.team )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( distancesquared( player.origin, self.origin ) > distSq )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
follows[ follows.size ] = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
toFollow = random( follows );
|
||||||
|
|
||||||
|
if ( !isdefined( toFollow ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
time = randomintrange( 10, 20 );
|
||||||
|
|
||||||
|
self BotNotifyBotEvent( "follow", "start", toFollow, time );
|
||||||
|
|
||||||
|
self thread killFollowAfterTime( time );
|
||||||
|
self followPlayer( toFollow );
|
||||||
|
|
||||||
|
self BotNotifyBotEvent( "follow", "stop", toFollow, time );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bot logic for bot determining to follow another player.
|
||||||
|
*/
|
||||||
|
bot_think_follow()
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait randomintrange( 3, 5 );
|
||||||
|
|
||||||
|
if ( self HasScriptGoal() || self.bot_lock_goal || self HasScriptAimPos() )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( randomint( 100 ) > self.pers[ "bots" ][ "behavior" ][ "follow" ] )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !level.teambased )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
self bot_think_follow_loop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Kills follow when new goal
|
||||||
|
*/
|
||||||
|
watchForFollowNewGoal()
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
self endon( "disconnect" );
|
||||||
|
self endon( "kill_follow_bot" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
self waittill( "new_goal" );
|
||||||
|
|
||||||
|
if ( !isdefined( self.bot_was_follow_script_update ) )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self ClearScriptAimPos();
|
||||||
|
self notify( "kill_follow_bot" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Kills follow when time
|
||||||
|
*/
|
||||||
|
killFollowAfterTime( time )
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
self endon( "disconnect" );
|
||||||
|
self endon( "kill_follow_bot" );
|
||||||
|
|
||||||
|
wait time;
|
||||||
|
|
||||||
|
self ClearScriptGoal();
|
||||||
|
self ClearScriptAimPos();
|
||||||
|
self notify( "kill_follow_bot" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Determine bot to follow a player
|
||||||
|
*/
|
||||||
|
followPlayer( who )
|
||||||
|
{
|
||||||
|
self endon( "kill_follow_bot" );
|
||||||
|
|
||||||
|
self thread watchForFollowNewGoal();
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
if ( !isdefined( who ) || !isalive( who ) )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
self SetScriptAimPos( who.origin + ( 0, 0, 42 ) );
|
||||||
|
myGoal = self GetScriptGoal();
|
||||||
|
|
||||||
|
if ( isdefined( myGoal ) && distancesquared( myGoal, who.origin ) < 64 * 64 )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.bot_was_follow_script_update = true;
|
||||||
|
self SetScriptGoal( who.origin, 32 );
|
||||||
|
waittillframeend;
|
||||||
|
self.bot_was_follow_script_update = undefined;
|
||||||
|
|
||||||
|
self waittill_either( "goal", "bad_path" );
|
||||||
|
}
|
||||||
|
|
||||||
|
self ClearScriptGoal();
|
||||||
|
self ClearScriptAimPos();
|
||||||
|
|
||||||
|
self notify( "kill_follow_bot" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bot logic for bot determining to camp.
|
||||||
|
*/
|
||||||
|
bot_think_camp_loop()
|
||||||
|
{
|
||||||
|
campSpot = getWaypointForIndex( random( self waypointsNear( getWaypointsOfType( "camp" ), 1024 ) ) );
|
||||||
|
|
||||||
|
if ( !isdefined( campSpot ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self SetScriptGoal( campSpot.origin, 16 );
|
||||||
|
|
||||||
|
time = randomintrange( 30, 90 );
|
||||||
|
|
||||||
|
self BotNotifyBotEvent( "camp", "go", campSpot, time );
|
||||||
|
|
||||||
|
ret = self waittill_any_return( "new_goal", "goal", "bad_path" );
|
||||||
|
|
||||||
|
if ( ret != "new_goal" )
|
||||||
|
{
|
||||||
|
self ClearScriptGoal();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ret != "goal" )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self BotNotifyBotEvent( "camp", "start", campSpot, time );
|
||||||
|
|
||||||
|
self thread killCampAfterTime( time );
|
||||||
|
self CampAtSpot( campSpot.origin, campSpot.origin + anglestoforward( campSpot.angles ) * 2048 );
|
||||||
|
|
||||||
|
self BotNotifyBotEvent( "camp", "stop", campSpot, time );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bot logic for bot determining to camp.
|
||||||
|
*/
|
||||||
|
bot_think_camp()
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait randomintrange( 4, 7 );
|
||||||
|
|
||||||
|
if ( self HasScriptGoal() || self.bot_lock_goal || self HasScriptAimPos() )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( randomint( 100 ) > self.pers[ "bots" ][ "behavior" ][ "camp" ] )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
self bot_think_camp_loop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Kills the camping thread when time
|
||||||
|
*/
|
||||||
|
killCampAfterTime( time )
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
self endon( "disconnect" );
|
||||||
|
self endon( "kill_camp_bot" );
|
||||||
|
|
||||||
|
timeleft = 90; // cod2
|
||||||
|
|
||||||
|
while ( time > 0 && timeleft >= 60 )
|
||||||
|
{
|
||||||
|
wait 1;
|
||||||
|
timeleft = 90;
|
||||||
|
time--;
|
||||||
|
}
|
||||||
|
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
self ClearScriptGoal();
|
||||||
|
self ClearScriptAimPos();
|
||||||
|
|
||||||
|
self notify( "kill_camp_bot" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Kills the camping thread when ent gone
|
||||||
|
*/
|
||||||
|
killCampAfterEntGone( ent )
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
self endon( "disconnect" );
|
||||||
|
self endon( "kill_camp_bot" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
if ( !isdefined( ent ) )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self ClearScriptGoal();
|
||||||
|
self ClearScriptAimPos();
|
||||||
|
|
||||||
|
self notify( "kill_camp_bot" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Camps at the spot
|
||||||
|
*/
|
||||||
|
CampAtSpot( origin, anglePos )
|
||||||
|
{
|
||||||
|
self endon( "kill_camp_bot" );
|
||||||
|
|
||||||
|
self SetScriptGoal( origin, 64 );
|
||||||
|
|
||||||
|
if ( isdefined( anglePos ) )
|
||||||
|
{
|
||||||
|
self SetScriptAimPos( anglePos );
|
||||||
|
}
|
||||||
|
|
||||||
|
self waittill( "new_goal" );
|
||||||
|
self ClearScriptAimPos();
|
||||||
|
|
||||||
|
self notify( "kill_camp_bot" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bots thinking of using grenades
|
||||||
|
*/
|
||||||
|
bot_use_grenade_think_loop( data )
|
||||||
|
{
|
||||||
|
if ( data.dofastcontinue )
|
||||||
|
{
|
||||||
|
data.dofastcontinue = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wait randomintrange( 4, 7 );
|
||||||
|
|
||||||
|
chance = self.pers[ "bots" ][ "behavior" ][ "nade" ] / 2;
|
||||||
|
|
||||||
|
if ( chance > 20 )
|
||||||
|
{
|
||||||
|
chance = 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( randomint( 100 ) > chance )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nade = self getValidGrenade();
|
||||||
|
|
||||||
|
if ( !isdefined( nade ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self hasThreat() || self HasScriptAimPos() )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self BotIsFrozen() )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self IsBotFragging() || self IsBotSmoking() )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self isPlantingOrDefusing() )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
loc = undefined;
|
||||||
|
|
||||||
|
if ( !self nearAnyOfWaypoints( 128, getWaypointsOfType( "grenade" ) ) )
|
||||||
|
{
|
||||||
|
nadeWp = getWaypointForIndex( random( self waypointsNear( getWaypointsOfType( "grenade" ), 1024 ) ) );
|
||||||
|
|
||||||
|
myEye = self geteye();
|
||||||
|
|
||||||
|
if ( !isdefined( nadeWp ) || self HasScriptGoal() || self.bot_lock_goal )
|
||||||
|
{
|
||||||
|
traceForward = bullettrace( myEye, myEye + anglestoforward( self getplayerangles() ) * 900, false, self );
|
||||||
|
|
||||||
|
loc = traceForward[ "position" ];
|
||||||
|
dist = distancesquared( self.origin, loc );
|
||||||
|
|
||||||
|
if ( dist < level.bots_mingrenadedistance || dist > level.bots_maxgrenadedistance )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !bullettracepassed( self.origin + ( 0, 0, 5 ), self.origin + ( 0, 0, 2048 ), false, self ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !bullettracepassed( loc + ( 0, 0, 5 ), loc + ( 0, 0, 2048 ), false, self ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
loc += ( 0, 0, dist / 3000 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self BotNotifyBotEvent( "nade", "go", nadeWp, nade );
|
||||||
|
|
||||||
|
self SetScriptGoal( nadeWp.origin, 16 );
|
||||||
|
|
||||||
|
ret = self waittill_any_return( "new_goal", "goal", "bad_path" );
|
||||||
|
|
||||||
|
if ( ret != "new_goal" )
|
||||||
|
{
|
||||||
|
self ClearScriptGoal();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ret != "goal" )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
data.dofastcontinue = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nadeWp = getWaypointForIndex( self getNearestWaypointOfWaypoints( getWaypointsOfType( "grenade" ) ) );
|
||||||
|
loc = nadeWp.origin + anglestoforward( nadeWp.angles ) * 2048;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !isdefined( loc ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self BotNotifyBotEvent( "nade", "start", loc, nade );
|
||||||
|
|
||||||
|
self SetScriptAimPos( loc );
|
||||||
|
self BotStopMoving( true );
|
||||||
|
wait 1;
|
||||||
|
|
||||||
|
time = 0.5;
|
||||||
|
|
||||||
|
self botThrowGrenade( nade, time );
|
||||||
|
|
||||||
|
self ClearScriptAimPos();
|
||||||
|
self BotStopMoving( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bots throw the grenade
|
||||||
|
*/
|
||||||
|
botThrowGrenade( nade, time )
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
self endon( "death" );
|
||||||
|
level endon( "game_ended" );
|
||||||
|
|
||||||
|
if ( !self getammocount( nade ) )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isSecondaryGrenade( nade ) )
|
||||||
|
{
|
||||||
|
self thread BotPressSmoke( time );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self thread BotPressFrag( time );
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = self waittill_any_timeout( 5, "grenade_fire" );
|
||||||
|
|
||||||
|
return ( ret == "grenade_fire" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bots thinking of using grenades
|
||||||
|
*/
|
||||||
|
bot_use_grenade_think()
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
self endon( "death" );
|
||||||
|
level endon( "game_ended" );
|
||||||
|
|
||||||
|
data = spawnstruct();
|
||||||
|
data.dofastcontinue = false;
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
self bot_use_grenade_think_loop( data );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -508,9 +508,9 @@ isInUse()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns a random grenade in the bot's inventory.
|
Get grenades
|
||||||
*/
|
*/
|
||||||
getValidGrenade()
|
getGrenadeTypes()
|
||||||
{
|
{
|
||||||
grenadeTypes = [];
|
grenadeTypes = [];
|
||||||
grenadeTypes[ 0 ] = "frag_grenade_american_mp";
|
grenadeTypes[ 0 ] = "frag_grenade_american_mp";
|
||||||
@@ -522,6 +522,15 @@ getValidGrenade()
|
|||||||
grenadeTypes[ 6 ] = "frag_grenade_german_mp";
|
grenadeTypes[ 6 ] = "frag_grenade_german_mp";
|
||||||
grenadeTypes[ 7 ] = "smoke_grenade_german_mp";
|
grenadeTypes[ 7 ] = "smoke_grenade_german_mp";
|
||||||
|
|
||||||
|
return grenadeTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Returns a random grenade in the bot's inventory.
|
||||||
|
*/
|
||||||
|
getValidGrenade()
|
||||||
|
{
|
||||||
|
grenadeTypes = getGrenadeTypes();
|
||||||
possibles = [];
|
possibles = [];
|
||||||
|
|
||||||
for ( i = 0; i < grenadeTypes.size; i++ )
|
for ( i = 0; i < grenadeTypes.size; i++ )
|
||||||
|
|||||||
@@ -371,8 +371,8 @@ watchSaveWaypointsCommand()
|
|||||||
println( level.waypointcount );
|
println( level.waypointcount );
|
||||||
|
|
||||||
// cod2 fprintln always ends the write with a comma...
|
// cod2 fprintln always ends the write with a comma...
|
||||||
//f = openfile( filename, "write" );
|
f = openfile( filename, "write" );
|
||||||
f = -1;
|
// besure to fix it in post ig
|
||||||
|
|
||||||
if ( f >= 0 )
|
if ( f >= 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user