aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut9
1 files changed, 6 insertions, 3 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut
index 5bf150c0..4956375b 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut
@@ -261,9 +261,12 @@ bool function IsSpawnpointValid( entity spawnpoint, int team )
return false
}
- array<entity> projectiles = GetProjectileArrayEx( "any", TEAM_ANY, TEAM_ANY, spawnpoint.GetOrigin(), 600 )
- foreach ( entity projectile in projectiles )
- if ( projectile.GetTeam() != team )
+ const minEnemyDist = 1000.0 // about 20 meters?
+ // in rsquirrel extend returns null unlike in vanilla squirrel
+ array< entity > spawnBlockers = GetPlayerArrayEx( "any", TEAM_ANY, TEAM_ANY, spawnpoint.GetOrigin(), minEnemyDist )
+ spawnBlockers.extend( GetProjectileArrayEx( "any", TEAM_ANY, TEAM_ANY, spawnpoint.GetOrigin(), minEnemyDist ) )
+ foreach ( entity blocker in spawnBlockers )
+ if ( blocker.GetTeam() != team )
return false
// los check