Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jouni Järvinen <[email protected]>
  • Loading branch information
PabstMirror and rautamiekka authored Feb 9, 2025
1 parent a07694b commit af48379
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion addons/spike/functions/fnc_camera_cycleViewMode.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "..\script_component.hpp"
/*
* Author: Dani (TCVM)
* Cycles camera thermal mode (if avaliable)
* Cycles camera thermal mode (if available)
*
* Arguments:
* 0: Camera <OBJECT>
Expand Down
2 changes: 1 addition & 1 deletion addons/spike/functions/fnc_camera_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private _logic = "Logic" createVehicleLocal _pos;
private _initPosX = (tan _initGimbalAngleX) * GIMBAL_LOGIC_OFFSET;
private _initPosY = (tan _initGimbalAngleY) * GIMBAL_LOGIC_OFFSET;

private _projectileBounds = (1 boundingBoxReal _projectile);
private _projectileBounds = 1 boundingBoxReal _projectile;
private _projectileSize = (_projectileBounds#1) vectorDiff (_projectileBounds#0);
_activeCameraNamespace setVariable [QGVAR(projectileSize), _projectileSize#1];

Expand Down
4 changes: 2 additions & 2 deletions addons/spike/functions/fnc_camera_switchTo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
*
* Public: No
*/
params ["_cameraNamespace"];

if ([] call FUNC(camera_userInCamera)) exitWith {};

params ["_cameraNamespace"];
private _camera = _cameraNamespace getVariable QGVAR(camera);
private _projectile = _cameraNamespace getVariable QGVAR(missile);
_camera cameraEffect ["internal", "BACK"];
Expand Down
2 changes: 1 addition & 1 deletion addons/spike/functions/fnc_camera_update.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if (_hasGimbal) then {
_cameraNamespace setVariable [QGVAR(lastMovedGroundPos), _lastGroundPos];
};

if (_trackLockedPosition && { (_seekerTargetPos isNotEqualTo [0, 0, 0]) } && _canStopDesignating) then {
if (_trackLockedPosition && _canStopDesignating && { _seekerTargetPos isNotEqualTo [0, 0, 0] }) then {
_lastGroundPos = _seekerTargetPos;
};

Expand Down
4 changes: 2 additions & 2 deletions addons/spike/functions/fnc_camera_userInCamera.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*
* Public: No
*/
params [["_cameraNamespace", objNull]];

if (isNil QGVAR(activeCamera)) exitWith { false };

params [["_cameraNamespace", objNull]];

(!isNull GVAR(activeCamera)) && { isNull _cameraNamespace || (_cameraNamespace isEqualTo GVAR(activeCamera)) };

0 comments on commit af48379

Please sign in to comment.