From 57930c84a4a20f997f8666a127a3262af3648d51 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sat, 9 Jul 2016 09:01:40 -0500 Subject: [PATCH] add configs for revenge dialog --- .../compile/functions/EPOCH_fnc_playerDeath.sqf | 16 ++++++++++++---- Sources/epoch_config/Configs/CfgEpochClient.hpp | 5 +++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf index f0a63744..eb458b3e 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf @@ -22,9 +22,14 @@ Returns: BOOL */ -private _tapDiag = "TapOut"; -private _doRevenge = false; -params ["_unit", "_killer"]; +private ["_playerDeathScreen","_playerKilledScreen","_tapDiag","_config","_doRevenge"]; +params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]]]; + +_config = 'CfgEpochClient' call EPOCH_returnConfig; +_playerDeathScreen = getText(_config >> "playerDeathScreen") +if (_playerDeathScreen isEqualTo "") then {_playerDeathScreen = "TapOut"}; +_tapDiag = _playerDeathScreen; +_doRevenge = (getNumber(_config >> "playerDisableRevenge") isEqualTo 0); // test ejecting unit from vehicle if dead client side if (vehicle _unit != _unit) then { @@ -38,7 +43,10 @@ EPOCH_buildMode = 0; EPOCH_snapDirection = 0; EPOCH_Target = objNull; -if(player != _killer && (isPlayer _killer || isPlayer (effectiveCommander _killer)))then{_tapDiag = "TapOut2";};//TODO: vehicle check may not always be reliable +// playerKilledScreen +_playerKilledScreen = getText(_config >> "playerKilledScreen") +if (_playerKilledScreen isEqualTo "") then {_playerKilledScreen = "TapOut2"}; +if(_doRevenge && player != _killer && (isPlayer _killer || isPlayer (effectiveCommander _killer)))then{_tapDiag = _playerKilledScreen};//TODO: vehicle check may not always be reliable if (Epoch_canBeRevived) then { setPlayerRespawnTime 600; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index 3ec7430e..53a795bc 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -98,6 +98,11 @@ class CfgEpochClient // Fishing loots fishLoots[] = {"ItemTuna","ItemSeaBass","ItemSeaBass","ItemSeaBass","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout"}; + // Player specific configs + playerDeathScreen = "TapOut"; + playerKilledScreen = "TapOut2"; + playerDisableRevenge = 0; // 1 = invoke playerKilledScreen when killed by another player. + // include configs #include "CfgEpochClient\Altis.hpp" #include "CfgEpochClient\australia.hpp"