mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add better animation switch after EVR strom hit a player
This commit is contained in:
@@ -422,9 +422,7 @@ fnc_evr = {
|
|||||||
if (player hasWeapon _tool) then {
|
if (player hasWeapon _tool) then {
|
||||||
if (random 1 <= DZE_EVRDamageItemsChance) then {
|
if (random 1 <= DZE_EVRDamageItemsChance) then {
|
||||||
player removeWeapon _tool;
|
player removeWeapon _tool;
|
||||||
if !(player hasWeapon (_x select 1)) then { // prevent duplicates
|
(_x select 1) call player_addDuplicateTool;
|
||||||
player addWeapon (_x select 1);
|
|
||||||
};
|
|
||||||
_items set [count _items, (getText(configFile >> "CfgWeapons" >> _tool >> "displayName"))];
|
_items set [count _items, (getText(configFile >> "CfgWeapons" >> _tool >> "displayName"))];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -441,8 +439,16 @@ fnc_evr = {
|
|||||||
if (!_hasAPSI) then {
|
if (!_hasAPSI) then {
|
||||||
if (player == vehicle player) then {
|
if (player == vehicle player) then {
|
||||||
uiSleep 10; // 10 second knockout.
|
uiSleep 10; // 10 second knockout.
|
||||||
player switchMove "";
|
[nil, player, rSWITCHMOVE, "AmovPpneMstpSnonWnonDnon_healed"] call RE;
|
||||||
[objNull, player, rSwitchMove, ""] call RE;
|
player SWITCHMOVE "AmovPpneMstpSnonWnonDnon_healed";
|
||||||
|
PVDZ_plr_SwitchMove = [player,"AmovPpneMstpSnonWnonDnon_healed"];
|
||||||
|
publicVariableServer "PVDZ_plr_SwitchMove"; //Needed to execute switchMove on server machine. rSwitchMove only executes on other clients
|
||||||
|
player playMoveNow "AmovPpneMstpSnonWnonDnon_healed";
|
||||||
|
|
||||||
|
if ({getNumber (configFile >> "CfgWeapons" >> _x >> "type") in [1,2]} count (weapons player) > 0) then {
|
||||||
|
//Prevent firing while weapon is still shown on back or holstered. AmovPpneMstpSnonWnonDnon_healed has disableWeapons=0 in config (should be 1)
|
||||||
|
waitUntil {uiSleep 1; !(animationState player in ["ainjppnemstpsnonwnondnon_rolltofront","amovppnemstpsnonwnondnon_healed","amovppnemstpsnonwnondnon"])};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
cutRsc ["RscAPSI_End","PLAIN"];
|
cutRsc ["RscAPSI_End","PLAIN"];
|
||||||
|
|||||||
Reference in New Issue
Block a user