diff options
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 69 |
1 files changed, 68 insertions, 1 deletions
| @@ -20,7 +20,9 @@ covers ESP, aimbot, triggerbot and silent aim. | |||
| 20 | - `HL2H_BONE_DEBUG=1` — white marker at each NPC head hitbox. | 20 | - `HL2H_BONE_DEBUG=1` — white marker at each NPC head hitbox. |
| 21 | - `HL2H_NO_SERVER=1` — disable server-side health reads. | 21 | - `HL2H_NO_SERVER=1` — disable server-side health reads. |
| 22 | - Config: `$XDG_CONFIG_HOME/hl2hake/config`, falling back to | 22 | - Config: `$XDG_CONFIG_HOME/hl2hake/config`, falling back to |
| 23 | `~/.config/hl2hake/config`. Plain INI, saved on every change. | 23 | `~/.config/hl2hake/config`. Plain INI, saved on every change. New sections: |
| 24 | `[view]` (camera FOV, viewmodel FOV, gamma x10) and `[movement]` | ||
| 25 | (crouch-jump, edge jump). | ||
| 24 | 26 | ||
| 25 | ## Runtime architecture | 27 | ## Runtime architecture |
| 26 | 28 | ||
| @@ -210,6 +212,48 @@ vocabulary / decisions. | |||
| 210 | resolved with that type (int fallback) and read as a byte. `0/1` means no | 212 | resolved with that type (int fallback) and read as a byte. `0/1` means no |
| 211 | damage. | 213 | damage. |
| 212 | 214 | ||
| 215 | ## ESP additions | ||
| 216 | |||
| 217 | - Alert state: server `m_NPCState` is drawn as a second small left label | ||
| 218 | (`IDLE` grey, `ALERT` yellow, `COMBAT` red, `SCRIPT` blue). Toggle | ||
| 219 | `ESP -> Alert state` (`alert=1`). | ||
| 220 | - Enemy weapon: the NPC's server `m_hActiveWeapon` handle gives the weapon | ||
| 221 | entity, whose server model index is mapped to a short label (`SMG1`, `AR2`, | ||
| 222 | `Shotgun`, `RPG`, ...) with the client class name as fallback. Toggle | ||
| 223 | `ESP -> Enemy weapon` (`weapon=1`). | ||
| 224 | - Colours: hostile / neutral / friendly box, skeleton and name colours are | ||
| 225 | three `CK_COLOR` pickers in the ESP card (`hr/hg/hb`, `nr/ng/nb`, | ||
| 226 | `fr/fg/fb`). Health bars keep their semantic red/yellow/green. | ||
| 227 | - Off-screen arrows: hostiles whose head projection is outside the screen get | ||
| 228 | a chevron clamped to a 26 px margin; behind-the-camera targets use the | ||
| 229 | dot product with the view right vector. Toggle `ESP -> Off-screen arrows` | ||
| 230 | (`arrows=1`). | ||
| 231 | - Map transitions: see below. | ||
| 232 | |||
| 233 | ## Camera / display | ||
| 234 | |||
| 235 | - The rendered camera FOV comes from `CViewRender::OnRenderStart` copying | ||
| 236 | `C_BasePlayer::m_iDefaultFOV` into `default_fov`, so the cheat writes the | ||
| 237 | client netvar each tick when `Camera FOV > 0` (0 = stock 75). | ||
| 238 | - `viewmodel_fov` and `mat_monitorgamma` are client cvars; applied through | ||
| 239 | `ClientCmd` when their slider changes. Gamma is stored as x10 | ||
| 240 | (`[view] gamma=22` = 2.2). Both live in the always-on | ||
| 241 | `Camera / display` card (`[view] fov/vmfov/gamma`). | ||
| 242 | |||
| 243 | ## Map transitions | ||
| 244 | |||
| 245 | - Server-only brush entities: iterate `IVEngineServer::GetEntityCount` / | ||
| 246 | `PEntityOfEntIndex`, ask `IServerNetworkable::GetClassName` (slot 3) for | ||
| 247 | `trigger_changelevel`, read `CChangeLevel::m_szMapName` | ||
| 248 | (`FIELD_CHARACTER`, char[32]) as the next map, and get the volume from | ||
| 249 | `ICollideable::WorldSpaceSurroundingBounds` (slot 17, no virtual dtor; the | ||
| 250 | interface comes from `IServerUnknown::GetCollideable`, slot 4). | ||
| 251 | - The current map name comes from the worldspawn (`entity 0`) model name | ||
| 252 | (`maps/<name>.bsp`). The map before the last change is kept as | ||
| 253 | `g_map_prev`, so the box label reads `-> next` and `prev <map>`. | ||
| 254 | - Scanning runs at 4 Hz in the ESP draw; boxes are projected from their 8 | ||
| 255 | world corners and drawn as an orange outline with a 10 px label. | ||
| 256 | |||
| 213 | ## Bones / ESP | 257 | ## Bones / ESP |
| 214 | 258 | ||
| 215 | - `SetupBones(BONE_USED_BY_ANYTHING)` with engine `Time()`; studio header via | 259 | - `SetupBones(BONE_USED_BY_ANYTHING)` with engine `Time()`; studio header via |
| @@ -242,6 +286,13 @@ vocabulary / decisions. | |||
| 242 | `CInput::CreateMove`, the minimal-spread seed is applied again in `do_move` | 286 | `CInput::CreateMove`, the minimal-spread seed is applied again in `do_move` |
| 243 | (same for triggerbot). Crossbow bolts and RPG rockets are led by target | 287 | (same for triggerbot). Crossbow bolts and RPG rockets are led by target |
| 244 | velocity and travel time; the crossbow also gets its 0.05 gravity drop. | 288 | velocity and travel time; the crossbow also gets its 0.05 gravity drop. |
| 289 | - Silent aim reuses the Aimbot FOV, vischeck and bone selection (it has no | ||
| 290 | separate FOV any more); only its bind and active flag are separate. | ||
| 291 | - Aim punch: the server's bullet direction is `EyeAngles() + | ||
| 292 | m_Local.m_vecPunchAngle` (`CBasePlayer::GetAutoaimVector`). When the new | ||
| 293 | "Compensate aim punch" toggle is on, the aim/silent/melee target angle has | ||
| 294 | the client `m_vecPunchAngle` subtracted, and the triggerbot traces along | ||
| 295 | `view + punch`, so the shot lands on the crosshair target during recoil. | ||
| 245 | - ABH: on the landing/jump tick, face opposite the horizontal velocity with | 296 | - ABH: on the landing/jump tick, face opposite the horizontal velocity with |
| 246 | zero forward/side movement; HL2's jump speed-bound subtraction then | 297 | zero forward/side movement; HL2's jump speed-bound subtraction then |
| 247 | accelerates along the velocity. Camera restored at `FRAME_RENDER_START`. | 298 | accelerates along the velocity. Camera restored at `FRAME_RENDER_START`. |
| @@ -298,6 +349,9 @@ vocabulary / decisions. | |||
| 298 | `CBaseEntity::FireBullets`; the `CUniformRandomStream` wrappers and | 349 | `CBaseEntity::FireBullets`; the `CUniformRandomStream` wrappers and |
| 299 | constructor-time `RandomSeed(0)` resets pass other objects and are left | 350 | constructor-time `RandomSeed(0)` resets pass other objects and are left |
| 300 | alone. | 351 | alone. |
| 352 | - `Spread control -> Engine spread override` (config `engine=1`) gates the | ||
| 353 | direct zeroing; when off, the RandomFloat hook passes through and only the | ||
| 354 | seed search is used. | ||
| 301 | - Seed choice alone cannot remove all of a shotgun's pellet spread: the best | 355 | - Seed choice alone cannot remove all of a shotgun's pellet spread: the best |
| 302 | of 256 sequences still leaves its 8/12 draws apart. `CShotManipulator:: | 356 | of 256 sequences still leaves its 8/12 draws apart. `CShotManipulator:: |
| 303 | ApplySpread` is inlined into `CBaseEntity::FireBullets` and draws x/y via | 357 | ApplySpread` is inlined into `CBaseEntity::FireBullets` and draws x/y via |
| @@ -316,6 +370,19 @@ vocabulary / decisions. | |||
| 316 | single-player those can be written/hooked locally; stock HL2 has no | 370 | single-player those can be written/hooked locally; stock HL2 has no |
| 317 | distance damage falloff. | 371 | distance damage falloff. |
| 318 | 372 | ||
| 373 | ## Jump assist | ||
| 374 | |||
| 375 | - **Auto crouch-jump** (`[movement] crouchjump`): while airborne with the | ||
| 376 | jump button still held and upward velocity, adds `IN_DUCK`; releases it once | ||
| 377 | the ascent ends. Only the bit we added is removed, so a player who holds | ||
| 378 | crouch keeps it. Bhop clears `IN_JUMP` in the air, so this applies to manual | ||
| 379 | jumps. | ||
| 380 | - **Edge jump** (`[movement] edgejump`): on ground, moving >120 u/s, probes a | ||
| 381 | point 0.12 s ahead with a downward `MASK_PLAYERSOLID` trace. No floor within | ||
| 382 | 96 units sets `IN_JUMP`. A startsolid probe (wall/step) counts as ground, so | ||
| 383 | running into walls does not bounce. Both are simple toggles, not features | ||
| 384 | with binds. | ||
| 385 | |||
| 319 | ## Jumpbug | 386 | ## Jumpbug |
| 320 | 387 | ||
| 321 | - Automatic while falling when the predicted landing speed | 388 | - Automatic while falling when the predicted landing speed |
