From 563cfb3c3d83cfd9251a7c376b50691ccd8932e0 Mon Sep 17 00:00:00 2001 From: Diavolo Date: Thu, 30 Jun 2022 18:52:23 +0200 Subject: [PATCH] Fixup radar --- iw4x/iw4x_00/maps/mp/oilrig.gsc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/iw4x/iw4x_00/maps/mp/oilrig.gsc b/iw4x/iw4x_00/maps/mp/oilrig.gsc index 7ce6ff8..c202a0e 100644 --- a/iw4x/iw4x_00/maps/mp/oilrig.gsc +++ b/iw4x/iw4x_00/maps/mp/oilrig.gsc @@ -8,12 +8,12 @@ main() game[ "attackers" ] = "allies"; game[ "defenders" ] = "axis"; - maps\mp\_compass::setupMiniMap( "compass_map_oilrig_lvl_1" ); - maps\mp\_compass::setupMiniMap( "compass_map_oilrig_lvl_2" ); maps\mp\_compass::setupMiniMap( "compass_map_oilrig_lvl_3" ); setDvar( "compassMaxRange", 4000.0 ); + array_thread( getentarray( "compassTriggers", "targetname" ), ::compass_triggers_think ); + thread level_think(); thread custom_kill_trigger(); @@ -21,6 +21,17 @@ main() thread killTrigger( ( 1020, 175, -80 ), 110, 250 ); } +compass_triggers_think() +{ + assertEx( isDefined( self.script_noteworthy ), "compassTrigger at " + self.origin + " needs to have a script_noteworthy with the name of the minimap to use" ); + + while ( true ) + { + self waittill( "trigger" ); + maps\mp\_compass::setupMiniMap( self.script_noteworthy ); + } +} + level_think() { /*