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

Prototyp OPT Revive system #214

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Rückgabewert und Selektionfunktion
GNCLORD-MDB committed Jul 1, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 00daf5ed52f8fa99667ee335b9f26a00ea91d175
15 changes: 14 additions & 1 deletion addons/main/REVIVE/fn_clientInitEH.sqf
Original file line number Diff line number Diff line change
@@ -216,11 +216,24 @@ GVAR(PLAYER_HANDLE_DAMAGE_EH_ID) = player addEventHandler ["HandleDamage",
{
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
systemchat format ["d:%1 S:%2 HI:%3 HP:%4",_damage,_selection,_hitIndex,_hitPoint];
private _returndammage = 0;

if (_damage > GVAR(levelreviveaktiv)) then
{
_unit setDammage 0.95;
[_unit, _selection, _damage, _source, _projectile, _hitIndex, _instigator, _hitPoint] call FUNC(HandleDamage);
};
};
// Maximal MAX_DAMAGE zurückgeben, damit man nie sofort stirbt (Extremitätsverletzungen werden ignoriert)
if (_selection in ["arms", "hands", "legs"]) then
{
_returndammage = 0;
}
else
{
_returndammage = _damage min GVAR(levelreviveaktiv);
};

_returndammage
}];

// Variablen-Reset