diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-22 16:46:49 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-22 16:46:49 +0000 |
commit | fb32cb1b780c1169a834c951bc0c928199a2b59e (patch) | |
tree | e2435cc869fed0fa3f7c3d187335d2350b8b1e14 /Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut | |
parent | dade102a0d4d14ba5ee560022b8e2f1ddf960977 (diff) | |
download | NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.tar.gz NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.zip |
playtest fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut index 88f1e04c..9b293524 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut @@ -267,7 +267,7 @@ bool function IsSpawnpointValid( entity spawnpoint, int team ) return false } - array<entity> projectiles = GetProjectileArrayEx( "any", TEAM_ANY, TEAM_ANY, spawnpoint.GetOrigin(), 400 ) + array<entity> projectiles = GetProjectileArrayEx( "any", TEAM_ANY, TEAM_ANY, spawnpoint.GetOrigin(), 600 ) foreach ( entity projectile in projectiles ) if ( projectile.GetTeam() != team ) return false @@ -283,13 +283,14 @@ bool function IsSpawnpointValid( entity spawnpoint, int team ) { if ( enemyPlayer.GetTeam() == team || !IsAlive( enemyPlayer ) ) continue + + float dist = 1000.0 + // check fov, constant here is stolen from every other place this is done + if ( VectorDot_PlayerToOrigin( enemyPlayer, spawnpoint.GetOrigin() ) > 0.8 ) + dist /= 0.75 // check distance, constant here is basically arbitrary - if ( Distance( enemyPlayer.GetOrigin(), spawnpoint.GetOrigin() ) > 1000.0 ) - continue - - // check fov, constant here is stolen from every other place this is done - if ( VectorDot_PlayerToOrigin( enemyPlayer, spawnpoint.GetOrigin() ) < 0.8 ) + if ( Distance( enemyPlayer.GetOrigin(), spawnpoint.GetOrigin() ) > dist ) continue // check actual los |