mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add keys to adjust spectator camera speed and zoom
Allows for finer control of the speed and zoom, as well as a quick way to reset either.
This commit is contained in:
parent
d7730103c9
commit
213deeffb4
@ -33,7 +33,7 @@ GVAR(camAgent) = objNull;
|
||||
GVAR(camMode) = 0;
|
||||
GVAR(camPan) = 0;
|
||||
GVAR(camPos) = ATLtoASL [worldSize * 0.5, worldSize * 0.5, 20];
|
||||
GVAR(camSpeed) = 1;
|
||||
GVAR(camSpeed) = 2.5;
|
||||
GVAR(camTilt) = -10;
|
||||
GVAR(camUnit) = objNull;
|
||||
GVAR(camVision) = -2;
|
||||
|
@ -148,17 +148,21 @@ switch (toLower _mode) do {
|
||||
[localize LSTRING(freeCamDown),"Z"],
|
||||
[localize LSTRING(freeCamPan),"RMB (Hold)"],
|
||||
[localize LSTRING(freeCamDolly),"LMB (Hold)"],
|
||||
[localize LSTRING(freeCamFocus),"F"],
|
||||
[localize LSTRING(freeCamNextVis),"N"],
|
||||
[localize LSTRING(freeCamPrevVis),"Ctrl + N"],
|
||||
[localize LSTRING(freeCamZoom),"Scrollwheel"],
|
||||
[localize LSTRING(freeCamSpeed),"Ctrl + Scrollwheel"],
|
||||
[localize LSTRING(freeCamBoost),"Shift (Hold)"],
|
||||
[localize LSTRING(otherControls),""],
|
||||
[localize LSTRING(freeCamFocus),"F"],
|
||||
[localize LSTRING(attributeControls),""],
|
||||
[localize LSTRING(nextCam),"Up Arrow"],
|
||||
[localize LSTRING(prevCam),"Down Arrow"],
|
||||
[localize LSTRING(nextUnit),"Right Arrow"],
|
||||
[localize LSTRING(prevUnit),"Left Arrow"]
|
||||
[localize LSTRING(prevUnit),"Left Arrow"],
|
||||
[localize LSTRING(nextVis),"N"],
|
||||
[localize LSTRING(prevVis),"Ctrl + N"],
|
||||
[localize LSTRING(adjZoom),"Scrollwheel"],
|
||||
[localize LSTRING(adjSpeed),"Ctrl + Scrollwheel"],
|
||||
[localize LSTRING(incZoom),"Num-/Num+"],
|
||||
[localize LSTRING(incSpeed),"Ctrl + Num-/Num+"],
|
||||
[localize LSTRING(reZoom),"Alt + Num-"],
|
||||
[localize LSTRING(reSpeed),"Alt + Num+"]
|
||||
];
|
||||
|
||||
// Handle support for BI's respawn counter
|
||||
@ -247,8 +251,8 @@ switch (toLower _mode) do {
|
||||
|
||||
// Handle held keys (prevent repeat calling)
|
||||
if (_dik in GVAR(heldKeys)) exitwith {};
|
||||
// Exclude movement keys so that speed can be adjusted on fly
|
||||
if !(_dik in [16,17,30,31,32,44]) then {
|
||||
// Exclude movement/adjustment keys so that speed can be adjusted on fly
|
||||
if !(_dik in [16,17,30,31,32,44,74,78]) then {
|
||||
GVAR(heldKeys) pushBack _dik;
|
||||
};
|
||||
|
||||
@ -295,7 +299,7 @@ switch (toLower _mode) do {
|
||||
case 33: { // F
|
||||
private ["_sel","_vector"];
|
||||
_sel = GVAR(treeSel);
|
||||
if !((GVAR(camMode) == 0) && {isNull _sel} && {_sel in GVAR(unitList)}) then {
|
||||
if ((GVAR(camMode) == 0) && {!isNull _sel} && {_sel in GVAR(unitList)}) then {
|
||||
_vector = (positionCameraToWorld [0,0,0]) vectorDiff (positionCameraToWorld [0,0,25]);
|
||||
[nil,nil,nil,(getPosATL _sel) vectorAdd _vector] call FUNC(setCameraAttributes);
|
||||
};
|
||||
@ -318,6 +322,22 @@ switch (toLower _mode) do {
|
||||
case 57: { // Spacebar
|
||||
// Freecam attachment here, if in external then set cam pos and attach
|
||||
};
|
||||
case 74: { // Num -
|
||||
if (_alt) exitWith { [nil,nil,nil,nil,nil,nil, 1.25] call FUNC(setCameraAttributes); };
|
||||
if (_ctrl) then {
|
||||
[nil,nil,nil,nil,nil,nil,nil, GVAR(camSpeed) - 0.05] call FUNC(setCameraAttributes);
|
||||
} else {
|
||||
[nil,nil,nil,nil,nil,nil, GVAR(camZoom) - 0.01] call FUNC(setCameraAttributes);
|
||||
};
|
||||
};
|
||||
case 78: { // Num +
|
||||
if (_alt) exitWith { [nil,nil,nil,nil,nil,nil,nil, 2.5] call FUNC(setCameraAttributes); };
|
||||
if (_ctrl) then {
|
||||
[nil,nil,nil,nil,nil,nil,nil, GVAR(camSpeed) + 0.05] call FUNC(setCameraAttributes);
|
||||
} else {
|
||||
[nil,nil,nil,nil,nil,nil, GVAR(camZoom) + 0.01] call FUNC(setCameraAttributes);
|
||||
};
|
||||
};
|
||||
case 200: { // Up arrow
|
||||
[-1] call FUNC(cycleCamera);
|
||||
};
|
||||
|
@ -134,8 +134,7 @@
|
||||
</Key>
|
||||
<!-- Controls -->
|
||||
<Key ID="STR_ACE_Spectator_freeCamControls">
|
||||
<English>Free Camera Controls</English>
|
||||
<Polish>Wolne sterowanie kamerą</Polish>
|
||||
<English>Free Camera</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_freeCamForward">
|
||||
<English>Camera Forward</English>
|
||||
@ -173,31 +172,14 @@
|
||||
<English>Lock Camera to Target</English>
|
||||
<Polish>Zablokuj kamerę na celu</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_freeCamZoom">
|
||||
<English>Zoom +/-</English>
|
||||
<Polish>Zoom +/-</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_freeCamSpeed">
|
||||
<English>Speed +/-</English>
|
||||
<Polish>Prędkość +/-</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_freeCamBoost">
|
||||
<English>Speed Boost</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_freeCamFocus">
|
||||
<English>Focus on Unit</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_freeCamNextVis">
|
||||
<English>Next Vision Mode</English>
|
||||
<Polish>Następny tryb wizji</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_freeCamPrevVis">
|
||||
<English>Previous Vision Mode</English>
|
||||
<Polish>Poprzedni tryb wizji</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_uiControls">
|
||||
<English>Interface Controls</English>
|
||||
<Polish>Sterowanie interfejsem</Polish>
|
||||
<English>Interface</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_uiToggleInterface">
|
||||
<English>Toggle Interface</English>
|
||||
@ -227,9 +209,8 @@
|
||||
<English>Toggle Help</English>
|
||||
<Polish>Przełącz pomoc</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_otherControls">
|
||||
<English>Other Controls</English>
|
||||
<Polish>Pozostałe sterowanie</Polish>
|
||||
<Key ID="STR_ACE_Spectator_attributeControls">
|
||||
<English>Camera Attributes</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_nextCam">
|
||||
<English>Next Camera</English>
|
||||
@ -247,5 +228,31 @@
|
||||
<English>Previous Unit</English>
|
||||
<Polish>Poprzednia jednostka</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_nextVis">
|
||||
<English>Next Vision Mode</English>
|
||||
<Polish>Następny tryb wizji</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_prevVis">
|
||||
<English>Previous Vision Mode</English>
|
||||
<Polish>Poprzedni tryb wizji</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_adjZoom">
|
||||
<English>Adjust Zoom</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_adjSpeed">
|
||||
<English>Adjust Speed</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_incZoom">
|
||||
<English>Increment Zoom</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_incSpeed">
|
||||
<English>Increment Speed</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_reZoom">
|
||||
<English>Reset Zoom</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Spectator_reSpeed">
|
||||
<English>Reset Speed</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user