mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-04-20 16:45:43 +00:00
a little bit casing
This commit is contained in:
parent
aae66eed8d
commit
bbc83ce54e
@ -76,7 +76,7 @@ bot_give_loadout()
|
||||
self.cac_hat_type = "none";
|
||||
self maps\mp\gametypes\_armor::set_player_model();
|
||||
|
||||
self maps\mp\gametypes\_class::initStaticWeaponsTime();
|
||||
self maps\mp\gametypes\_class::initstaticweaponstime();
|
||||
|
||||
if ( self.pers[ "bot" ][ "class_perk2" ] != "" && GetDvarInt( #"scr_game_perks" ) )
|
||||
{
|
||||
@ -153,7 +153,7 @@ bot_give_loadout()
|
||||
{
|
||||
self GiveWeapon( self.pers[ "bot" ][ "class_equipment" ] );
|
||||
|
||||
self maps\mp\gametypes\_class::setWeaponAmmoOverall( self.pers[ "bot" ][ "class_equipment" ], 1 );
|
||||
self maps\mp\gametypes\_class::setweaponammooverall( self.pers[ "bot" ][ "class_equipment" ], 1 );
|
||||
|
||||
self SetActionSlot( 1, "weapon", self.pers[ "bot" ][ "class_equipment" ] );
|
||||
}
|
||||
@ -221,7 +221,7 @@ bot_get_prestige()
|
||||
continue;
|
||||
}
|
||||
|
||||
p = player maps\mp\gametypes\_persistence::statGet( "plevel" );
|
||||
p = player maps\mp\gametypes\_persistence::statget( "plevel" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -247,7 +247,7 @@ bot_rank()
|
||||
wait 0.05;
|
||||
|
||||
self.pers[ "rankxp" ] = self.pers[ "bot" ][ "rankxp" ];
|
||||
rankId = self maps\mp\gametypes\_rank::getRankForXp( self.pers[ "bot" ][ "rankxp" ] );
|
||||
rankId = self maps\mp\gametypes\_rank::getrankforxp( self.pers[ "bot" ][ "rankxp" ] );
|
||||
prestige = self.pers[ "bot" ][ "prestige" ];
|
||||
|
||||
self.pers[ "rank" ] = rankId;
|
||||
@ -287,7 +287,7 @@ bot_set_class()
|
||||
|
||||
self.pers[ "bot" ][ "cod_points" ] = self.pers[ "bot" ][ "cod_points_org" ]; // refund prev payments for class
|
||||
|
||||
rank = self maps\mp\gametypes\_rank::getRankForXp( self.pers[ "bot" ][ "rankxp" ] );
|
||||
rank = self maps\mp\gametypes\_rank::getrankforxp( self.pers[ "bot" ][ "rankxp" ] );
|
||||
|
||||
if ( !level.onlineGame )
|
||||
{
|
||||
@ -1345,7 +1345,7 @@ bot_get_rank()
|
||||
rank = Round( random_normal_distribution( rank_dvar, 5, 0, level.maxRank ) );
|
||||
}
|
||||
|
||||
self.pers[ "bot" ][ "rankxp" ] = maps\mp\gametypes\_rank::getRankInfoMinXP( rank );
|
||||
self.pers[ "bot" ][ "rankxp" ] = maps\mp\gametypes\_rank::getrankinfominxp( rank );
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1359,7 +1359,7 @@ bot_setKillstreaks()
|
||||
allowed_killstreaks[ 1 ] = "killstreak_supply_drop";
|
||||
allowed_killstreaks[ 2 ] = "killstreak_helicopter_comlink";
|
||||
|
||||
if ( self maps\mp\gametypes\_rank::getRankForXp( self.pers[ "bot" ][ "rankxp" ] ) >= 9 || !level.onlineGame )
|
||||
if ( self maps\mp\gametypes\_rank::getrankforxp( self.pers[ "bot" ][ "rankxp" ] ) >= 9 || !level.onlineGame )
|
||||
{
|
||||
allowed_killstreaks[ 3 ] = "killstreak_auto_turret_drop";
|
||||
allowed_killstreaks[ 4 ] = "killstreak_tow_turret_drop";
|
||||
@ -1392,7 +1392,7 @@ bot_setKillstreaks()
|
||||
|
||||
allowed_killstreaks = array_remove( allowed_killstreaks, killstreak );
|
||||
|
||||
ks_level = maps\mp\gametypes\_hardpoints::GetKillstreakLevel( i, killstreak );
|
||||
ks_level = maps\mp\gametypes\_hardpoints::getkillstreaklevel( i, killstreak );
|
||||
|
||||
if ( bot_killstreak_level_is_used( ks_level, used_levels ) )
|
||||
{
|
||||
|
@ -113,14 +113,14 @@ classWatch()
|
||||
|
||||
wait 0.5;
|
||||
|
||||
if ( !maps\mp\gametypes\_globallogic_utils::isValidClass( self.class ) || !isDefined( self.bot_change_class ) )
|
||||
if ( !maps\mp\gametypes\_globallogic_utils::isvalidclass( self.class ) || !isDefined( self.bot_change_class ) )
|
||||
{
|
||||
self notify( "menuresponse", game[ "menu_changeclass" ], self chooseRandomClass() );
|
||||
}
|
||||
|
||||
self.bot_change_class = true;
|
||||
|
||||
while ( isdefined( self.pers[ "team" ] ) && maps\mp\gametypes\_globallogic_utils::isValidClass( self.class ) && isDefined( self.bot_change_class ) )
|
||||
while ( isdefined( self.pers[ "team" ] ) && maps\mp\gametypes\_globallogic_utils::isvalidclass( self.class ) && isDefined( self.bot_change_class ) )
|
||||
{
|
||||
wait .05;
|
||||
}
|
||||
@ -1255,23 +1255,23 @@ bot_killstreak_think_loop()
|
||||
return;
|
||||
}
|
||||
|
||||
weapon = self maps\mp\gametypes\_hardpoints::getTopKillstreak();
|
||||
weapon = self maps\mp\gametypes\_hardpoints::gettopkillstreak();
|
||||
|
||||
if ( !IsDefined( weapon ) || weapon == "none" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
killstreak = maps\mp\gametypes\_hardpoints::getKillStreakMenuName( weapon );
|
||||
killstreak = maps\mp\gametypes\_hardpoints::getkillstreakmenuname( weapon );
|
||||
|
||||
if ( !IsDefined( killstreak ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
id = self maps\mp\gametypes\_hardpoints::getTopKillstreakUniqueId();
|
||||
id = self maps\mp\gametypes\_hardpoints::gettopkillstreakuniqueid();
|
||||
|
||||
if ( !self maps\mp\_killstreakrules::isKillstreakAllowed( weapon, myteam ) )
|
||||
if ( !self maps\mp\_killstreakrules::iskillstreakallowed( weapon, myteam ) )
|
||||
{
|
||||
wait( 5 );
|
||||
return;
|
||||
@ -1724,7 +1724,7 @@ bot_turret_think_loop()
|
||||
facing = false;
|
||||
}
|
||||
|
||||
if ( turret maps\mp\gametypes\_weaponobjects::isStunned() )
|
||||
if ( turret maps\mp\gametypes\_weaponobjects::isstunned() )
|
||||
{
|
||||
facing = false;
|
||||
}
|
||||
@ -1993,7 +1993,7 @@ bot_equipment_kill_think_loop()
|
||||
{
|
||||
facing = false;
|
||||
|
||||
if ( isDefined( target.name ) && target.name == "claymore_mp" && !target maps\mp\gametypes\_weaponobjects::isStunned() )
|
||||
if ( isDefined( target.name ) && target.name == "claymore_mp" && !target maps\mp\gametypes\_weaponobjects::isstunned() )
|
||||
{
|
||||
if ( VectorDot( VectorNormalize( AnglesToForward( target.angles ) ), VectorNormalize( self.origin - target.origin ) ) >= 0.342 ) // cos 70 degrees
|
||||
{
|
||||
@ -3334,7 +3334,7 @@ bot_weapon_think_loop( data )
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( !maps\mp\gametypes\_weapons::isPrimaryWeapon( weapon ) && !maps\mp\gametypes\_weapons::isSideArm( weapon ) && !isWeaponAltmode( weapon ) )
|
||||
if ( !maps\mp\gametypes\_weapons::isprimaryweapon( weapon ) && !maps\mp\gametypes\_weapons::issidearm( weapon ) && !isWeaponAltmode( weapon ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -3544,7 +3544,7 @@ bot_uav_think_loop( data )
|
||||
|
||||
if ( hasCam )
|
||||
{
|
||||
if ( !self.cameraSpike maps\mp\gametypes\_weaponobjects::isStunned() && !self HasScriptGoal() && !self.bot_lock_goal && !player hasPerk( "specialty_nottargetedbyai" ) )
|
||||
if ( !self.cameraSpike maps\mp\gametypes\_weaponobjects::isstunned() && !self HasScriptGoal() && !self.bot_lock_goal && !player hasPerk( "specialty_nottargetedbyai" ) )
|
||||
{
|
||||
if ( VectorDot( VectorNormalize( AnglesToForward( self.cameraSpike.cameraHead.angles ) ), VectorNormalize( player.origin - self.cameraSpike.origin ) ) >= 0.342 && SightTracePassed( player.origin + ( 0, 0, 5 ), self.cameraSpike.origin + ( 0, 0, 5 ), false, self.cameraSpike ) ) // cos 70 degrees
|
||||
{
|
||||
@ -3562,7 +3562,7 @@ bot_uav_think_loop( data )
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( hasSR || ( !isSubStr( player getCurrentWeapon(), "_silencer_" ) && player.bot_firing ) || ( hasUAV && !player hasPerk( "specialty_gpsjammer" ) ) || ( isDefined( self.acousticSensor ) && !self.acousticSensor maps\mp\gametypes\_weaponobjects::isStunned() && !player hasPerk( "specialty_nomotionsensor" ) && distance2d( self.acousticSensor.origin, player.origin ) < 666 ) )
|
||||
else if ( hasSR || ( !isSubStr( player getCurrentWeapon(), "_silencer_" ) && player.bot_firing ) || ( hasUAV && !player hasPerk( "specialty_gpsjammer" ) ) || ( isDefined( self.acousticSensor ) && !self.acousticSensor maps\mp\gametypes\_weaponobjects::isstunned() && !player hasPerk( "specialty_nomotionsensor" ) && distance2d( self.acousticSensor.origin, player.origin ) < 666 ) )
|
||||
{
|
||||
self BotNotifyBotEvent( "uav_target", "start", player );
|
||||
|
||||
@ -3873,14 +3873,14 @@ bot_dom_spawn_kill_think_loop()
|
||||
{
|
||||
myTeam = self.pers[ "team" ];
|
||||
otherTeam = getOtherTeam( myTeam );
|
||||
myFlagCount = maps\mp\gametypes\dom::getTeamFlagCount( myTeam );
|
||||
myFlagCount = maps\mp\gametypes\dom::getteamflagcount( myTeam );
|
||||
|
||||
if ( myFlagCount == level.flags.size )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
otherFlagCount = maps\mp\gametypes\dom::getTeamFlagCount( otherTeam );
|
||||
otherFlagCount = maps\mp\gametypes\dom::getteamflagcount( otherTeam );
|
||||
|
||||
if ( myFlagCount <= otherFlagCount || otherFlagCount != 1 )
|
||||
{
|
||||
@ -3891,7 +3891,7 @@ bot_dom_spawn_kill_think_loop()
|
||||
|
||||
for ( i = 0; i < level.flags.size; i++ )
|
||||
{
|
||||
if ( level.flags[ i ] maps\mp\gametypes\dom::getFlagTeam() == myTeam )
|
||||
if ( level.flags[ i ] maps\mp\gametypes\dom::getflagteam() == myTeam )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -3974,7 +3974,7 @@ bot_dom_watch_flags( count, myTeam )
|
||||
{
|
||||
wait 0.5;
|
||||
|
||||
if ( maps\mp\gametypes\dom::getTeamFlagCount( myTeam ) != count )
|
||||
if ( maps\mp\gametypes\dom::getteamflagcount( myTeam ) != count )
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -3993,7 +3993,7 @@ bot_dom_def_think_loop()
|
||||
|
||||
for ( i = 0; i < level.flags.size; i++ )
|
||||
{
|
||||
if ( level.flags[ i ] maps\mp\gametypes\dom::getFlagTeam() != myTeam )
|
||||
if ( level.flags[ i ] maps\mp\gametypes\dom::getflagteam() != myTeam )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -4085,7 +4085,7 @@ bot_dom_watch_for_flashing( flag, myTeam )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( flag maps\mp\gametypes\dom::getFlagTeam() != myTeam || !flag.useObj.objPoints[ myTeam ].isFlashing )
|
||||
if ( flag maps\mp\gametypes\dom::getflagteam() != myTeam || !flag.useObj.objPoints[ myTeam ].isFlashing )
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -4102,14 +4102,14 @@ bot_dom_cap_think_loop()
|
||||
myTeam = self.pers[ "team" ];
|
||||
otherTeam = getOtherTeam( myTeam );
|
||||
|
||||
myFlagCount = maps\mp\gametypes\dom::getTeamFlagCount( myTeam );
|
||||
myFlagCount = maps\mp\gametypes\dom::getteamflagcount( myTeam );
|
||||
|
||||
if ( myFlagCount == level.flags.size )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
otherFlagCount = maps\mp\gametypes\dom::getTeamFlagCount( otherTeam );
|
||||
otherFlagCount = maps\mp\gametypes\dom::getteamflagcount( otherTeam );
|
||||
|
||||
if ( game[ "teamScores" ][ myteam ] >= game[ "teamScores" ][ otherTeam ] )
|
||||
{
|
||||
@ -4141,7 +4141,7 @@ bot_dom_cap_think_loop()
|
||||
|
||||
for ( i = 0; i < level.flags.size; i++ )
|
||||
{
|
||||
if ( level.flags[ i ] maps\mp\gametypes\dom::getFlagTeam() == myTeam )
|
||||
if ( level.flags[ i ] maps\mp\gametypes\dom::getflagteam() == myTeam )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -4193,7 +4193,7 @@ bot_dom_cap_think_loop()
|
||||
|
||||
self SetBotGoal( self.origin, 64 );
|
||||
|
||||
while ( flag maps\mp\gametypes\dom::getFlagTeam() != myTeam && self isTouching( flag ) )
|
||||
while ( flag maps\mp\gametypes\dom::getflagteam() != myTeam && self isTouching( flag ) )
|
||||
{
|
||||
cur = flag.useObj.curProgress;
|
||||
wait 0.5;
|
||||
@ -4264,7 +4264,7 @@ bot_dom_go_cap_flag( flag, myteam )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( flag maps\mp\gametypes\dom::getFlagTeam() == myTeam )
|
||||
if ( flag maps\mp\gametypes\dom::getflagteam() == myTeam )
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -4275,7 +4275,7 @@ bot_dom_go_cap_flag( flag, myteam )
|
||||
}
|
||||
}
|
||||
|
||||
if ( flag maps\mp\gametypes\dom::getFlagTeam() == myTeam )
|
||||
if ( flag maps\mp\gametypes\dom::getflagteam() == myTeam )
|
||||
{
|
||||
self notify( "bad_path" );
|
||||
}
|
||||
@ -4535,7 +4535,7 @@ bot_sab_loop()
|
||||
bomb = level.sabBomb;
|
||||
bombteam = bomb.ownerTeam;
|
||||
carrier = bomb.carrier;
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::getTimeRemaining() / 1000;
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::gettimeremaining() / 1000;
|
||||
|
||||
// the bomb is ours, we are on the offence
|
||||
if ( bombteam == myTeam )
|
||||
@ -4613,7 +4613,7 @@ bot_sab_loop()
|
||||
}
|
||||
|
||||
// we are the carrier of the bomb, lets check if we need to plant
|
||||
timepassed = maps\mp\gametypes\_globallogic_utils::getTimePassed() / 1000;
|
||||
timepassed = maps\mp\gametypes\_globallogic_utils::gettimepassed() / 1000;
|
||||
|
||||
if ( timepassed < 120 && timeleft >= 90 && randomInt( 100 ) < 98 )
|
||||
{
|
||||
@ -4878,7 +4878,7 @@ bot_sd_defenders_loop( data )
|
||||
// bomb not planted, lets protect our sites
|
||||
if ( !level.bombPlanted )
|
||||
{
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::getTimeRemaining() / 1000;
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::gettimeremaining() / 1000;
|
||||
|
||||
if ( timeleft >= 90 )
|
||||
{
|
||||
@ -5180,8 +5180,8 @@ bot_sd_attackers_loop( data )
|
||||
return;
|
||||
}
|
||||
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::getTimeRemaining() / 1000;
|
||||
timepassed = maps\mp\gametypes\_globallogic_utils::getTimePassed() / 1000;
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::gettimeremaining() / 1000;
|
||||
timepassed = maps\mp\gametypes\_globallogic_utils::gettimepassed() / 1000;
|
||||
|
||||
// dont have a bomb
|
||||
if ( !self IsBombCarrier() && !level.multiBomb )
|
||||
@ -5389,7 +5389,7 @@ bot_cap_loop()
|
||||
theirflag = level.teamFlags[ otherTeam ];
|
||||
theirzone = level.teamFlagZones[ otherTeam ];
|
||||
|
||||
if ( myflag maps\mp\gametypes\_gameobjects::isObjectAwayFromHome() )
|
||||
if ( myflag maps\mp\gametypes\_gameobjects::isobjectawayfromhome() )
|
||||
{
|
||||
carrier = myflag.carrier;
|
||||
|
||||
@ -5416,7 +5416,7 @@ bot_cap_loop()
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !theirflag maps\mp\gametypes\_gameobjects::isObjectAwayFromHome() && randomint( 100 ) < 50 )
|
||||
if ( !theirflag maps\mp\gametypes\_gameobjects::isobjectawayfromhome() && randomint( 100 ) < 50 )
|
||||
{
|
||||
// take their flag
|
||||
self BotNotifyBotEvent( "cap", "start", "their_flag", theirflag );
|
||||
@ -5760,7 +5760,7 @@ bot_dem_attackers_loop()
|
||||
}
|
||||
}
|
||||
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::getTimeRemaining() / 1000;
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::gettimeremaining() / 1000;
|
||||
|
||||
shouldLet = ( game[ "teamScores" ][ myteam ] > game[ "teamScores" ][ otherTeam ] && timeleft < 90 && bombed == 1 );
|
||||
|
||||
@ -5774,14 +5774,14 @@ bot_dem_attackers_loop()
|
||||
return;
|
||||
}
|
||||
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getSpawnpointArray( "mp_dem_spawn_defender_start" );
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getspawnpointarray( "mp_dem_spawn_defender_start" );
|
||||
|
||||
if ( !spawnPoints.size )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random( spawnPoints );
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getspawnpoint_random( spawnPoints );
|
||||
|
||||
if ( DistanceSquared( spawnpoint.origin, self.origin ) <= 2048 * 2048 )
|
||||
{
|
||||
@ -5805,14 +5805,14 @@ bot_dem_attackers_loop()
|
||||
// or if want to go into overtime near end of the extended game
|
||||
if ( ( ( bombs.size + bombed == 2 && timeleft >= 90 ) || ( shouldLet && bombs.size ) ) && randomInt( 100 ) < 95 )
|
||||
{
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getSpawnpointArray( "mp_dem_spawn_attacker_start" );
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getspawnpointarray( "mp_dem_spawn_attacker_start" );
|
||||
|
||||
if ( !spawnPoints.size )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random( spawnPoints );
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getspawnpoint_random( spawnPoints );
|
||||
|
||||
if ( DistanceSquared( spawnpoint.origin, self.origin ) <= 1024 * 1024 )
|
||||
{
|
||||
@ -6046,7 +6046,7 @@ bot_dem_defenders_loop()
|
||||
}
|
||||
}
|
||||
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::getTimeRemaining() / 1000;
|
||||
timeleft = maps\mp\gametypes\_globallogic_utils::gettimeremaining() / 1000;
|
||||
|
||||
shouldLet = ( timeleft < 60 && ( ( bombed == 0 && bombs.size != 2 ) || ( game[ "teamScores" ][ myteam ] > game[ "teamScores" ][ otherTeam ] && bombed == 1 ) ) && randomInt( 100 ) < 98 );
|
||||
|
||||
@ -6060,14 +6060,14 @@ bot_dem_defenders_loop()
|
||||
return;
|
||||
}
|
||||
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getSpawnpointArray( "mp_dem_spawn_attacker_start" );
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getspawnpointarray( "mp_dem_spawn_attacker_start" );
|
||||
|
||||
if ( !spawnPoints.size )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random( spawnPoints );
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getspawnpoint_random( spawnPoints );
|
||||
|
||||
if ( DistanceSquared( spawnpoint.origin, self.origin ) <= 2048 * 2048 )
|
||||
{
|
||||
@ -6091,14 +6091,14 @@ bot_dem_defenders_loop()
|
||||
// or if want to go into overtime after extended game
|
||||
if ( shouldLet )
|
||||
{
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getSpawnpointArray( "mp_dem_spawn_defender_start" );
|
||||
spawnPoints = maps\mp\gametypes\_spawnlogic::getspawnpointarray( "mp_dem_spawn_defender_start" );
|
||||
|
||||
if ( !spawnPoints.size )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random( spawnPoints );
|
||||
spawnpoint = maps\mp\gametypes\_spawnlogic::getspawnpoint_random( spawnPoints );
|
||||
|
||||
if ( DistanceSquared( spawnpoint.origin, self.origin ) <= 1024 * 1024 )
|
||||
{
|
||||
|
@ -946,7 +946,7 @@ getConeDot( to, from, dir )
|
||||
bot_onUsePlantObjectFix( player )
|
||||
{
|
||||
// planted the bomb
|
||||
if ( !self maps\mp\gametypes\_gameobjects::isFriendlyTeam( player.pers[ "team" ] ) )
|
||||
if ( !self maps\mp\gametypes\_gameobjects::isfriendlyteam( player.pers[ "team" ] ) )
|
||||
{
|
||||
level thread bot_bombPlanted( self, player );
|
||||
player logString( "bomb planted: " + self.label );
|
||||
@ -959,7 +959,7 @@ bot_onUsePlantObjectFix( player )
|
||||
continue;
|
||||
}
|
||||
|
||||
level.bombZones[ index ] maps\mp\gametypes\_gameobjects::disableObject();
|
||||
level.bombZones[ index ] maps\mp\gametypes\_gameobjects::disableobject();
|
||||
}
|
||||
|
||||
thread playSoundOnPlayers( "mus_sd_planted" + "_" + level.teamPostfix[ player.pers[ "team" ] ] );
|
||||
@ -967,7 +967,7 @@ bot_onUsePlantObjectFix( player )
|
||||
// player playSound( "mpl_sd_bomb_plant" );
|
||||
player notify ( "bomb_planted" );
|
||||
|
||||
level thread maps\mp\_popups::DisplayTeamMessageToAll( &"MP_EXPLOSIVES_PLANTED_BY", player );
|
||||
level thread maps\mp\_popups::displayteammessagetoall( &"MP_EXPLOSIVES_PLANTED_BY", player );
|
||||
|
||||
if ( isdefined( player.pers[ "plants" ] ) )
|
||||
{
|
||||
@ -976,11 +976,11 @@ bot_onUsePlantObjectFix( player )
|
||||
}
|
||||
|
||||
player maps\mp\_medals::saboteur();
|
||||
player maps\mp\gametypes\_persistence::statAddWithGameType( "PLANTS", 1 );
|
||||
player maps\mp\gametypes\_persistence::stataddwithgametype( "PLANTS", 1 );
|
||||
|
||||
maps\mp\gametypes\_globallogic_audio::leaderDialog( "bomb_planted" );
|
||||
maps\mp\gametypes\_globallogic_audio::leaderdialog( "bomb_planted" );
|
||||
|
||||
maps\mp\gametypes\_globallogic_score::givePlayerScore( "plant", player );
|
||||
maps\mp\gametypes\_globallogic_score::giveplayerscore( "plant", player );
|
||||
// player thread [[ level.onXPEvent ]]( "plant" );
|
||||
}
|
||||
}
|
||||
@ -990,14 +990,14 @@ bot_onUsePlantObjectFix( player )
|
||||
*/
|
||||
bot_bombPlanted( destroyedObj, player )
|
||||
{
|
||||
maps\mp\gametypes\_globallogic_utils::pauseTimer();
|
||||
maps\mp\gametypes\_globallogic_utils::pausetimer();
|
||||
level.bombPlanted = true;
|
||||
|
||||
destroyedObj.visuals[ 0 ] thread maps\mp\gametypes\_globallogic_utils::playTickingSound( "mpl_sab_ui_suitcasebomb_timer" );
|
||||
destroyedObj.visuals[ 0 ] thread maps\mp\gametypes\_globallogic_utils::playtickingsound( "mpl_sab_ui_suitcasebomb_timer" );
|
||||
// Play suspense music
|
||||
level thread maps\mp\gametypes\sd::bombPlantedMusicDelay();
|
||||
level thread maps\mp\gametypes\sd::bombplantedmusicselay();
|
||||
|
||||
// thread maps\mp\gametypes\_globallogic_audio::actionMusicSet();
|
||||
// thread maps\mp\gametypes\_globallogic_audio::actionmusicset();
|
||||
|
||||
level.tickingObject = destroyedObj.visuals[ 0 ];
|
||||
|
||||
@ -1007,9 +1007,9 @@ bot_bombPlanted( destroyedObj, player )
|
||||
|
||||
if ( !level.multiBomb )
|
||||
{
|
||||
level.sdBomb maps\mp\gametypes\_gameobjects::allowCarry( "none" );
|
||||
level.sdBomb maps\mp\gametypes\_gameobjects::setVisibleTeam( "none" );
|
||||
level.sdBomb maps\mp\gametypes\_gameobjects::setDropped();
|
||||
level.sdBomb maps\mp\gametypes\_gameobjects::allowcarry( "none" );
|
||||
level.sdBomb maps\mp\gametypes\_gameobjects::setvisibleteam( "none" );
|
||||
level.sdBomb maps\mp\gametypes\_gameobjects::setdropped();
|
||||
level.sdBombModel = level.sdBomb.visuals[ 0 ];
|
||||
}
|
||||
else
|
||||
@ -1019,7 +1019,7 @@ bot_bombPlanted( destroyedObj, player )
|
||||
{
|
||||
if ( isDefined( level.players[ index ].carryIcon ) )
|
||||
{
|
||||
level.players[ index ].carryIcon destroyElem();
|
||||
level.players[ index ].carryIcon destroyelem();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1035,44 +1035,44 @@ bot_bombPlanted( destroyedObj, player )
|
||||
level.sdBombModel setModel( "prop_suitcase_bomb" );
|
||||
}
|
||||
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::allowUse( "none" );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::setVisibleTeam( "none" );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::allowuse( "none" );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::setvisibleteam( "none" );
|
||||
/*
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set2DIcon( "friendly", undefined );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set2DIcon( "enemy", undefined );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set3DIcon( "friendly", undefined );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set3DIcon( "enemy", undefined );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set2dicon( "friendly", undefined );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set2dicon( "enemy", undefined );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set3dicon( "friendly", undefined );
|
||||
destroyedObj maps\mp\gametypes\_gameobjects::set3dicon( "enemy", undefined );
|
||||
*/
|
||||
label = destroyedObj maps\mp\gametypes\_gameobjects::getLabel();
|
||||
label = destroyedObj maps\mp\gametypes\_gameobjects::getlabel();
|
||||
|
||||
// create a new object to defuse with.
|
||||
trigger = destroyedObj.bombDefuseTrig;
|
||||
trigger.origin = level.sdBombModel.origin;
|
||||
visuals = [];
|
||||
defuseObject = maps\mp\gametypes\_gameobjects::createUseObject( game[ "defenders" ], trigger, visuals, ( 0, 0, 32 ) );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::allowUse( "friendly" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setUseTime( level.defuseTime );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setUseText( &"MP_DEFUSING_EXPLOSIVE" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setUseHintText( &"PLATFORM_HOLD_TO_DEFUSE_EXPLOSIVES" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setVisibleTeam( "any" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set2DIcon( "friendly", "compass_waypoint_defuse" + label );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set2DIcon( "enemy", "compass_waypoint_defend" + label );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set3DIcon( "friendly", "waypoint_defuse" + label );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set3DIcon( "enemy", "waypoint_defend" + label );
|
||||
defuseObject = maps\mp\gametypes\_gameobjects::createuseobject( game[ "defenders" ], trigger, visuals, ( 0, 0, 32 ) );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::allowuse( "friendly" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setusetime( level.defuseTime );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setusetext( &"MP_DEFUSING_EXPLOSIVE" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setusehinttext( &"PLATFORM_HOLD_TO_DEFUSE_EXPLOSIVES" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::setvisibleteam( "any" );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set2dicon( "friendly", "compass_waypoint_defuse" + label );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set2dicon( "enemy", "compass_waypoint_defend" + label );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set3dicon( "friendly", "waypoint_defuse" + label );
|
||||
defuseObject maps\mp\gametypes\_gameobjects::set3dicon( "enemy", "waypoint_defend" + label );
|
||||
defuseObject.label = label;
|
||||
defuseObject.onBeginUse = maps\mp\gametypes\sd::onBeginUse;
|
||||
defuseObject.onEndUse = maps\mp\gametypes\sd::onEndUse;
|
||||
defuseObject.onUse = maps\mp\gametypes\sd::onUseDefuseObject;
|
||||
defuseObject.onBeginUse = maps\mp\gametypes\sd::onbeginuse;
|
||||
defuseObject.onEndUse = maps\mp\gametypes\sd::onenduse;
|
||||
defuseObject.onUse = maps\mp\gametypes\sd::onusedefuseobject;
|
||||
defuseObject.useWeapon = "briefcase_bomb_defuse_mp";
|
||||
|
||||
level.defuseObject = defuseObject; // every cod...
|
||||
|
||||
player.isBombCarrier = false;
|
||||
|
||||
maps\mp\gametypes\sd::BombTimerWait();
|
||||
maps\mp\gametypes\sd::bombtimerwait();
|
||||
setMatchFlag( "bomb_timer", 0 );
|
||||
|
||||
destroyedObj.visuals[ 0 ] maps\mp\gametypes\_globallogic_utils::stopTickingSound();
|
||||
destroyedObj.visuals[ 0 ] maps\mp\gametypes\_globallogic_utils::stoptickingsound();
|
||||
|
||||
if ( level.gameEnded || level.bombDefused )
|
||||
{
|
||||
@ -1089,9 +1089,9 @@ bot_bombPlanted( destroyedObj, player )
|
||||
if ( isdefined( player ) )
|
||||
{
|
||||
destroyedObj.visuals[ 0 ] radiusDamage( explosionOrigin, 512, 200, 20, player, "MOD_EXPLOSIVE", "briefcase_bomb_mp" );
|
||||
level thread maps\mp\_popups::DisplayTeamMessageToAll( &"MP_EXPLOSIVES_BLOWUP_BY", player );
|
||||
level thread maps\mp\_popups::displayteammessagetoall( &"MP_EXPLOSIVES_BLOWUP_BY", player );
|
||||
player maps\mp\_medals::bomber();
|
||||
player maps\mp\gametypes\_persistence::statAddWithGameType( "DESTRUCTIONS", 1 );
|
||||
player maps\mp\gametypes\_persistence::stataddwithgametype( "DESTRUCTIONS", 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1112,14 +1112,14 @@ bot_bombPlanted( destroyedObj, player )
|
||||
|
||||
for ( index = 0; index < level.bombZones.size; index++ )
|
||||
{
|
||||
level.bombZones[ index ] maps\mp\gametypes\_gameobjects::disableObject();
|
||||
level.bombZones[ index ] maps\mp\gametypes\_gameobjects::disableobject();
|
||||
}
|
||||
|
||||
defuseObject maps\mp\gametypes\_gameobjects::disableObject();
|
||||
defuseObject maps\mp\gametypes\_gameobjects::disableobject();
|
||||
|
||||
setGameEndTime( 0 );
|
||||
setgameendtime( 0 );
|
||||
|
||||
wait 3;
|
||||
|
||||
maps\mp\gametypes\sd::sd_endGame( game[ "attackers" ], game[ "strings" ][ "target_destroyed" ] );
|
||||
maps\mp\gametypes\sd::sd_endgame( game[ "attackers" ], game[ "strings" ][ "target_destroyed" ] );
|
||||
}
|
||||
|
@ -1076,7 +1076,7 @@ scramble_nearby( trig )
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( self maps\mp\gametypes\_weaponobjects::isStunned() )
|
||||
if ( self maps\mp\gametypes\_weaponobjects::isstunned() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user