mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Stop spectator camera unit changing on corpses
Previously the camera would be automatically moved away from corpses (when the unit currently being watched dies). This changes it to stay on them until the view is manually switched as users might want to stick around and watch whatever was going on at the time of death.
This commit is contained in:
parent
79e607836b
commit
07e09b60fa
@ -78,6 +78,7 @@ switch (toLower _mode) do {
|
||||
camDestroy GVAR(camera);
|
||||
|
||||
// Return to player view
|
||||
clearRadio;
|
||||
_unit switchCamera "internal";
|
||||
|
||||
// Re-enable BI damage effects
|
||||
|
@ -26,9 +26,11 @@ if (isNull _display) exitWith { [_this select 1] call CBA_fnc_removePerFrameHand
|
||||
// Remove all dead and null units from the list
|
||||
[] call FUNC(updateUnits);
|
||||
|
||||
// Camera shouldn't stay on unit that isn't in the list
|
||||
// Camera shouldn't stay on unit that isn't in the list (unless dead)
|
||||
if !(GVAR(camUnit) in GVAR(unitList)) then {
|
||||
[nil,1] call FUNC(cycleCamera);
|
||||
if (alive GVAR(camUnit) || isNull GVAR(camUnit)) then {
|
||||
[nil,1] call FUNC(cycleCamera);
|
||||
};
|
||||
};
|
||||
|
||||
// Reduce overhead when unit tree is hidden
|
||||
|
@ -33,7 +33,7 @@ if !(_newMode in GVAR(availableModes)) then {
|
||||
};
|
||||
|
||||
// When no units available to spectate, exit to freecam
|
||||
if (GVAR(unitList) isEqualTo []) then {
|
||||
if ((GVAR(unitList) isEqualTo []) && (alive _newUnit || isNull _newUnit)) then {
|
||||
_newMode = 0;
|
||||
_newUnit = objNull;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user