aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/ai
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/ai')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_titans.gnut8
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stationary_firing_positions.gnut38
2 files changed, 41 insertions, 5 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_titans.gnut b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_titans.gnut
index 08598808..fe46aac5 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_titans.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_titans.gnut
@@ -100,14 +100,14 @@ void function MortarMissileThink( entity missile, entity weaponOwner )
{
float frac = min( 1, pow( ( Time() - startTime ) / estTravelTime, 2.0 ) )
- if ( frac > 1.0 )
- break
+ if ( frac > 1.0 )
+ break
float homingSpeed = GraphCapped( frac, 0, 1, homingSpeedMin, homingSpeedMax )
- missile.SetHomingSpeeds( homingSpeed, 0 )
+ missile.SetHomingSpeeds( homingSpeed, 0 )
- wait 0.25
+ wait 0.25
}
missile.ClearMissileTargetPosition()
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stationary_firing_positions.gnut b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stationary_firing_positions.gnut
index 50b6cc75..2e7c938e 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stationary_firing_positions.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stationary_firing_positions.gnut
@@ -5,6 +5,7 @@ global function GetRandomStationaryPosition
global function GetClosestAvailableStationaryPosition
global function ClaimStationaryAIPosition
global function ReleaseStationaryAIPosition
+global function DebugDrawStationaryAiPositions
global enum eStationaryAIPositionTypes
{
@@ -258,4 +259,39 @@ int function DistanceCompareClosestForStationaryAIPosition( ArrayDistanceEntryFo
return -1
return 0;
-} \ No newline at end of file
+}
+
+
+void function DebugDrawStationaryAiPositions(int typeMask){
+ thread DebugDrawStationaryAiPositions_thread(typeMask)
+}
+
+
+void function DebugDrawStationaryAiPositions_thread(int typeMask)
+{ while(true)
+ {
+ for(int i = 0;i<4;i++){
+ if((1<<i)&typeMask)
+ foreach(StationaryAIPosition a in file.stationaryPositions[i])
+ {
+ switch(i){
+ case 0:
+ DebugDrawSphere(a.origin,50,255,255,0,false,0.2)
+ case 1:
+ DebugDrawSphere(a.origin,50,0,255,255,false,0.2)
+ case 2:
+ DebugDrawSphere(a.origin,50,0,0,255,false,0.2)
+ case 3:
+ DebugDrawSphere(a.origin,50,255,0,255,false,0.2)
+ }
+ if(a.inUse){
+ DebugDrawSphere(a.origin,40,255,0,0,false,0.2)
+ }else{
+ DebugDrawSphere(a.origin,40,0,255,0,false,0.2)
+ }
+ }
+ }
+ wait 0.1
+ }
+
+}