diff --git a/main/server.cfg b/main/server.cfg index 0d9e541..6854afd 100644 --- a/main/server.cfg +++ b/main/server.cfg @@ -583,3 +583,6 @@ set scr_uav_timeout "30" set scr_counter_uav_timeout "30" set scr_uav_forceon "0" set scr_uav_does_print "1" + +// _airstrike +set scr_harrier_duration "30" diff --git a/userraw/maps/mp/killstreaks/_airstrike.gsc b/userraw/maps/mp/killstreaks/_airstrike.gsc index 3332274..c3935c7 100644 --- a/userraw/maps/mp/killstreaks/_airstrike.gsc +++ b/userraw/maps/mp/killstreaks/_airstrike.gsc @@ -1,3 +1,13 @@ +/* + _airstrike modded + Author: INeedGames + Date: 09/26/2020 + + DVAR: + - scr_harrier_duration + 45 - (default) amount of seconds a harrier sticks around for +*/ + #include maps\mp\_utility; #include maps\mp\killstreaks\_harrier; #include maps\mp\gametypes\_hud_util; @@ -25,6 +35,9 @@ init() PrecacheMiniMapIcon( "compass_objpoint_b2_airstrike_enemy" ); PrecacheMiniMapIcon( "hud_minimap_harrier_green" ); PrecacheMiniMapIcon( "hud_minimap_harrier_red" ); + + setDvarIfUninitialized( "scr_harrier_duration", 45 ); + level.harrierDuration = getDvarInt( "scr_harrier_duration" ); level.onfirefx = loadfx ("fire/fire_smoke_trail_L"); diff --git a/userraw/maps/mp/killstreaks/_harrier.gsc b/userraw/maps/mp/killstreaks/_harrier.gsc index 4c767b2..4aca96f 100644 --- a/userraw/maps/mp/killstreaks/_harrier.gsc +++ b/userraw/maps/mp/killstreaks/_harrier.gsc @@ -1,3 +1,10 @@ +/* + _harrier modded + Author: INeedGames + Date: 09/26/2020 + Uses the harrier duration, and fixes harrier leaving on custom maps. +*/ + #include maps\mp\_utility; #include common_scripts\utility; @@ -136,6 +143,15 @@ engageGround() self waittill ( "goal" ); } +forceLeaveAfterTime(time) +{ + self endon( "death" ); + + wait time; + + self.force_harrier_leave = true; +} + harrierLeave() { self endon( "death" ); @@ -144,6 +160,8 @@ harrierLeave() self notify( "leaving" ); self breakTarget( true ); self notify("stopRand"); + + self thread forceLeaveAfterTime(5); for ( ;; ) { @@ -152,7 +170,7 @@ harrierLeave() pathGoal += ( 0,0,900); leaveTrace = BulletTrace(self.origin, self.origin+(0,0,900), false, self ); - if( leaveTrace["surfacetype"] == "none" ) + if( leaveTrace["surfacetype"] == "none" || isDefined(self.force_harrier_leave) ) break; wait( 0.10 ); @@ -183,7 +201,7 @@ harrierTimer() { self endon( "death" ); - maps\mp\gametypes\_hostmigration::waitLongDurationWithHostMigrationPause( 45 ); + maps\mp\gametypes\_hostmigration::waitLongDurationWithHostMigrationPause( level.harrierDuration ); self harrierLeave(); }