mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Basic respawning support
This commit is contained in:
parent
2aebabdb2c
commit
98e9245ed9
@ -3,8 +3,8 @@
|
||||
* Start the spectator camera spectator on respawn
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Corpse <OBJECT>
|
||||
* 1: Killer <OBJECT>
|
||||
* 0: New unit <OBJECT>
|
||||
* 1: Old unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_target","_set"];
|
||||
_unit = player;
|
||||
_target = _this select 0;
|
||||
_set = if (count _this > 1) then {_this select 1} else {true};
|
||||
@ -44,7 +45,6 @@ if (_set) then {
|
||||
|
||||
["Init", [true]] call FUNC(camera);
|
||||
} else {
|
||||
// Code to exit spectator and "respawn" player goes here (WIP)
|
||||
["Exit"] call FUNC(camera);
|
||||
|
||||
// Physical beings can talk
|
||||
@ -57,6 +57,10 @@ if (_set) then {
|
||||
} else {
|
||||
[_unit] joinSilent GVAR(cachedGroup);
|
||||
};
|
||||
|
||||
private ["_marker"];
|
||||
_marker = ["respawn_west","respawn_east","respawn_guerrila","respawn_civilian"] select ([west,east,resistance,civilian] find GVAR(cachedSide));
|
||||
_unit setPos (getMarkerPos _marker);
|
||||
};
|
||||
|
||||
// Handle common addon audio
|
||||
|
Loading…
Reference in New Issue
Block a user