2015-07-04 23:49:47 +00:00
|
|
|
/*
|
|
|
|
* Author: SilentSpike
|
2015-07-05 00:20:14 +00:00
|
|
|
* Cache necessary details and process unit for spectator on death
|
2015-07-26 12:12:58 +00:00
|
|
|
* Part of the basic spectator system
|
2015-07-04 23:49:47 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Corpse <OBJECT>
|
|
|
|
* 1: Killer <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None <NIL>
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-07-18 17:46:46 +00:00
|
|
|
params ["_unit","_killer"];
|
2015-07-04 23:49:47 +00:00
|
|
|
|
2015-07-05 00:20:14 +00:00
|
|
|
// Remove from group to prevent appearing on HUD upon respawn
|
2015-07-09 20:20:09 +00:00
|
|
|
[_unit, true, QGVAR(isSpectator), side group _unit] call EFUNC(common,switchToGroupSide);
|
2015-07-17 01:05:24 +00:00
|
|
|
|
2015-07-26 12:12:58 +00:00
|
|
|
if (isNull _killer) then {
|
|
|
|
[2,_unit] call FUNC(setCameraAttributes);
|
|
|
|
} else {
|
|
|
|
[2,_killer] call FUNC(setCameraAttributes);
|
|
|
|
};
|