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:
ebayShopper
2017-02-21 15:12:41 -05:00
parent 12f59f046c
commit d416ae80ab
8 changed files with 16 additions and 21 deletions

View File

@@ -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];

View File

@@ -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};