From 4c16ed80dd0062875b49a2b273aa74fe12376137 Mon Sep 17 00:00:00 2001 From: He-Man Date: Sat, 1 Apr 2017 17:10:02 +0200 Subject: [PATCH] Make SpawnPoint on Player Pos + Bugfix More accurate to define for Players (bugging through a wall and falling down or hanging stuck in a corner) In EPOCH 0.4, ServerVars was set to [""] in case of wrong _varscount. If you have it on your character, you are not able to set SpawnPoint. SO I added a check, if spawnlocation isequaltype [] --- .../compile/epoch_player/EPOCH_server_makeSP.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_makeSP.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_makeSP.sqf index 41d1cdeb..40338a10 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_makeSP.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_makeSP.sqf @@ -25,10 +25,13 @@ if (alive _jammer) then { _server_vars = _player getVariable["SERVER_VARS", []]; _currentPos = _server_vars param [0,[]]; // invalidate previous position + if (!(_currentPos isequaltype [])) then { + _currentPos = []; + }; if (!(_currentPos isEqualTo []) && {_jammer distance _currentPos > 20}) then { _currentPos = [] }; if (_currentPos isEqualTo []) then { // set position of spawnpoint to players SERVER_VARS - _server_vars set [0, getposATL _jammer]; // 0 = RESPAWN POS + _server_vars set [0, getposATL _player]; // 0 = RESPAWN POS _player setVariable ["SERVER_VARS", _server_vars]; ["Spawnpoint set", 5] remoteExec ['Epoch_message',_player]; }