NoZoom, FOV tweaks
This commit is contained in:
parent
323379560d
commit
88034f0cdf
@ -49,6 +49,7 @@
|
||||
<option id="gnu.cpp.compiler.option.other.verbose.1509393088" name="Verbose (-v)" superClass="gnu.cpp.compiler.option.other.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.116822749" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="TF2"/>
|
||||
<listOptionValue builtIn="false" value="__DRM_ENABLED=false"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.236333340" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -12,7 +12,9 @@
|
||||
|
||||
#include <ctime>
|
||||
|
||||
#ifndef __DRM_ENABLED
|
||||
#define __DRM_ENABLED true
|
||||
#endif
|
||||
#define __DRM_NOTES "Unstable build, for testing only!"
|
||||
|
||||
#define __QUIT_SEGV (*((int*)0) = 0)
|
||||
|
@ -23,7 +23,9 @@ void GlobalSettings::Init() {
|
||||
this->bIgnoreTaunting = CREATE_CV(CV_SWITCH, "ignore_taunting", "1", "Ignore taunting players");
|
||||
this->flForceFOV = CREATE_CV(CV_FLOAT, "fov", "0", "FOV");
|
||||
// this->bProfiler = CREATE_CV(CV_SWITCH, "profiler", "0", "Profiler");
|
||||
// this->bNoZoom = CREATE_CV(CV_SWITCH, "nozoom", "0", "No Zoom");
|
||||
this->bNoZoom = CREATE_CV(CV_SWITCH, "nozoom", "0", "No Zoom");
|
||||
this->flForceFOVZoomed = CREATE_CV(CV_FLOAT, "fov_zoomed", "0", "FOV when zoomed");
|
||||
this->bZoomedFOV = CREATE_CV(CV_SWITCH, "zoom_keep_fov", "1", "When zoomed, use " CON_PREFIX "fov_zoomed");
|
||||
// this->bNoFlinch = CREATE_CV(CV_SWITCH, "noflinch", "0", "No Flinch (broken)");
|
||||
this->bSendPackets = CREATE_CV(CV_SWITCH, "sendpackets", "1", "Send packets");
|
||||
this->bShowLogo = CREATE_CV(CV_SWITCH, "logo", "1", "Show logo");
|
||||
|
@ -19,10 +19,12 @@ public:
|
||||
// TODO
|
||||
// CatVar* bMaxPerformance;
|
||||
CatVar* flForceFOV;
|
||||
CatVar* flForceFOVZoomed;
|
||||
CatVar* bZoomedFOV;
|
||||
CatVar* bHackEnabled;
|
||||
CatVar* bIgnoreTaunting;
|
||||
// CatVar* bProfiler;
|
||||
// CatVar* bNoZoom;
|
||||
CatVar* bNoZoom;
|
||||
// CatVar* bNoFlinch;
|
||||
CatVar* bSendPackets;
|
||||
CatVar* bShowLogo;
|
||||
|
@ -85,8 +85,8 @@ void FrameStageNotify_hook(void* thisptr, int stage) {
|
||||
}
|
||||
}
|
||||
((FrameStageNotify_t*)hooks::hkClient->GetMethod(hooks::offFrameStageNotify))(thisptr, stage);
|
||||
/*if (g_Settings.bHackEnabled->GetBool() && !g_Settings.bInvalid) {
|
||||
if (stage == 5 && g_Settings.bNoFlinch->GetBool()) {
|
||||
if (g_Settings.bHackEnabled->GetBool() && !g_Settings.bInvalid) {
|
||||
/*if (stage == 5 && g_Settings.bNoFlinch->GetBool()) {
|
||||
static Vector oldPunchAngles = Vector();
|
||||
Vector punchAngles = CE_VECTOR(g_pLocalPlayer->entity, netvar.vecPunchAngle);
|
||||
QAngle viewAngles;
|
||||
@ -94,15 +94,14 @@ void FrameStageNotify_hook(void* thisptr, int stage) {
|
||||
viewAngles -= VectorToQAngle(punchAngles - oldPunchAngles);
|
||||
oldPunchAngles = punchAngles;
|
||||
interfaces::engineClient->SetViewAngles(viewAngles);
|
||||
}
|
||||
}*/
|
||||
|
||||
if (g_Settings.bNoZoom->GetBool()) {
|
||||
if (CE_GOOD(g_pLocalPlayer->entity)) {
|
||||
//g_pLocalPlayer->bWasZoomed = NET_INT(g_pLocalPlayer->entity, netvar.iCond) & cond::zoomed;
|
||||
CE_INT(g_pLocalPlayer->entity, netvar.iCond) = CE_INT(g_pLocalPlayer->entity, netvar.iCond) &~ cond::zoomed;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
//logging::Info("fsi end");// TODO dbg
|
||||
SEGV_END;
|
||||
}
|
||||
@ -111,8 +110,17 @@ void OverrideView_hook(void* thisptr, CViewSetup* setup) {
|
||||
SEGV_BEGIN;
|
||||
((OverrideView_t*)hooks::hkClientMode->GetMethod(hooks::offOverrideView))(thisptr, setup);
|
||||
if (!g_Settings.bHackEnabled->GetBool()) return;
|
||||
if (g_Settings.flForceFOV && g_Settings.flForceFOV->GetBool()) {
|
||||
if (g_Settings.flForceFOV && g_Settings.flForceFOVZoomed && g_Settings.bZoomedFOV) {
|
||||
bool zoomed = g_pLocalPlayer->bZoomed;
|
||||
if (g_Settings.bZoomedFOV->GetBool() && zoomed) {
|
||||
if (g_Settings.flForceFOVZoomed->GetBool()) {
|
||||
setup->fov = g_Settings.flForceFOVZoomed->GetFloat();
|
||||
}
|
||||
} else {
|
||||
if (g_Settings.flForceFOV->GetBool()) {
|
||||
setup->fov = g_Settings.flForceFOV->GetFloat();
|
||||
}
|
||||
}
|
||||
}
|
||||
SEGV_END;
|
||||
}
|
||||
|
Reference in New Issue
Block a user