aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut9
1 files changed, 9 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut
index cd5b734b..7f356a18 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut
@@ -1593,3 +1593,12 @@ bool function StartsWith( string target, string startsWith )
{
return target.find( startsWith ) == 0
}
+
+void function FindAndRemove( array<entity> arr, entity target )
+{
+ int findIndex = arr.find( target )
+ if ( findIndex != -1 )
+ {
+ arr.remove( findIndex )
+ }
+}