Skip to content

Commit

Permalink
Fixed enabling ACRE spec on respawn, not only when player is seagull.
Browse files Browse the repository at this point in the history
  • Loading branch information
kami- committed Feb 10, 2015
1 parent 5f9c8e9 commit 5da6825
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion hull3.Altis/onPlayerRespawn.sqf

This file was deleted.

9 changes: 9 additions & 0 deletions hull3/acre_functions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ hull3_acre_fnc_preInit = {

hull3_acre_fnc_addEventHandlers = {
["player.initialized", hull3_acre_fnc_playerInit] call hull3_event_fnc_addEventHandler;
["player.respawned", hull3_acre_fnc_tryEnableAcreSpectator] call hull3_event_fnc_addEventHandler;
};

hull3_acre_fnc_setPlayerFrequencies = {
Expand Down Expand Up @@ -48,6 +49,14 @@ hull3_acre_fnc_playerInit = {
};
};

hull3_acre_fnc_tryEnableAcreSpectator = {
FUN_ARGS_1(_unit);

if (typeof _unit != "seagull") then {
[true] call acre_api_fnc_setSpectator;
};
};

hull3_acre_fnc_fixAcreSpectator = {
if (acre_sys_core_ts3id in ACRE_SPECTATORS_LIST) then {
DEBUG("hull3.acre.jip",FMT_2("TS ID '%1' found in spectator list '%2'. Setting ACRE spectator to false.",acre_sys_core_ts3id,ACRE_SPECTATORS_LIST));
Expand Down

0 comments on commit 5da6825

Please sign in to comment.