mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix spectator camera exiting mechanism
When using ACE_Player the camera would return to the dead body. It makes sense to simply pass the reset unit by reference to the camera exit code.
This commit is contained in:
parent
98b088f26f
commit
f5e7185aec
@ -57,6 +57,8 @@ switch (toLower _mode) do {
|
||||
};
|
||||
};
|
||||
case "close": {
|
||||
_args params ["_unit"];
|
||||
|
||||
// Can't close a second time
|
||||
if !(GVAR(open)) exitWith {};
|
||||
GVAR(open) = false;
|
||||
@ -71,7 +73,7 @@ switch (toLower _mode) do {
|
||||
camDestroy GVAR(camera);
|
||||
|
||||
// Return to player view
|
||||
ACE_Player switchCamera "internal";
|
||||
_unit switchCamera "internal";
|
||||
|
||||
// Cleanup camera variables
|
||||
GVAR(camera) = nil;
|
||||
|
@ -36,7 +36,7 @@ if !(local _unit) exitwith {
|
||||
if (_set) then {
|
||||
["open"] call FUNC(handleInterface);
|
||||
} else {
|
||||
["close"] call FUNC(handleInterface);
|
||||
["close",_unit] call FUNC(handleInterface);
|
||||
};
|
||||
|
||||
// Handle common addon audio
|
||||
|
Loading…
Reference in New Issue
Block a user