summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 14:04:39 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 14:04:39 +0100
commit8cd07c04efafcd3e927a21152d10e9fafea54517 (patch)
treec89fdf577c90e82080ff5c15982d016cc3f5f7fa /src/menu.cpp
parentAdd ESP, aim, view and movement batch (diff)
downloadhl2h-8cd07c04efafcd3e927a21152d10e9fafea54517.tar.gz
hl2h-8cd07c04efafcd3e927a21152d10e9fafea54517.zip
Transitions: per-trigger targets and 3D wireframe; FOV range fixes
- Each changelevel trigger now shows its own target map. The trigger whose target is the map we came from is marked "<- map"; the forward one is "-> map". No more appending one global previous-map line to every box. - Draw the volume as a projected 8-corner / 12-edge wireframe with the tag above its highest visible corner instead of a screen-space rectangle. - Camera FOV is 40..140 (stock 75) and viewmodel FOV 20..120 (stock 54); 0 is no longer allowed and old configs using 0 migrate to the stock value. - Log the mat_monitorgamma readback via ICvar so we can tell whether the command is rejected or the OS/compositor ignores the gamma ramp.
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index 4e521f7..ead5f2d 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -79,8 +79,8 @@ bool g_aim_punch = true; // compensate server aim punch
79bool g_spread_engine = true; // zero the pellet random draws, not just the seed 79bool g_spread_engine = true; // zero the pellet random draws, not just the seed
80bool g_auto_crouchjump = false; 80bool g_auto_crouchjump = false;
81bool g_edge_jump = false; 81bool g_edge_jump = false;
82int g_fov_camera = 0; // 0 = game default 82int g_fov_camera = 75; // HL2's stock camera FOV
83int g_fov_viewmodel = 0; // 0 = game default (54) 83int g_fov_viewmodel = 54; // HL2's stock viewmodel FOV
84int g_gamma = 22; // mat_monitorgamma x10, stock 2.2 84int g_gamma = 22; // mat_monitorgamma x10, stock 2.2
85int g_esp_col_hostile[3] = {255, 60, 60}; 85int g_esp_col_hostile[3] = {255, 60, 60};
86int g_esp_col_neutral[3] = {220, 220, 220}; 86int g_esp_col_neutral[3] = {220, 220, 220};
@@ -393,20 +393,27 @@ static bool config_load() {
393 } 393 }
394 if (in_view) { 394 if (in_view) {
395 int *dst = nullptr; 395 int *dst = nullptr;
396 int lo = 0, hi = 0; 396 int lo = 0, hi = 0, stock = 0;
397 if (strcmp(key, "fov") == 0) { 397 if (strcmp(key, "fov") == 0) {
398 dst = &g_fov_camera; 398 dst = &g_fov_camera;
399 lo = 40;
399 hi = 140; 400 hi = 140;
401 stock = 75;
400 } else if (strcmp(key, "vmfov") == 0) { 402 } else if (strcmp(key, "vmfov") == 0) {
401 dst = &g_fov_viewmodel; 403 dst = &g_fov_viewmodel;
404 lo = 20;
402 hi = 120; 405 hi = 120;
406 stock = 54;
403 } else if (strcmp(key, "gamma") == 0) { 407 } else if (strcmp(key, "gamma") == 0) {
404 dst = &g_gamma; 408 dst = &g_gamma;
405 lo = 16; 409 lo = 16;
406 hi = 30; 410 hi = 30;
411 stock = 22;
407 } 412 }
408 if (dst) { 413 if (dst) {
409 int v = atoi(val); 414 int v = atoi(val);
415 if (v <= 0)
416 v = stock; // old configs used 0 as "off"
410 if (v < lo) v = lo; 417 if (v < lo) v = lo;
411 if (v > hi) v = hi; 418 if (v > hi) v = hi;
412 *dst = v; 419 *dst = v;
@@ -595,8 +602,8 @@ void config_reset_defaults() {
595 g_spread_engine = true; 602 g_spread_engine = true;
596 g_auto_crouchjump = false; 603 g_auto_crouchjump = false;
597 g_edge_jump = false; 604 g_edge_jump = false;
598 g_fov_camera = 0; 605 g_fov_camera = 75;
599 g_fov_viewmodel = 0; 606 g_fov_viewmodel = 54;
600 g_gamma = 22; 607 g_gamma = 22;
601 g_esp_col_hostile[0] = 255; 608 g_esp_col_hostile[0] = 255;
602 g_esp_col_hostile[1] = 60; 609 g_esp_col_hostile[1] = 60;