mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-24 09:29:21 +03:00
Move study body back to fn_selfActions
Adding UserActions to players (CAManBase) is not efficient, because the
condition evaluates onEachFrame when you are "inside" that vehicle type.
Also admins usually want to add more custom actions to dead bodies
anyway.
https://community.bistudio.com/wiki/addAction#Syntax
This partially reverts 3aad4b6.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
private["_body","_name","_method","_methodStr","_message","_killingBlow"];
|
||||
|
||||
_body = _this;
|
||||
_body = _this select 3;
|
||||
_name = _body getVariable["bodyName","unknown"];
|
||||
_method = _body getVariable["deathType","unknown"];
|
||||
_methodStr = localize format ["str_death_%1",_method];
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define IS_PZOMBIE (player isKindOf "PZombie_VB")
|
||||
|
||||
/*
|
||||
(['StudyBody',this] call userActionConditions)
|
||||
(['Butcher',this] call userActionConditions)
|
||||
|
||||
Return - must be true for action to show.
|
||||
*/
|
||||
@@ -17,7 +17,6 @@ _action = _this select 0;
|
||||
_object = _this select 1;
|
||||
|
||||
_show = switch _action do {
|
||||
case "StudyBody": {!IS_ALIVE};
|
||||
case "Butcher": {!IS_ALIVE && !IN_VEHICLE && CAN_DO && !(_object getVariable["meatHarvested",false]) && !IS_PZOMBIE};
|
||||
case "Drink": {!IN_VEHICLE && CAN_DO && !dayz_isSwimming};
|
||||
case "PushPlane": {IS_ALIVE && !IN_VEHICLE && CAN_DO && count crew _object == 0 && !isEngineOn _object && !IS_PZOMBIE};
|
||||
|
||||
Reference in New Issue
Block a user