mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix function calls with switch to params
This commit is contained in:
parent
a7a87c40f0
commit
78e17c4bdc
@ -65,7 +65,7 @@ switch (GVAR(camMode)) do {
|
|||||||
{vehicle GVAR(camUnit) == GVAR(camUnit)} &&
|
{vehicle GVAR(camUnit) == GVAR(camUnit)} &&
|
||||||
{GVAR(camUnit) in GVAR(unitList)}
|
{GVAR(camUnit) in GVAR(unitList)}
|
||||||
) then {
|
) then {
|
||||||
call FUNC(updateView);
|
[] call FUNC(updateView);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -58,7 +58,7 @@ switch (toLower _mode) do {
|
|||||||
// Initalize the camera view
|
// Initalize the camera view
|
||||||
GVAR(camera) = "Camera" camCreate GVAR(camPos);
|
GVAR(camera) = "Camera" camCreate GVAR(camPos);
|
||||||
GVAR(camera) setDir GVAR(camPan);
|
GVAR(camera) setDir GVAR(camPan);
|
||||||
call FUNC(updateView);
|
[] call FUNC(updateView);
|
||||||
|
|
||||||
// Handle camera movement
|
// Handle camera movement
|
||||||
[FUNC(handleCamera), 0] call CBA_fnc_addPerFrameHandler;
|
[FUNC(handleCamera), 0] call CBA_fnc_addPerFrameHandler;
|
||||||
@ -156,7 +156,7 @@ switch (toLower _mode) do {
|
|||||||
if ((_button == 1) && (GVAR(camMode) == 1)) then {
|
if ((_button == 1) && (GVAR(camMode) == 1)) then {
|
||||||
// In first person toggle sights mode
|
// In first person toggle sights mode
|
||||||
GVAR(gunCam) = !GVAR(gunCam);
|
GVAR(gunCam) = !GVAR(gunCam);
|
||||||
call FUNC(updateView);
|
[] call FUNC(updateView);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
case "onmousebuttonup": {
|
case "onmousebuttonup": {
|
||||||
@ -284,15 +284,11 @@ switch (toLower _mode) do {
|
|||||||
_netID = (_args select 0) tvData _sel;
|
_netID = (_args select 0) tvData _sel;
|
||||||
_newUnit = objectFromNetId _netID;
|
_newUnit = objectFromNetId _netID;
|
||||||
|
|
||||||
// Only update camera mode when in free cam
|
// When unit is reselected, toggle camera mode
|
||||||
if (GVAR(camMode) == 0) then {
|
if (_newUnit == GVAR(camUnit) || GVAR(camMode) == 0) then {
|
||||||
_newMode = 1;
|
_newMode = [1,2,1] select GVAR(camMode);
|
||||||
} else {
|
|
||||||
// When unit is reselected, toggle camera mode
|
|
||||||
if (_newUnit == GVAR(camUnit)) then {
|
|
||||||
_newMode = [0,2,1] select GVAR(camMode);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(camUnit) = _newUnit;
|
GVAR(camUnit) = _newUnit;
|
||||||
[_newMode] call FUNC(updateView);
|
[_newMode] call FUNC(updateView);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user