mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Should improve client FPS while still allowing conditions and scripts to be customized. Some special vehicles like MV22, UH1Y, etc. have UserActions overwritten in their configs, so please let me know if you find any others that do not get the option to repair or salvage because UserActions is overwritten in their config. I think I got them all. Vanilla commits:a8c4238c0c350d73abe1
22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
#define CAN_DO (!r_drag_sqf && !r_player_unconscious && getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder") != 1)
|
|
#define HAS_TOOLBOX ("ItemToolbox" in items player)
|
|
#define IN_VEHICLE (vehicle player != player)
|
|
#define IS_ALIVE (damage _object < 1)
|
|
#define IS_BIKE (_object isKindOf "Bicycle")
|
|
#define IS_PZOMBIE (player isKindOf "PZombie_VB")
|
|
|
|
private ["_action","_object","_show"];
|
|
|
|
_action = _this select 0;
|
|
_object = _this select 1;
|
|
|
|
_show = switch _action do {
|
|
case "Butcher": {!IS_ALIVE && !IN_VEHICLE && CAN_DO && !(_object getVariable["meatHarvested",false]) && !IS_PZOMBIE};
|
|
case "PushPlane": {IS_ALIVE && !IN_VEHICLE && CAN_DO && count crew _object == 0 && !isEngineOn _object && !IS_PZOMBIE};
|
|
case "Repair": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX};
|
|
case "Salvage": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX && !IS_BIKE && (DZE_salvageLocked or !locked _object)};
|
|
case "StudyBody": {!IS_ALIVE && !IN_VEHICLE && !(_object isKindOf "zZombie_base")};
|
|
default {false};
|
|
};
|
|
|
|
_show |