mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
fixStealthBomberDupe fast_harrier
This commit is contained in:
parent
48d8348a09
commit
23621698c9
@ -652,3 +652,4 @@ set scr_uav_does_print "1"
|
||||
|
||||
// _airstrike
|
||||
set scr_harrier_duration "30"
|
||||
set scr_harrier_fast "1"
|
||||
|
@ -652,3 +652,4 @@ set scr_uav_does_print "1"
|
||||
|
||||
// _airstrike
|
||||
set scr_harrier_duration "30"
|
||||
set scr_harrier_fast "1"
|
||||
|
@ -652,3 +652,4 @@ set scr_uav_does_print "1"
|
||||
|
||||
// _airstrike
|
||||
set scr_harrier_duration "30"
|
||||
set scr_harrier_fast "1"
|
||||
|
@ -6,6 +6,12 @@
|
||||
DVAR:
|
||||
- scr_harrier_duration <int>
|
||||
45 - (default) amount of seconds a harrier sticks around for
|
||||
|
||||
- scr_harrier_fast <bool>
|
||||
0 - (default) allow players to call in harrier sooner (as it leaves, instead of being deleted)
|
||||
|
||||
- scr_fixStealthBomberDupe <bool>
|
||||
0 - (default) fixes an issue where queuing harriers and airstrikes, and using a stealth bomber will dupe the stealth bomber airstrike
|
||||
*/
|
||||
|
||||
#include maps\mp\_utility;
|
||||
@ -37,7 +43,11 @@ init()
|
||||
PrecacheMiniMapIcon( "hud_minimap_harrier_red" );
|
||||
|
||||
setDvarIfUninitialized( "scr_harrier_duration", 45 );
|
||||
setDvarIfUninitialized( "scr_harrier_fast", false );
|
||||
setDvarIfUninitialized( "scr_fixStealthBomberDupe", false );
|
||||
level.harrierDuration = getDvarInt( "scr_harrier_duration" );
|
||||
level.harrier_fast = getDvarInt( "scr_harrier_fast" );
|
||||
level.fixStealthBomberDupe = getDvarInt( "scr_fixStealthBomberDupe" );
|
||||
|
||||
|
||||
level.onfirefx = loadfx ("fire/fire_smoke_trail_L");
|
||||
@ -250,13 +260,25 @@ doAirstrike( lifeId, origin, yaw, owner, team )
|
||||
if ( airStrikeType != "harrier" )
|
||||
return;
|
||||
|
||||
while ( isDefined( harrierEnt ) )
|
||||
wait ( 0.1 );
|
||||
if (isDefined(harrierEnt))
|
||||
harrierEnt waitForHarrierToDie();
|
||||
|
||||
level.planes--;
|
||||
}
|
||||
|
||||
|
||||
waitForHarrierToDie()
|
||||
{
|
||||
self endon("death");
|
||||
|
||||
if (level.harrier_fast)
|
||||
self endon("leaving");
|
||||
|
||||
while ( isDefined( self ) )
|
||||
wait ( 0.1 );
|
||||
}
|
||||
|
||||
|
||||
clearProgress( delay )
|
||||
{
|
||||
wait ( 2.0 );
|
||||
@ -963,6 +985,12 @@ callStrike( lifeId, owner, coord, yaw )
|
||||
else if ( self.airStrikeType == "stealth" )
|
||||
{
|
||||
level thread doBomberStrike( lifeId, owner, requiredDeathCount, coord, startPoint+(0,0,randomInt(1000)), endPoint+(0,0,randomInt(1000)), bombTime, flyTime, direction, self.airStrikeType );
|
||||
|
||||
if (level.fixStealthBomberDupe)
|
||||
{
|
||||
wait randomfloatrange( 3.5, 5.5 );
|
||||
maps\mp\gametypes\_hostmigration::waitTillHostMigrationDone();
|
||||
}
|
||||
}
|
||||
else //common airstrike
|
||||
{
|
||||
|
@ -351,6 +351,8 @@ nukeEffects()
|
||||
|
||||
if (!isDefined(chopper))
|
||||
break;
|
||||
|
||||
chopper delete();
|
||||
}
|
||||
|
||||
level maps\mp\killstreaks\_emp::destroyActiveVehicles( level.nukeInfo.player, false );
|
||||
|
Loading…
x
Reference in New Issue
Block a user