add configs for revenge dialog

This commit is contained in:
vbawol 2016-07-09 09:01:40 -05:00
parent 59934bae10
commit 57930c84a4
2 changed files with 17 additions and 4 deletions

View File

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

View File

@ -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"