mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Send dayz_playerName as array
This avoids triggering PV value restrictions when the player has keywords or special characters in their name.
This commit is contained in:
@@ -1,52 +1,10 @@
|
||||
// (c) facoptere@gmail.com, licensed to DayZMod for the community
|
||||
|
||||
private ["_count","_anim","_weapon","_sprint","_stance","_transmove","_start","_timeout","_short","_sandLevel","_veh","_disableHdlr", "_speed"];
|
||||
private ["_count","_anim","_weapon","_sprint","_stance","_transmove","_start","_timeout","_short","_sandLevel","_veh","_disableHdlr","_speed"];
|
||||
|
||||
if (r_player_unconsciousInProgress) exitWith {};
|
||||
r_player_unconsciousInProgress = true;
|
||||
|
||||
/*
|
||||
_anim = toArray animationState player;
|
||||
_weapon = if (count _anim <= 17) then { 0 } else {
|
||||
switch (_anim select 17) do {
|
||||
case 114 : { 2 }; // rifle
|
||||
case 112 : { 1 }; // pistol
|
||||
default { 0 }; // bare hands / flare
|
||||
}
|
||||
};
|
||||
_sprint = if (count _anim <= 10) then { false } else { _anim select 10 in [112, 118] };
|
||||
_stance = if (count _anim <= 5) then { 2 } else {
|
||||
switch (_anim select 5) do {
|
||||
case 107 : { 1 }; // kneel
|
||||
case 112 : { 0 }; // prone
|
||||
default { 2 }; // erected
|
||||
}
|
||||
};
|
||||
|
||||
_transmove = (switch true do {
|
||||
case (player != vehicle player) : {""};
|
||||
case (_stance == 1) : { [ // kneeled
|
||||
"amovpknlmstpsnonwnondnon_amovppnemstpsnonwnondnon", // kneeled stopped bare hands
|
||||
"amovpknlmstpsraswpstdnon_amovppnemstpsraswpstdnon", // kneeled stopped pistol
|
||||
"amovpknlmstpsraswrfldnon_amovppnemstpsraswrfldnon" // kneeled stopped rifle
|
||||
] select _weapon };
|
||||
case (_sprint) : { [ // erected and sprinting
|
||||
"amovpercmsprsnonwnondf_amovppnemstpsnonwnondnon", // erected sprinting with bare hands
|
||||
"amovpercmsprslowwpstdf_amovppnemstpsraswpstdnon", // erected sprinting pistol
|
||||
"amovpercmsprslowwrfldf_amovppnemstpsraswrfldnon" // erected sprinting with rifle
|
||||
] select _weapon };
|
||||
case (_stance == 2) : {([ // erected and not sprinting
|
||||
"amovpercmstpsnonwnondnon_amovppnemstpsnonwnondnon", // erected stoped/walking with bare hands
|
||||
"amovpercmstpsraswpstdnon_amovppnemstpsraswpstdnon", // erected stoped/walking with pistol
|
||||
"amovpercmstpsraswrfldnon_amovppnemstpsraswrfldnon" // erected stoped/walking with rifle
|
||||
] select _weapon)};
|
||||
default {""}; // already prone, or swimming, or onladder
|
||||
});
|
||||
|
||||
//diag_log [ __FILE__, diag_tickTime, "current player move:",toString _anim, "collapse move:",_transmove, "duration:",r_player_timeout ];
|
||||
if (_transmove != "") then { player playmove _transmove; };
|
||||
*/
|
||||
|
||||
_start = diag_tickTime;
|
||||
_timeout = abs r_player_timeout;
|
||||
_short = _timeout < 4;
|
||||
@@ -63,7 +21,8 @@ _sandLevel = ctrlPosition ((uiNamespace getVariable 'DAYZ_GUI_waiting') displayC
|
||||
//diag_log [(diag_tickTime - _start) < _timeout , !r_player_unconscious , alive player ];
|
||||
|
||||
// delay so that the character does not stop before falling:
|
||||
_disableHdlr = [] spawn { uiSleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; };
|
||||
_disableHdlr = [] spawn { uiSleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; };
|
||||
autoRunActive = 0;
|
||||
|
||||
player playAction "CanNotMove";
|
||||
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [2]; "dynamicBlur" ppEffectCommit 0;
|
||||
@@ -87,7 +46,7 @@ while { (diag_tickTime - _start) < _timeout and r_player_unconscious and alive p
|
||||
} else {
|
||||
player action ["eject", _veh];
|
||||
player leaveVehicle _veh;
|
||||
[] spawn { uiSleep 0.1; player switchmove "amovppnemstpsnonwnondnon"; }; // instant prone
|
||||
[] spawn { uiSleep 0.1; player playMoveNow "amovppnemstpsnonwnondnon"; }; // instant prone
|
||||
};
|
||||
};
|
||||
|
||||
@@ -115,7 +74,11 @@ waituntil {scriptDone _disableHdlr};
|
||||
disableUserInput false;
|
||||
r_player_unconsciousInputDisabled = false;
|
||||
4 cutRsc ["default", "PLAIN",1];
|
||||
player switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
||||
|
||||
[nil, player, rSWITCHMOVE, "AinjPpneMstpSnonWnonDnon"] call RE;
|
||||
player SWITCHMOVE "AinjPpneMstpSnonWnonDnon";
|
||||
|
||||
player playMoveNow "AmovPpneMstpSnonWnonDnon_healed";
|
||||
|
||||
10 fadeSound 1;
|
||||
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
|
||||
|
||||
Reference in New Issue
Block a user