From f6c480f1e1c59678a2861eb32699d683bb0b74f1 Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 21 Mar 2013 16:45:08 -0500 Subject: [PATCH] potential fix for swimming in ground still requires spawn debug to be on land due to issues logging in and out on rocks, docks, etc. --- dayz_code/compile/player_checkStealth.sqf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dayz_code/compile/player_checkStealth.sqf b/dayz_code/compile/player_checkStealth.sqf index 3e0571c63..b4974f706 100644 --- a/dayz_code/compile/player_checkStealth.sqf +++ b/dayz_code/compile/player_checkStealth.sqf @@ -29,6 +29,19 @@ if (["pknl",_anim] call fnc_inString) then { if (_anim4 == "aswm") then { _scaleMvmt = 0.3; dayz_isSwimming = true; + + // if surface is not water + _isWater = surfaceIsWater _pos; + if(!_isWater) then { + + // Stops swimming in ground + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + + dayz_isSwimming = false; + }; + + } else { dayz_isSwimming = false; };