1
0
mirror of https://github.com/ineedbots/iw5_bot_warfare.git synced 2025-09-01 10:37:25 +00:00

the angle update

This commit is contained in:
ineed bots
2024-04-30 01:33:08 -06:00
parent b47088538e
commit 39c6f5054f
5 changed files with 431 additions and 76 deletions

View File

@@ -5628,27 +5628,6 @@ getKillstreakTargetLocation()
return location;
}
/*
Clears remote usage when bot dies
*/
clear_remote_on_death( isac130 )
{
self endon( "bot_clear_remote_on_death" );
level endon( "game_ended" );
self waittill_either( "death", "disconnect" );
if ( isdefined( isac130 ) && isac130 )
{
level.ac130inuse = false;
}
if ( isdefined( self ) )
{
self clearusingremote();
}
}
/*
Bots think to use killstreaks
*/
@@ -5706,6 +5685,11 @@ bot_killstreak_think_loop( data )
self thread BotPressAttack( 0.05 );
}
if ( iskillstreakweapon( curWeap ) )
{
self thread changeToWeapon( self getlastweapon() );
return;
}
useableStreaks = [];
@@ -5898,49 +5882,11 @@ bot_killstreak_think_loop( data )
self BotNotifyBotEvent( "killstreak", "call", streakName, location );
self BotRandomStance();
self setusingremote( "remotemissile" );
self thread clear_remote_on_death();
self BotStopMoving( true );
self changeToWeapon( ksWeap );
if ( !self changeToWeapon( ksWeap ) )
{
self clearusingremote();
self notify( "bot_clear_remote_on_death" );
self BotStopMoving( false );
return;
}
wait 0.05;
self thread changeToWeapon( ksWeap ); // prevent script from changing back
wait 1;
self notify( "bot_clear_remote_on_death" );
wait 3;
self BotStopMoving( false );
if ( self isemped() || self isnuked() )
{
self clearusingremote();
self thread changeToWeapon( curWeap );
return;
}
self BotFreezeControls( true );
self thread maps\mp\killstreaks\_killstreaks::updatekillstreaks();
self maps\mp\killstreaks\_killstreaks::usedkillstreak( streakName, true );
rocket = magicbullet( "remotemissile_projectile_mp", self.origin + ( 0.0, 0.0, 7000.0 - ( self.pers[ "bots" ][ "skill" ][ "base" ] * 400 ) ), location, self );
rocket.lifeid = lifeId;
rocket.type = "remote";
rocket thread maps\mp\gametypes\_weapons::addmissiletosighttraces( self.pers[ "team" ] );
rocket thread maps\mp\killstreaks\_remotemissile::handledamage();
thread maps\mp\killstreaks\_remotemissile::missileeyes( self, rocket );
self waittill( "stopped_using_remote" );
wait 1;
self BotFreezeControls( false );
}
else if ( streakName == "ac130" || streakName == "remote_mortar" || streakName == "osprey_gunner" )
{