fixStealthBomberDupe fast_harrier

This commit is contained in:
INeedBots 2021-01-12 18:01:26 -06:00
parent 48d8348a09
commit 23621698c9
5 changed files with 36 additions and 3 deletions

View File

@ -652,3 +652,4 @@ set scr_uav_does_print "1"
// _airstrike // _airstrike
set scr_harrier_duration "30" set scr_harrier_duration "30"
set scr_harrier_fast "1"

View File

@ -652,3 +652,4 @@ set scr_uav_does_print "1"
// _airstrike // _airstrike
set scr_harrier_duration "30" set scr_harrier_duration "30"
set scr_harrier_fast "1"

View File

@ -652,3 +652,4 @@ set scr_uav_does_print "1"
// _airstrike // _airstrike
set scr_harrier_duration "30" set scr_harrier_duration "30"
set scr_harrier_fast "1"

View File

@ -6,6 +6,12 @@
DVAR: DVAR:
- scr_harrier_duration <int> - scr_harrier_duration <int>
45 - (default) amount of seconds a harrier sticks around for 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; #include maps\mp\_utility;
@ -37,7 +43,11 @@ init()
PrecacheMiniMapIcon( "hud_minimap_harrier_red" ); PrecacheMiniMapIcon( "hud_minimap_harrier_red" );
setDvarIfUninitialized( "scr_harrier_duration", 45 ); setDvarIfUninitialized( "scr_harrier_duration", 45 );
setDvarIfUninitialized( "scr_harrier_fast", false );
setDvarIfUninitialized( "scr_fixStealthBomberDupe", false );
level.harrierDuration = getDvarInt( "scr_harrier_duration" ); 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"); level.onfirefx = loadfx ("fire/fire_smoke_trail_L");
@ -250,13 +260,25 @@ doAirstrike( lifeId, origin, yaw, owner, team )
if ( airStrikeType != "harrier" ) if ( airStrikeType != "harrier" )
return; return;
while ( isDefined( harrierEnt ) ) if (isDefined(harrierEnt))
wait ( 0.1 ); harrierEnt waitForHarrierToDie();
level.planes--; level.planes--;
} }
waitForHarrierToDie()
{
self endon("death");
if (level.harrier_fast)
self endon("leaving");
while ( isDefined( self ) )
wait ( 0.1 );
}
clearProgress( delay ) clearProgress( delay )
{ {
wait ( 2.0 ); wait ( 2.0 );
@ -963,6 +985,12 @@ callStrike( lifeId, owner, coord, yaw )
else if ( self.airStrikeType == "stealth" ) 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 ); 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 else //common airstrike
{ {

View File

@ -351,6 +351,8 @@ nukeEffects()
if (!isDefined(chopper)) if (!isDefined(chopper))
break; break;
chopper delete();
} }
level maps\mp\killstreaks\_emp::destroyActiveVehicles( level.nukeInfo.player, false ); level maps\mp\killstreaks\_emp::destroyActiveVehicles( level.nukeInfo.player, false );