Skip to content

Commit

Permalink
Version 0.818
Browse files Browse the repository at this point in the history
- Add fn_zoomToggle

Signed-off-by: jedi95 <[email protected]>
  • Loading branch information
jedi95 committed Sep 29, 2023
1 parent fed42c1 commit d067cb9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Mods/Falcon/Code/FalconVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "gitparams.h"

#define _Falcon_Version_Major 0
#define _Falcon_Version_Minor 817
#define _Falcon_Version_Minor 818

#define _Falcon_Commit STR(GIT_CUR_COMMIT)
#define _Falcon_ISA "SSE2"
Expand Down
2 changes: 2 additions & 0 deletions Mods/Falcon/Code/GameCVars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ void SCVars::InitCVars(IConsole *pConsole)
pConsole->Register("fn_fixExplosivePlant", &fn_fixExplosivePlant, 1, VF_NOT_NET_SYNCED | VF_RESTRICTEDMODE, "Fix planting mines and claymores with high FPS");
pConsole->Register("fn_fixHUD", &fn_fixHUD, 0, VF_NOT_NET_SYNCED | VF_RESTRICTEDMODE, "Removes unnessesary items from the HUD.");
pConsole->Register("fn_fov", &fn_fov, 60.0f, VF_RESTRICTEDMODE | VF_NOT_NET_SYNCED, "Client-controlled field of view");
pConsole->Register("fn_zoomToggle", &fn_zoomToggle, 1, VF_RESTRICTEDMODE | VF_NOT_NET_SYNCED, "Makes the zoom key work as a toggle");
pConsole->Register("sys_MaxFps", &sys_MaxFps, 0, VF_NOT_NET_SYNCED | VF_RESTRICTEDMODE, "Sets the maximum FPS limit");

//Callback for updates
Expand Down Expand Up @@ -600,6 +601,7 @@ void SCVars::ReleaseCVars()
pConsole->UnregisterVariable("fn_fixExplosivePlant", true);
pConsole->UnregisterVariable("fn_fixHUD", true);
pConsole->UnregisterVariable("fn_fov", true);
pConsole->UnregisterVariable("fn_zoomToggle", true);
pConsole->UnregisterVariable("sys_MaxFps", true);

// State only
Expand Down
1 change: 1 addition & 0 deletions Mods/Falcon/Code/GameCVars.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct SCVars
int fn_fixExplosivePlant;
int fn_fixHUD;
float fn_fov;
int fn_zoomToggle;
int sys_MaxFps;

// State only
Expand Down
3 changes: 3 additions & 0 deletions Mods/Falcon/Code/IronSight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,9 @@ void CIronSight::ApplyZoomMod(IFireMode* pFM)
//--------------------------------------------------------------------------
bool CIronSight::IsToggle()
{
if (g_pGameCVars->fn_zoomToggle == 0) {
return false;
}
return !UseAlternativeIronSight();
}

Expand Down

0 comments on commit d067cb9

Please sign in to comment.