Enforcing the speed limit

This commit is contained in:
SilentSpike 2015-07-21 19:36:20 +01:00
parent 341f3a253e
commit 0d798264b0
3 changed files with 5 additions and 5 deletions

View File

@ -137,7 +137,7 @@ switch (toLower _mode) do {
if (GVAR(ctrlKey)) then {
GVAR(camZoom) = ((GVAR(camZoom) + _zChange * 0.1) max 0.01) min 2;
} else {
GVAR(camSpeed) = (GVAR(camSpeed) + _zChange * 0.2) max 0.05;
GVAR(camSpeed) = ((GVAR(camSpeed) + _zChange * 0.2) max 0.05) min 10;
};
};
case "onmousemoving": {

View File

@ -31,8 +31,8 @@ _deltaX = _oldX - _x;
_deltaY = _oldY - _y;
if (_leftButton) then {
GVAR(camDolly) set [0, _deltaX * -10 * GVAR(camSpeed)];
GVAR(camDolly) set [1, _deltaY * 10 * GVAR(camSpeed)];
GVAR(camDolly) set [0, _deltaX * -100 * GVAR(camSpeed)];
GVAR(camDolly) set [1, _deltaY * 100 * GVAR(camSpeed)];
} else {
if (_rightButton) then {
GVAR(camPan) = GVAR(camPan) - (_deltaX * 360);

View File

@ -52,8 +52,8 @@ if !(_vision in GVAR(availableVisions)) then {
GVAR(camPan) = ((_heading % 360) max 0);
GVAR(camPosition) = (ATLtoASL _position);
GVAR(camSpeed) = _speed;
GVAR(camTilt) = ((_heading min -90) max 90);
GVAR(camSpeed) = (_speed min 0.05) max 10;
GVAR(camTilt) = (_heading min -89) max 89;
GVAR(camUnit) = _unit;
GVAR(camVision) = _vision;
GVAR(camZoom) = (_zoom min 2) max 0;