summaryrefslogtreecommitdiffstats
path: root/src/server.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
4 daysStartup crash: skip fullbright command when off; drop bad owner netvars; add ↵salmonik4-8/+26
stage markers
4 daysFix startup crash: use ClientCmd for fullbright; sanitize owner netvarssalmonik2-27/+15
- Poking VEngineCvar004/ConVar vtables directly crashed before the main menu (ConVar uses a secondary IConVar vtable). Use the stable IVEngineClient ClientCmd slot 7 for mat_fullbright instead. - Reject out-of-range m_hOwnerEntity/m_hOwner offsets: the resolver found a bogus negative owner offset (-136296061), which could make item-ESP weapon ownership read wild memory.
4 daysWorld: add Fullbright visual featuresalmonik5-3/+96
- New Visuals card with the usual Active + Bind; default off. Unbound+Active is always-on, a bind makes it hold-to-brighten. - Resolve VEngineCvar004 and set mat_fullbright 1/0 through FindVar (slot 12) and ConVar::SetValue(int) (slot 11), bypassing the console cheat gate. Fall back to ClientCmd if the cvar interface is unavailable. - Reapply after map loads/respawns and persist [fullbright] active/bind. - Log on/off; show an error toast if the cvar cannot be applied.
4 daysVischeck: only glass materials are glass; log font/glass diagnosticssalmonik2-3/+11
4 daysGUI: recover invalid fonts; vischeck: props and bulletproof glasssalmonik5-55/+184
- Validate the GUI font handles with GetTextSize and recreate them when the local player entity or UI scale changes. Small scaled sizes fall back to the proven 16 px size, and the failure log/toast is emitted once instead of every frame. This fixes sessions where the menu rendered with no text after a level transition. - Rework visibility: trace with MASK_SHOT/TRACE_EVERYTHING while ignoring the local player and target, so static props, crates and other NPCs block. Non-solid glass and breakable-glass materials are skipped; solid non-break glass (bulletproof) blocks. Fix CONTENTS_WINDOW 0x2 (was 0x4) in the masks. - Pass self/target to is_visible from aimbot/silent/melee callers.
11 daysHandles: use the 11-bit networked EHANDLE entity indexsalmonik3-5/+9
The client m_hActiveWeapon is a networked EHANDLE: low 11 bits are the entity index and the rest is the serial. Masking with 0xFFFF included serial bits, so on later maps the weapon index became garbage (e.g. 49184/12319) and melee killbot could not recognize the crowbar. Use 0x7FF for client and server active-weapon handles, weapon owner checks and item-ESP weapon skips. Document the layout in CONTEXT.
11 daysMelee: surface weapon state across maps; reset stale cachessalmonik5-1/+47
- Map transitions often leave a non-crowbar weapon active, so the killbot silently does nothing. Log every active-weapon change as a normal `melee: active ... crowbar=0/1` line and toast once suggesting the crowbar. - Recover the crowbar model from the server entity when the client weapon model index is missing/0 after a map change. - Clear the bone cache and aim/silent locks when the local player entity changes (map load/respawn) so stale entity/model data cannot poison melee target selection.
11 daysCombat: fix silent-aim spread seed and lead projectilessalmonik3-3/+77
- Silent aim and triggerbot set IN_ATTACK after CInput::CreateMove, so the minimal-spread seed was never applied to their shots. Re-apply spread_control_apply after setting the attack button, then update the CRC. - Crossbow bolts and RPG rockets are not hitscan. Lead the selected hitbox by target velocity * travel time; the crossbow bolt also gets its 0.05 gravity drop (30 u/s^2). Apply the same correction to the smooth aimbot. - Document both paths in CONTEXT.
11 daysItem ESP: make 0 = unlimited explicit and persistentsalmonik4-38/+22
- config_load now accepts max_dist=0 instead of clamping it to 250, so the "unlimited" setting survives a restart. - The Max distance slider shows "All" at 0 and its tooltip documents 0 = unlimited; the categories log prints max=All. - Skip unclassified entities before projecting them / computing distance. - Keep the removed prop/crate debug logging and the user's rule that the distance slider applies to every tag.
11 daysLogging: per-session file and debug-gated verbose logssalmonik11-67/+111
- Open /tmp/hl2hake.log once in the library constructor with "w" so each session starts clean, use line buffering, flush each line, and close it via atexit. No more fopen/fclose per message. - Add logd() for verbose diagnostics, enabled only with HL2H_DEBUG=1. - Move ESP/NPC scans, item-prop/item-classification logs, aimbot/silent-aim/ melee/triggerbot/spread details, jumpbug tracking, bone dumps, netvar dumps, cmd-modified and ground-trace noise to logd(). - Keep logf() for lifecycle, config, warnings/errors, GUI open/close, item category/tagging summaries and item-crate detections so crate debugging works without the ESP stream. - Supply crates now respect the max-distance slider (user change), with the stale comment and CONTEXT updated. - Document HL2H_DEBUG=1 in play.sh and CONTEXT.
11 daysItem ESP: recover CPhysicsProp model names from the serversalmonik2-4/+21
Client CPhysicsProp entities frequently report m_nModelIndex == 0, so item crates appeared as model=? and were never classified. Fall back to the server entity's m_nModelIndex (set in CItem_ItemCrate::Spawn) when the client model index is missing, then resolve the name through the shared modelinfo.
11 daysItem ESP: fix AR2/RPG/stunstick world-model namessalmonik1-10/+17
HL2 uses w_irifle for the AR2, w_rocket_launcher for the RPG and w_stunbaton for the stunstick. Keep the model-path fallback (with larger buffers) so unknown world models can still be identified in-game, and make the supply-crate marker larger.
11 daysedge-case in weapon displaying and fixing RPG filteringsalmonik1-2/+2
11 daysItem ESP: focus crate diagnostics on nearby props; log build timesalmonik2-3/+3
11 daysDocs: note supply crates ignore the distance limitsalmonik1-2/+3
11 daysItem ESP: always tag supply crates regardless of distancesalmonik1-1/+4
11 daysItem ESP: raise max distance default to 5000 unitssalmonik3-5/+5
11 daysItem ESP: log every crate-like entity for diagnosissalmonik1-7/+9
11 daysItem ESP: tag world weapons, name ammo types, restrict cratessalmonik6-39/+243
- Add a Weapons category and classify world weapon models (crowbar, pistol, revolver, SMG, AR2, shotgun, crossbow, RPG, grenade, gravity gun, stunstick, bugbait, sniper). Skip the active weapon and anything with a valid m_hOwner/m_hOwnerEntity handle so held weapons do not tag. - Label ammo by model: pistol, SMG, AR2, .357, crossbow, shotgun, sniper, flares, AR2 grenade, RPG rocket and specific ammo-crate variants. - Only item_item_crate and item_beacon_crate are supply crates; generic breakable crates are no longer tagged. Crate chunks stay excluded. - Add item diagnostics: category state, prop-like entities with class/model/ kind/distance/origin, and every item crate seen.
11 daysItem ESP: tag breakable wood/plastic/metal cratessalmonik2-1/+16
11 daysRemove stucklaunch; add valuable-item ESPsalmonik7-241/+339
- Drop the stucklaunch feature, its settings, diagnostics and m_hGroundEntity resolution. - Add a Visuals feature that scans the client entity list for valuable pickups: health/medkits/chargers, ammo boxes/crates/grenades, batteries, HEV suit modules/chargers, supply crates and generic items. - Model-first classification with class fallbacks; category toggles, distance labels and a max-distance slider. - Draw colored marker/label tags through walls, independent of the hostile NPC ESP. - Persist [items] active/bind/health/ammo/armor/crates/distance/max_dist; Reset restores defaults; GUI card and CONTEXT updated.
11 daysStucklaunch: fix prop detection and add diagnosticssalmonik4-11/+73
- 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.
11 daysBind labels: name unlisted scancodes instead of showing Nonesalmonik1-1/+11
11 daysToasts: account for panel padding when wrappingsalmonik1-2/+5
11 daysGUI: wrap all text instead of truncatingsalmonik3-174/+250
- Remove ellipsis truncation from text_in; text is never cut to fit. - Add a wrapping helper that breaks at spaces and, for long words such as paths, at character boundaries. Card titles, control labels, info rows, sections, tooltips and toasts now wrap and their rows/panels grow. - Use ISurface::GetTextSize (slot 75) for real glyph widths, with the old estimate only as a fallback before the surface/fonts exist. - Dynamic card header height for wrapped titles; Active/Bind controls stay vertically centered. Slider controls are vertically centered in taller wrapped rows. - Auto-size System buttons to their labels. - Tooltips wrap to a panel sized by the widest line. - Drop the duplicate config path from the footer; the System page shows it wrapped, so the footer hint fits without clipping.
11 daysStucklaunch: alternate attack/use and expose spam ratesalmonik5-16/+44
- Gravity-gun spam now alternates +attack (grab) and +use (drop) instead of pressing both together, which would punt the prop. - Add a Spam rate slider (1..16 ticks, default 2) so the pickup/drop cycle can be tuned; it persists as spam_ticks in [stucklaunch]. - Log the prop index the first few times a stucklaunch engages to aid testing.
11 daysFix tooltip truncation; add Stucklaunch assistsalmonik7-25/+190
Tooltips: text_in() shifted the x position to fit the full string before truncating, which drew the tooltip text outside its box. Truncate to the available width first, then clamp inside the clip. Stucklaunch (Movement): - opt-in feature (Active off by default) with its own bind; - holds jump, alternates +use every 2 ticks to regrab a physics prop, optionally +attack while the gravity gun is active, and air-strafes; - engagement uses m_hGroundEntity (client netvar) latched for ~0.5 s so the prop stays active while airborne; falls back to running whenever active if the netvar is unavailable, with a startup warning to bind it; - does not spawn or place props; the player supplies the prop and initial speed. Config gets [stucklaunch] active/bind/use_spam/gravspam/autostrafe; Reset restores those defaults. CONTEXT documents the assist and its limits.
11 daysOverlay: keep GUI and toasts drawing if the ESP font failssalmonik1-3/+4
11 daysGUI: add on-screen toasts and atomic config writessalmonik8-24/+309
- Toast queue drawn in the top-right by the overlay, independent of the GUI being open. Info/warn/error colors and 6/9/12 s lifetimes; timers start on the first painted frame so startup messages are not missed. - Queue a load toast after install_menu, plus warnings/errors for missing modules/interfaces/netvars, input hooks, fonts, ISurface, server datamap, and spread seed support. - Toast on config reload, reset, bind/unbind and config save failure. - Config saves now write `config.tmp`, flush, then rename it over the real file; failures leave the previous config intact. - config_load reports whether a file was found so Reload can distinguish a successful reload from a missing file. - Update CONTEXT and ISURFACE_STATUS for the single GUI, toasts and atomic config writes.
11 daysGUI: fix footer clipping; remove the old text menusalmonik5-411/+35
- Right-align the footer hint and size the config label from the remaining width, so "INS close" is no longer truncated. - Delete the text-tree menu now that the GUI has feature parity: remove the tree/input/render code, the F1 toggle and menu_force_close. - Keep only held-key polling for feature binds; poll it every frame from outer_draw. - Update CONTEXT/ADR: the GUI is the only menu.
11 daysGUI: wire real feature state and configsalmonik5-200/+438
Replace the dummy preview controls with the actual settings: - cards bind directly to the feature state and the existing option variables; Active/Bind now drive the same gates as the text menu; - every feature persists active+bind, including movement, melee and spread; - config path and build info are real; Reload config re-reads the INI; - Reset defaults is two-click, restores feature settings/binds and keeps the GUI layout; - window position, category and expanded cards persist under [gui] in the same config file; layout saves on drag/category/expand/close; - mouse bind capture handles all five buttons and consumes the click so it cannot re-arm immediately; - Active/Bind tooltips and full scancode names. The old text tree stays on F1 for one verification pass.
11 daysGUI: Insert-only close, freeze mouse look at the sourcesalmonik7-37/+110
Feedback pass: - Insert now toggles the GUI; the old text tree moved to F1. - Remove the title-bar X. Insert is the only close path; Esc only cancels bind capture. - Discard accumulated mouse deltas in CInput::CreateMove before the game can apply them (CInput::ClearStates), so the camera no longer moves for a frame and snaps back. Also skip ExtraMouseSample and zero relative mouse state while the GUI is open. - Strip attack/use/impulse/weapon selection from the command while open; keep jump, duck and walk. Skip combat command edits (spread seed) too. - Widen System page buttons so "Reload config" and "Reset defaults" fit. - Update CONTEXT/ADR for the Insert-only close behavior.
11 daysGUI: allow movement while open; freeze look and block bind capturesalmonik5-23/+133
Feedback pass on the preview shell: - Freeze the rendered view explicitly in CreateMove and again at FRAME_RENDER_START; CInput was still letting mouse look move the camera. - Allow normal WASD/jump/duck movement while the GUI is open; strip attack/use/impulse/weapon selection so GUI clicks do not fire. - While bind capture is active, block all game input. - Esc no longer closes the GUI; it only cancels bind capture. F2 or the title-bar X close the preview. - Interpose SDL_ShowCursor / SDL_SetRelativeMouseMode / warp / window grab so the game cannot re-capture or hide the native cursor while the GUI is open.
11 daysGUI: add F2 preview shell with dummy controlssalmonik7-4/+1326
First vertical slice for the custom ISurface GUI: - window/sidebar/content shell with Movement, Combat, Visuals, Weapons and System categories; - cards with dummy Active/Bind, collapsible settings, toggles, sliders, buttons, bind capture, scrolling and tooltips; - native OS cursor by releasing SDL relative mode; reasserted while open; - F2 toggles the preview; Insert still opens the old text tree; - while the GUI is open, do_move freezes movement/buttons/impulses/view and skips combat features; ESP and the speed graph keep drawing. Dummy controls do not touch the real config yet. The text menu is removed after feature parity in the next pass.
12 daysSpeedgraph: lower the graphsalmonik1-1/+1
12 daysESP/aimbot: mark male, female, monk and Odessa models friendlysalmonik1-3/+3
12 daysSpread control: override the server FireBullets seed for the local playersalmonik4-9/+58
The installed 2024 server ignores the client usercmd random_seed and uses its own shot seed. Force the server's CBaseEntity::FireBullets RandomSeed call for the local player only: - hook the server.so RandomSeed GOT slot (R_386_JUMP_SLOT at 0xce1348); - read the FireBullets `this` from the caller frame and compare it with the local server player base; - replace the seed with the precomputed best single/shotgun window and step it per pellet; NPC shots and everything else pass through. - client prediction still uses the same chosen usercmd seed, so both sides agree on the spread pattern.
12 daysSpread control: add server RandomSeed GOT diagnostic/overridesalmonik1-0/+61
12 daysSpread control: set random_seed after CInput::CreateMovesalmonik2-3/+58
CInput::CreateMove overwrites cmd->random_seed with MD5_PseudoRandom after CHLClient::CreateMove returns, so the seed set from the client-mode hook was being discarded. Hook the IInput vtable slot 3 (CInput::CreateMove), call the original, then apply the spread seed and update the verified command copy and CRC. This also keeps all aim/movement edits since the original copies the command into the verified table.
12 daysSpread control: client-seed no-spreadsalmonik5-15/+202
HL2's CBaseEntity::FireBullets seeds its RNG from the usercmd random_seed (m_bUseServerRandomSeed is false for HL2 weapons), so the client can select the 8-bit seed that puts CShotManipulator::ApplySpread closest to the center. - New feature Spread control -> Active / No spread (both default on). - Precompute the best seed for a single shot and for the shotgun's 8-shot primary (first pellet accurate) and 12-shot secondary windows using the engine's own RandomSeed/RandomFloat from libvstdlib. - Set cmd->random_seed on attack commands; note_modified repairs the CRC. - The random cone offset is neutralized, but the cone size, the pistol accuracy penalty, server view punch and any damage falloff remain server-side; stock HL2 has no distance damage falloff.
12 daysMelee killbot: 360-degree crowbar silent aimsalmonik7-35/+351
- New feature (default on): while the local player's active weapon is the crowbar, pick the nearest visible hostile NPC within the 75-unit crowbar range, sorted by distance to its collision AABB, and attack it through the normal silent-aim path (usercmd view + IN_ATTACK, movement preserved, rendered view restored at FRAME_RENDER_START). - Prefer the nearest visible hitbox center; fall back to the AABB center / closest point when bones are unavailable. Reuses the existing friendly / neutral and life-state filters and the world-only vischeck. - Detect the active weapon from the client m_hActiveWeapon handle, with the authoritative server m_hActiveWeapon handle as a fallback (client entity index from the low 16 bits). - While the crowbar is active and this feature is on, skip the gun aimbot, triggerbot and silent aim so they do not fight over the usercmd view. - Menu: Melee killbot -> Active; config [melee] active=...
12 daysMenu: latch the Insert key and expand the root on opensalmonik1-3/+23
12 daysJumpbug: optional velocity-timed assistsalmonik6-18/+191
The unduck window is only 2 units, while a 625-ups fall moves ~9.3 units per 66.7 Hz movement command, so pure jumpbug is ~20% reliable at that speed. - Add Jumpbug -> Assist timing (default off). When the natural next command would skip [36,38], pin the post-command ducked distance to 37 by writing the vertical velocity for that command. Pure jumpbug remains available with the option off. - Resolve the client local m_vecAbsVelocity (0x11C) via the client datamap and the server m_vecAbsVelocity (0x228) via the server datamap. - Write both the authoritative server velocity (what SetupMove reads through GetAbsVelocity) and the local prediction fields, so the next CreateMove sees the assisted origin on both sides. - Do not write the server m_vecVelocity directly: the datamap scan finds two same-named entries (0x1C and 0x29C); SetAbsVelocity syncs it after movement.
12 daysscript: change the map for testssalmonik1-1/+1
12 daysJumpbug: automatic duck+jump on damaging fallssalmonik5-18/+279
- Predict the landing speed from the current vertical velocity and a swept standing-hull ground trace; engage only when it exceeds PLAYER_MAX_SAFE_FALL_SPEED. - Press duck one command before the unduck window so FinishDuck's 36-unit origin raise places the feet ~37 units above the floor. - On the next command release duck and press jump: PlayerMove runs Duck() before CheckJumpButton, so FinishUnDuck sets ground, the jump executes, and CheckFalling never sees ground for the fall-damage check. - Measure the per-command fall from consecutive airborne origins instead of a fixed tick interval; clear IN_JUMP while waiting so the pogo latch is clear. - New Movement -> Jumpbug -> Active toggle (default on), config [jumpbug].
12 daysSpeed graph: show current speed at the top-rightsalmonik1-0/+6
12 daysSpeed graph: only sample while in-game and unpausedsalmonik1-0/+9
12 daysESP: HUD speed graph (last 10 s)salmonik4-5/+78
- 0.1 s sampling, 100-sample ring; horizontal speed of the local player - small (240x64) panel centered in the lower half of the screen - min 0, max auto-scales to the maximum in the 10 s window; shows max value - ESP -> Show speed graph toggle, persisted as speedgraph=1
12 daysDocs: add roadmap including distance weapon spread thesissalmonik1-0/+13
12 daysESP: draw the FOV circle as a stable screen-space ellipsesalmonik1-20/+39