aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/ai
diff options
context:
space:
mode:
authorRoyalBlue1 <malte.hoermeyer@web.de>2022-05-30 05:01:33 +0200
committerRoyalBlue1 <malte.hoermeyer@web.de>2022-05-30 05:01:33 +0200
commitc4a807ce87c9be6f6a453d1e8deb4876630531bf (patch)
tree4e9d6a864f5cd90b2f41f4d8b989c218f16c59b6 /Northstar.CustomServers/mod/scripts/vscripts/ai
parent217f476f7aeeb0bb4a18a534075a979d8e95115b (diff)
downloadNorthstarMods-c4a807ce87c9be6f6a453d1e8deb4876630531bf.tar.gz
NorthstarMods-c4a807ce87c9be6f6a453d1e8deb4876630531bf.zip
Split FD into multiple files
-added dummy wave creation function for all "vanilla" FD maps -reworked event handling to support multiple event threads -tracking more variables for end medals -added debugging function to stationary firing positions
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
+ }
+
+}