mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
Fixes custom maps for harriers
This commit is contained in:
parent
43edbaa930
commit
90c32a5d26
@ -583,3 +583,6 @@ set scr_uav_timeout "30"
|
|||||||
set scr_counter_uav_timeout "30"
|
set scr_counter_uav_timeout "30"
|
||||||
set scr_uav_forceon "0"
|
set scr_uav_forceon "0"
|
||||||
set scr_uav_does_print "1"
|
set scr_uav_does_print "1"
|
||||||
|
|
||||||
|
// _airstrike
|
||||||
|
set scr_harrier_duration "30"
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
/*
|
||||||
|
_airstrike modded
|
||||||
|
Author: INeedGames
|
||||||
|
Date: 09/26/2020
|
||||||
|
|
||||||
|
DVAR:
|
||||||
|
- scr_harrier_duration <int>
|
||||||
|
45 - (default) amount of seconds a harrier sticks around for
|
||||||
|
*/
|
||||||
|
|
||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include maps\mp\killstreaks\_harrier;
|
#include maps\mp\killstreaks\_harrier;
|
||||||
#include maps\mp\gametypes\_hud_util;
|
#include maps\mp\gametypes\_hud_util;
|
||||||
@ -25,6 +35,9 @@ init()
|
|||||||
PrecacheMiniMapIcon( "compass_objpoint_b2_airstrike_enemy" );
|
PrecacheMiniMapIcon( "compass_objpoint_b2_airstrike_enemy" );
|
||||||
PrecacheMiniMapIcon( "hud_minimap_harrier_green" );
|
PrecacheMiniMapIcon( "hud_minimap_harrier_green" );
|
||||||
PrecacheMiniMapIcon( "hud_minimap_harrier_red" );
|
PrecacheMiniMapIcon( "hud_minimap_harrier_red" );
|
||||||
|
|
||||||
|
setDvarIfUninitialized( "scr_harrier_duration", 45 );
|
||||||
|
level.harrierDuration = getDvarInt( "scr_harrier_duration" );
|
||||||
|
|
||||||
|
|
||||||
level.onfirefx = loadfx ("fire/fire_smoke_trail_L");
|
level.onfirefx = loadfx ("fire/fire_smoke_trail_L");
|
||||||
|
@ -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 maps\mp\_utility;
|
||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
|
|
||||||
@ -136,6 +143,15 @@ engageGround()
|
|||||||
self waittill ( "goal" );
|
self waittill ( "goal" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
forceLeaveAfterTime(time)
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
|
||||||
|
wait time;
|
||||||
|
|
||||||
|
self.force_harrier_leave = true;
|
||||||
|
}
|
||||||
|
|
||||||
harrierLeave()
|
harrierLeave()
|
||||||
{
|
{
|
||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
@ -144,6 +160,8 @@ harrierLeave()
|
|||||||
self notify( "leaving" );
|
self notify( "leaving" );
|
||||||
self breakTarget( true );
|
self breakTarget( true );
|
||||||
self notify("stopRand");
|
self notify("stopRand");
|
||||||
|
|
||||||
|
self thread forceLeaveAfterTime(5);
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
@ -152,7 +170,7 @@ harrierLeave()
|
|||||||
pathGoal += ( 0,0,900);
|
pathGoal += ( 0,0,900);
|
||||||
|
|
||||||
leaveTrace = BulletTrace(self.origin, self.origin+(0,0,900), false, self );
|
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;
|
break;
|
||||||
|
|
||||||
wait( 0.10 );
|
wait( 0.10 );
|
||||||
@ -183,7 +201,7 @@ harrierTimer()
|
|||||||
{
|
{
|
||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
maps\mp\gametypes\_hostmigration::waitLongDurationWithHostMigrationPause( 45 );
|
maps\mp\gametypes\_hostmigration::waitLongDurationWithHostMigrationPause( level.harrierDuration );
|
||||||
self harrierLeave();
|
self harrierLeave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user