diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 21:11:32 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 21:11:32 +0100 |
| commit | c91c7248fcb3911a8a2b6442d8657167364a911c (patch) | |
| tree | ca0b0304463c17bc93a67091522fef711f49b526 /src/gui.cpp | |
| parent | Bind labels: name unlisted scancodes instead of showing None (diff) | |
| download | hl2h-c91c7248fcb3911a8a2b6442d8657167364a911c.tar.gz hl2h-c91c7248fcb3911a8a2b6442d8657167364a911c.zip | |
Stucklaunch: fix prop detection and add diagnostics
- Client physics props are CPhysicsProp/CPhysBox, not the server class
prop_physics; the old case-sensitive class check never matched. Detect
MOVETYPE_VPHYSICS first (the reliable signal), then case-insensitive
class/model patterns.
- Log the first few prop checks with index, movetype, class and model so a
failed ground lookup is diagnosable.
- Log once when Stucklaunch is active (with run state, bind and ground
offset), when it engages, and when the ground is not a prop.
- Toast a warning when binding a feature that is not Active yet.
Diffstat (limited to '')
| -rw-r--r-- | src/gui.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui.cpp b/src/gui.cpp index 9af8003..156e496 100644 --- a/src/gui.cpp +++ b/src/gui.cpp | |||
| @@ -879,6 +879,8 @@ static void handle_capture(const unsigned char *keys) { | |||
| 879 | config_save(); | 879 | config_save(); |
| 880 | toastf(TOAST_INFO, "%s bound to %s", card.title, | 880 | toastf(TOAST_INFO, "%s bound to %s", card.title, |
| 881 | scancode_name(card.feat->bind)); | 881 | scancode_name(card.feat->bind)); |
| 882 | if (!card.feat->active) | ||
| 883 | toastf(TOAST_WARN, "%s is not Active yet", card.title); | ||
| 882 | return; | 884 | return; |
| 883 | } | 885 | } |
| 884 | for (int k = 0; k < 512; k++) { | 886 | for (int k = 0; k < 512; k++) { |
| @@ -890,9 +892,12 @@ static void handle_capture(const unsigned char *keys) { | |||
| 890 | card.feat->bind = k; | 892 | card.feat->bind = k; |
| 891 | g_capture_card = -1; | 893 | g_capture_card = -1; |
| 892 | config_save(); | 894 | config_save(); |
| 893 | if (card.feat) | 895 | if (card.feat) { |
| 894 | toastf(TOAST_INFO, "%s bound to %s", card.title, | 896 | toastf(TOAST_INFO, "%s bound to %s", card.title, |
| 895 | scancode_name(card.feat->bind)); | 897 | scancode_name(card.feat->bind)); |
| 898 | if (!card.feat->active) | ||
| 899 | toastf(TOAST_WARN, "%s is not Active yet", card.title); | ||
| 900 | } | ||
| 896 | return; | 901 | return; |
| 897 | } | 902 | } |
| 898 | } | 903 | } |
