ACE3/addons/spectator/functions/fnc_handleKilled.sqf
SilentSpike 52460182c9 Enable spectator on death system
New spectator on death system should enter spectator mode upon dying and exit upon respawning. Only virtual spectator state is suitable for this system since the body should remain as is.
2015-08-02 16:42:24 +01:00

27 lines
479 B
Plaintext

/*
* Author: SilentSpike
* Set inital camera attributes and set as spectator on death
* Part of the spectator during death system
*
* Arguments:
* 0: Corpse <OBJECT>
* 1: Killer <OBJECT>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit","_killer"];
if (isNull _killer) then {
[2,_unit] call FUNC(setCameraAttributes);
} else {
[2,_killer] call FUNC(setCameraAttributes);
};
[_unit] call FUNC(setSpectator);