aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_english.txtbin20116 -> 20212 bytes
-rw-r--r--Northstar.Custom/mod.json12
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut32
3 files changed, 44 insertions, 0 deletions
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
index 49ec746c..f438b0f7 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
Binary files differ
diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json
index 23132642..7b2ad50d 100644
--- a/Northstar.Custom/mod.json
+++ b/Northstar.Custom/mod.json
@@ -344,6 +344,18 @@
"ServerCallback": {
"After": "DisallowedWeapons_Init"
}
+ },
+
+ {
+ "Path": "sh_custom_pilot_collision.gnut",
+ "RunOn": "( CLIENT || SERVER ) && MP",
+ "ClientCallback": {
+ "After": "CustomPilotCollision_InitPlaylistVars"
+ },
+
+ "ServerCallback": {
+ "After": "CustomPilotCollision_InitPlaylistVars"
+ }
}
],
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut
new file mode 100644
index 00000000..b33a4c02
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut
@@ -0,0 +1,32 @@
+global function CustomPilotCollision_InitPlaylistVars
+
+void function CustomPilotCollision_InitPlaylistVars()
+{
+ AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_PILOT", "no_pilot_collision", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" )
+
+#if SERVER
+ AddCallback_OnPlayerRespawned( SetPilotCollisionFlagsForRespawn )
+ AddCallback_OnPilotBecomesTitan( PilotCollisionOnPilotBecomesTitan )
+ AddCallback_OnTitanBecomesPilot( PilotCollisionOnTitanBecomesPilot )
+#endif
+}
+
+#if SERVER
+void function SetPilotCollisionFlagsForRespawn( entity player )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_BLOCK_WEAPONS
+}
+
+void function PilotCollisionOnPilotBecomesTitan( entity player, entity titan )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_PLAYER
+}
+
+void function PilotCollisionOnTitanBecomesPilot( entity player, entity titan )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_BLOCK_WEAPONS
+}
+#endif \ No newline at end of file