Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Revive Fix umstellung #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions addons/OPT/REVIVE/fn_clientInitEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ DFUNC(playercheckINCAPACITATED) =
if ((lifeState GVAR(playerHandleDamage_unit) isEqualTo "INCAPACITATED") and isNil "OPT_REVIVE_unconsciousHandler") then
{
OPT_REVIVE_unconsciousHandler = true;
[GVAR(playerHandleDamage_unit), GVAR(playerHandleDamage_instigator), GVAR(playerHandleDamage_source), GVAR(playerHandleDamage_projectile)] remoteExecCall ["OPT_SHOP_fnc_writeKill", 2, false];

if (GVAR(playerHandleDamage_unit) == GVAR(playerHandleDamage_source)) then
if ((GVAR(playerHandleDamage_unit) == GVAR(playerHandleDamage_source)) or (GVAR(playerHandleDamage_unit) == GVAR(playerHandleDamage_instigator)))then
{
[MLOC(KILL_MSG), MLOC(KILL_SELF)] spawn BIS_fnc_infoText;
[GVAR(playerHandleDamage_unit), GVAR(playerHandleDamage_instigator), GVAR(playerHandleDamage_source), GVAR(playerHandleDamage_projectile)] remoteExecCall ["OPT_SHOP_fnc_writeKill", 2, false];
}
else
{
{
[MLOC(KILL_MSG), format["%1",name GVAR(playerHandleDamage_instigator)]] spawn BIS_fnc_infoText;

[GVAR(playerHandleDamage_unit), GVAR(playerHandleDamage_instigator), GVAR(playerHandleDamage_source), GVAR(playerHandleDamage_projectile)] remoteExecCall ["OPT_SHOP_fnc_writeKill", 2, false];
};

//Funktion starten wenn Spieler bewustlos ist.
Expand All @@ -106,13 +106,13 @@ DFUNC(playercheckINCAPACITATED) =

DFUNC(playerHandleDamage) =
{
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
params ["_unit", "_source", "_damage", "_instigator"];

//Var übergabe
GVAR(playerHandleDamage_unit) = _unit;
GVAR(playerHandleDamage_instigator) = _instigator;
GVAR(playerHandleDamage_source) = _source;
GVAR(playerHandleDamage_projectile) = _projectile;
GVAR(playerHandleDamage_projectile) = "";
GVAR(playerHandleDamage_damage) = _damage;

// Schade hoeher eingestellen Werte Blocken um Autorespwan zu verhindern.
Expand All @@ -129,7 +129,7 @@ DFUNC(playerHandleDamage) =
[FUNC(playercheckINCAPACITATED), 1,""] call CLib_fnc_wait;
};

player addEventHandler ["HandleDamage", FUNC(playerHandleDamage)];
player addEventHandler ["hit", FUNC(playerHandleDamage)];

// 3D Marker
GVAR(missionEH_draw3D) = addMissionEventHandler ["Draw3D",
Expand Down