Skip to content

Commit

Permalink
Berechnung Zeit
Browse files Browse the repository at this point in the history
  • Loading branch information
GNCLORD-MDB committed Nov 20, 2023
1 parent 555c3f5 commit b70655d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/main/REVIVE/fn_clientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ DFUNC(SelfCare) =
// Var setzen
player setVariable ["OPT_isUnconscious", 0, true];
player setVariable ["OPT_isStabilized", 0, true];
player setVariable ["OPT_isOnMap", time, true];
player setVariable ["OPT_PlayerOnMap", time, true];
GVAR(OPT_isDragging) = false;
player setVariable ["OPT_isDragged", 0, true];

Expand Down
10 changes: 6 additions & 4 deletions addons/main/REVIVE/fn_dialog.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,21 @@ GVAR(startzeit) = time;
} forEach _units;
};

//Dynamische Respawnzeit
private _PlayerOnMapTime = player getVariable ['OPT_PlayerOnMap',GVAR(Respawnzeit)];
private _PlayerRespawnTime = GVAR(Respawnzeit) - (Time - _PlayerOnMapTime);

//Dynamische Respawnzeit
if (GVAR(Respawnzeitdynamisch)) then
{
// Respawnzeit setzen
private _PlayerOnMapTime = player getVariable ['OPT_isOnMap',GVAR(Respawnzeit)];
private _PlayerRespawnTime = GVAR(Respawnzeit) - (Time - _PlayerOnMapTime);
if (_PlayerRespwamTime <= 0) then
if (_PlayerRespawnTime <= 0) then
{
setPlayerRespawnTime 10;
}
else
{
setPlayerRespawnTime _PlayerRespawnTime;
setPlayerRespawnTime _PlayerRespawnTime;
};
};

Expand Down

0 comments on commit b70655d

Please sign in to comment.