| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
- Hook IVModelRender::DrawModelExecute (VEngineModel016 slot 19) and force
models/debug/debugwhite for NPC models, identified by
ModelRenderInfo_t::entity_index.
- Two passes: MATERIAL_VAR_IGNOREZ through walls, then normal depth, with
IMaterial::ColorModulate for the configured colour; restore the shared
material's flag/colour afterwards.
- Material lookup via the IMaterialSystem list, FindMaterial fallback.
- New Chams feature/card with Through walls and colour; [chams] config.
- Remove the temporary ammo/projectile/fuse diagnostics.
|
| |
|
|
|
|
|
|
| |
The datamap offset points at the array length header, so every ammo count was
read one type early. That made the RPG slot read the buckshot count (30) and
permanently exceed the 3-rocket cap, which is why RPG pickups never showed and
grenades/AR2/weapon ammo never hid. Read the elements 4 bytes after the field
offset.
|
| |
|
|
|
|
|
|
|
| |
- Exempt chargers and ammo/supply crates from the fullness filter; reusable
dispensers stay visible at max ammo/health.
- Log the local ammo current/max table once and the first 24 ammo filter
decisions, so the RPG/grenade/weapon cases can be diagnosed.
- Classify the launched w_missile as an RPG projectile (class not item/
weapon) and exclude the w_missile_closed ammo pickup from projectile ESP.
|
| |
|
|
|
|
|
|
|
|
|
| |
The client m_iAmmo/m_hMyWeapons recv props still do not resolve, but the
listen server has the same CBaseCombatCharacter arrays in its datamap. Resolve
m_iAmmo and m_hMyWeapons there:
- reserve ammo comes from server_player_ammo() when the client array is
missing, so full-ammo filtering works (RPG rockets at 3);
- the owned-weapon mask is filled from the server m_hMyWeapons[48] handles,
so fallen weapons count as ammo before the player equips them.
Widen the datamap field-size filter to 512 for the 192-byte handle array.
|
| |
|
|
|
|
|
|
|
|
| |
- Match m_iAmmo/m_hMyWeapons by name prefix so element props such as
m_iAmmo[0] are accepted.
- Handle them before the nested-table recursion, since RecvPropArray3 may put
the element descriptor in m_pDataTable.
- Allow name strings outside client.so (engine/server too), and log the first
16 array props plus the first 8 unreadable prop names so the remaining
resolution failure is visible in the normal log.
|
| |
|
|
|
|
|
|
| |
m_iAmmo and m_hMyWeapons were not resolving (both -1). Array props keep their
element descriptor in m_pArrayProp and its offset can hold the array base; the
walker was also treating a non-null m_pDataTable on an array as a nested table
and skipping the name match. Process array props by name, use the element
offset when present, and log the first 16 array props under HL2H_DEBUG.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Resolve m_iAmmo and m_hMyWeapons arrays from the client recv tables.
- "Only if usable" now compares m_iAmmo[type] against sk_max_* (stock caps as
fallback: RPG rockets 3, AR2 60, ...). Full ammo hides the pickup, including
RPG rockets and fallen weapons converted to ammo.
- Inventory now comes from m_hMyWeapons directly, so fallen weapons are ammo
before the player equips the matching weapon.
- Projection: fall back to local math when ScreenPosition claims "behind" for
a point with positive view depth, and build NPC boxes from vertical samples
so feet behind the near plane no longer drop the whole target. Log the first
8 near-target projection failures for diagnosis.
|
| |
|
|
|
|
|
|
| |
Transition-box edges and projectile radius rings were only drawn when both
endpoints projected. An edge with one corner behind the camera vanished, so a
half-visible box or ring showed nothing. Add a segment projector that clips at
the near plane in view space, then clips the 2D result to the screen bounds,
and use it for both.
|
| |
|
|
|
|
|
|
|
|
|
| |
- world_to_screen now rejects NaN/inf and absurd projections. A point on the
view axis (directly below the feet) could produce NaN and corrupt the
ISurface clip state, hiding the whole ESP for that frame.
- Draw projectile radius rings even when the projectile centre is off-screen
or behind the camera.
- Owner netvars are -1 on this client, so the "owned weapon -> ammo" rule now
accumulates the weapon types the player has actually held (active weapon,
server fallback), reset when the local entity changes.
|
| |
|
|
|
|
|
|
|
| |
- World weapons of a type already in the local player's inventory are retagged
as ammo ("SMG ammo", ...). Inventory scan only counts weapons owned by the
local player index, so NPC weapons do not trigger it.
- Projectile fuse: log det/cur/base/raw server value, and fall back to a
3-second first-sighting countdown when m_flDetonateTime or engine time is
unavailable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Items: "Only if usable" hides health tags at full health and armor at full
suit. Health ceiling is the server player's m_iMaxHealth; armor uses the
server m_ArmorValue against HL2's 100 cap. Fails open when unreadable.
- Projectiles: new Visuals feature/card for thrown grenades, RPG rockets,
helicopter bombs and AR2 balls. Fuse from server m_flDetonateTime vs engine
time; radius from m_DmgRadius with per-type fallback; optional 24-segment
radius ring and FRAG timer label.
- Melee: the killbot now handles the gravity gun as well; only VULNERABLE
targets, 1200-unit range, primary attack to launch the held object, and no
aim-punch compensation because the launch uses EyeVectors.
- Server/netvars: m_ArmorValue, m_flDetonateTime, m_DmgRadius.
|
| |
|
|
|
|
|
| |
Wayland/XWayland discards window gamma ramps, so mat_monitorgamma could not
work on the development setup. Drop the slider, config key and readback.
Keep the in-engine HDR tonemap brightness and document that Fullbright turns
tonemapping off.
|
| |
|
|
|
|
|
|
|
| |
The engine applies mat_monitorgamma (SDL receives changing ramp midpoints),
but Wayland/XWayland compositors discard the window gamma ramp, so the gamma
slider has no visible effect there. Add an in-engine brightness control that
does not depend on the window system: mat_force_tonemap_scale, exposed as
"HDR brightness" (x10, 0 = automatic). Drop the temporary SDL gamma ramp
diagnostic.
|
| |
|
|
|
|
|
| |
The engine clamps mat_monitorgamma at 2.6, so the 2.8..3.0 end of the slider
did nothing. Read the value back one tick later (ClientCmd is queued) and
interpose SDL_SetWindowGammaRamp to see whether the engine pushes a ramp at
all.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ESP: alert state (IDLE/ALERT/COMBAT/SCRIPT), enemy weapon labels, hostile/
neutral/friendly colour pickers, off-screen direction arrows, and
trigger_changelevel volumes with next/previous map labels.
- Aim: silent aim reuses the Aimbot FOV, vischeck and bone settings; add
optional aim-punch compensation for aimbot, silent aim, triggerbot and
melee (server bullets add m_vecPunchAngle to the usercmd angles).
- View: always-on Camera / display card with camera FOV (writes the client
m_iDefaultFOV netvar), viewmodel FOV and monitor gamma (client cvars).
- Movement: Jump assist card with auto crouch-jump and edge jump (point
ground probe 0.12 s ahead).
- Spread: Engine spread override toggle gates the direct RandomFloat zeroing;
off leaves only the seed search.
- Server: entity count/base/classname helpers, trigger_changelevel map name
and world bounds via IServerUnknown/ICollideable.
- Netvars: m_vecPunchAngle and m_iDefaultFOV.
|
| |
|
|
|
|
|
|
|
| |
The ApplySpread random draws are not guaranteed to run in the player's frame
(the compiler can outline them), so the frame-based shooter check missed and
the shotgun kept its seed-minimised spread. The player's FireBullets
RandomSeed call now arms a short 8-draw window; the next RandomFloat draws
return 0. Keep the frame check as the other path. Remove the diagnostics used
to find this.
|
| |
|
|
|
|
|
|
|
| |
Picking the best of 256 pending seeds still leaves the shotgun's 8/12 pellets
a few degrees apart. CShotManipulator::ApplySpread is inlined into
CBaseEntity::FireBullets and draws x/y through the global
CUniformRandomStream; hook its RandomFloat slot and return 0 when the calling
frame's shooter is the local server player. This collapses every pellet onto
the shot direction while NPC fire and client prediction keep their randomness.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The server RandomSeed GOT slot was hardcoded to 0xce1348, measured on the
older bin/server.so. The anniversary branch loads hl2_complete/bin/server.so,
whose R_386_JMP_SLOT for RandomSeed is 0xce5348, so the patch hit unrelated
writable data and no spread silently did nothing.
- Read the relocation from the loaded module's ELF (module_jump_slot) instead
of hardcoding, with the two known offsets as fallback.
- Override whenever the RandomSeed caller's `this` is the local server player
(CBaseEntity::FireBullets) instead of matching a hardcoded return-address
range that also moved between builds.
- m_takedamage is a char (FIELD_CHARACTER) in the 2013 SDK; resolve it as such
and read a byte, so the IMMUNE damage tag actually works.
|
| |
|
|
|
| |
Props render correctly with all seven DrawModel arguments forwarded; the
per-draw model/client/origin log is no longer needed.
|
| |
|
|
|
|
|
|
| |
Draw ARM/VULN/IMM on the left edge of the box with a 10px font and a black
1px shadow, instead of full-size text above the name. The small font is a
second HFont created next to the 16px body font.
CONTEXT: document the DrawModel argument fix and the tag styling.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
DrawModel takes (this, results, info, boneToWorld, flexWeights,
flexDelayedWeights, const Vector &modelOrigin, flags). The hook dropped
modelOrigin, so flags landed in its slot and the real flags were read from
caller stack garbage. studiorender.so 0x83ad0 reads 0x20(%ebp) as the
modelOrigin pointer and 0x24(%ebp) as the flags; passing both restores the
engine's normal draw.
This is the cause of the intermittent (~50%) checkerboard/error-material
props: the draw was being issued with a garbage flag word.
|
| |
|
|
|
|
|
|
|
|
|
| |
- Resolve server m_takedamage (DAMAGE_NO/DAMAGE_EVENTS_ONLY = immune).
- Classify gunship/strider/dropship as ARMORED (OnTakeDamage only accepts
DMG_BLAST; only the RPG passes), and headcrab/antlion/manhack as VULN
(gravity gun / physics impact).
- ESP draws ARMORED/VULN/IMMUNE tags above the name (new "Damage tags"
toggle, [esp] dmg).
- Aimbot, silent aim, triggerbot and melee skip immune targets and armoured
targets unless the active weapon is the RPG.
|
| |
|
|
|
|
|
| |
Drop the temporary DrawModel/SetColor logs now that the prop tint works, and
document the IStudioRender hook layout, the short model-name format used for
prop detection, the SetColor-before-DrawModel ordering, and why prop
materials cannot be tinted directly.
|
| |
|
|
|
|
|
| |
The engine calls SetColorModulation(1,1,1) immediately before DrawModel, so
the in-draw flag never sees it. Set the prop colour at the start of the prop
DrawModel hook instead (colour only, not alpha), and stop applying
ColorModulate to prop materials so only one mechanism touches props.
|
| |
|
|
|
|
| |
The entity-path rewrite of prop_tint_update dropped studio_props_init(), so
the minimal IStudioRender hooks were never installed (no studio: log lines).
Call it while the prop tint is enabled.
|
| |
|
|
|
|
|
|
|
| |
The forced SetColorModulation/SetAlphaModulation calls before DrawModel are
what turned matched props into the error material and destabilised the
material system. Mirror Amalgam instead: set a "drawing a prop" flag around
the original draw and only substitute the colour when the engine itself calls
SetColorModulation during that draw. Log those calls for the first few draws
to see whether the engine applies modulation inside DrawModel at all.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Hooking IStudioRender's draw/setter slots made matched props render the error
material and then crashed the material system ("debug/modelstats has bad
reference count 0 when being bound"). Keep the hook code for reference but do
not install it.
Fix the m_clrRender netvar resolution: the walk picked an embedded table entry
at offset 0, so the earlier entity writes stomped entity vtables. Only accept
offsets inside C_BaseEntity (0x20..0x2000), then write the prop colour there
for models/props entities. Restore white when disabled.
|
| |
|
|
|
|
|
|
| |
studiohdr_t::name is not "models/props/...". In this build it is the short
model name with Windows separators, e.g. "props_junk\wood_crate002a.mdl"
(the models/ prefix is stripped). Normalise the prefix/separators and match
props/, props\ and props_ (excluding the distant props_skybox set), so the
studio hooks actually recognise prop draws.
|
| |
|
|
|
|
|
| |
Log the first crate materials the tint pass modifies and the first DrawModel/
DrawModelArray calls with their model names, to see whether the crates are
brush materials that were never reached, materials loaded after the tint was
applied, or a studio draw path that is still missed.
|
| |
|
|
|
|
|
|
|
|
|
| |
m_clrRender resolved to offset 0 in this build; writing it stomped entity
vtables instead of tinting anything. Remove that path.
The static-prop logging showed DrawModelStaticProp is never called for these
props, so hook the other studio draw entries as well: DrawModel (29) for
entity models and DrawModelArray (46, the instanced static-prop path). Both
read the model name from DrawModelInfo_t::m_pStudioHdr and force the prop
colour for models/props* draws.
|
| |
|
|
|
|
|
|
|
| |
Static props commonly use brush-style props/... materials
(props/woodcrate001a is LightmappedGeneric), so the models/props-only filter
missed them. Include the props/ prefix.
Also log the first static prop studio draws and a 500-draw summary so we can
see whether the engine draws props through DrawModelStaticProp at all.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the crates are prop_static, which have no client entity, so writing
m_clrRender only reached the three dynamic ones. Hook the StudioRender
interface (VStudioRender025) on the interface object's vtable: substitute the
prop colour in SetColorModulation/SetAlphaModulation while
DrawModelStaticProp is drawing a models/props model, and set the modulation
explicitly before the original draw in case the engine sets it just before the
call.
Vtable indices verified by disassembling CStudioRenderContext: 27 = three
float stores from the argument pointer, 28 = one float, 30 = the
DrawModelInfo_t-drawing entry with three arguments (the 2013 SDK header lists
these slots five positions earlier in this build).
|
| |
|
|
|
|
|
|
|
|
| |
Prop model materials (VertexLitGeneric) ignore IMaterial::ColorModulate: the
engine feeds StudioRender the per-entity render colour (m_clrRender) on every
draw, so the material-side tint never showed on crates and other props.
Resolve m_clrRender from DT_BaseEntity and, every 10 ms while World tint and
Props are enabled, write the prop colour into every entity whose model is
under models/props. Restore white once when disabled.
|
| |
|
|
|
|
| |
The procedural texture reaches the sky sampler with the red and blue channels
exchanged (blue sky rendered orange/yellow), while the game's own textures are
correct. Swap R/B in the decoded buffer so the sampled colours match the PNG.
|
| |
|
|
|
|
|
|
|
|
| |
Move the HDR decision from texture load to apply_sky_texture, after the sky
materials have definitely been enumerated: compensate the pixel buffer
(sRGB -> linear, alpha = 1/8) and re-download the procedural texture before
assigning it. The earlier load-time check ran before the materials were
visible and silently chose the LDR path, so the 8x HDR decode stayed.
Also log the compensation explicitly so the chosen path is visible.
|
| |
|
|
|
|
| |
The material reports shader "Sky_HDR_DX9", not "sky", so the linear/alpha
compensation was never applied and the raw sRGB image was scaled by the HDR
decode's 8x. Match the Sky_HDR prefix so the compensation path is used.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The HDR "sky" shader samples the compressed texture as rgb *= alpha,
multiplies by 8, then converts linear->sRGB for display. Feeding it the raw
sRGB image produced the blown-out / oversaturated sky.
When the map uses the HDR sky shader, pre-convert the image to linear and set
alpha to 1/8 so the 8x scale cancels and the final linear->sRGB conversion
restores the original colours. For LDR (UnlitGeneric) materials, create the
texture with TEXTUREFLAGS_SRGB so the normal sRGB sampling is used.
The first sky material's shader name is logged for confirmation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last crash happened after "applied", in materialsystem while the renderer
walked a shader-parameter list that contained a null vtable entry. That points
at the Refresh()/SetUndefined experiment: undefining $hdrcompressedtexture
while the sky shader's static combo still expected it (and rebuilding state
mid-level) left a broken material.
Set the texture on $basetexture/$hdrbasetexture/$hdrcompressedtexture (and the
0/1/2 variants) and do neither SetUndefined nor Refresh: the visible-path
material binds its base texture dynamically, which is what made the earlier
black sky (empty 798x798 VTF) appear black at all. Log the first sky
material's shader name so we know whether this map uses the LDR (UnlitGeneric)
or HDR (sky) path.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- The material system rejects textures whose dimensions are not multiples of 4
("Image dimensions must be multiple of 4!"), so scale the decoded image to
the next power of two (bilinear). 798x798 -> 1024x1024. The invalid VTF also
crashed the renderer after the apply.
- Move skybox_update() out of the VGUI paint hook into the FRAME_RENDER_START
FrameStageNotify stage. ITexture::Download only regenerates bits when the
material system considers the frame render-safe; during paint it returned
early, the regenerator never ran (no pixels), and a later upload of the
empty VTF crashed.
- Log the regenerator entry so the log shows whether the upload path ran.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The HDR sky materials use the "sky" shader with $hdrcompressedtexture (DXT5).
Assigning an RGBA8 procedural texture there sampled as compressed data and
rendered black. Point $hdrbasetexture at the image, undefine
$hdrcompressedtexture (and its 0/1/2 variants) so the shader falls back, and
call IMaterial::Refresh (37) because the sky shader binds textures in
SHADER_INIT, which is otherwise cached.
GUI: draw_checkbox and the card expand chevron ignored the content clip, so
cards scrolled out of view leaked header widgets outside the window.
Log the first regenerator call (size/pitch/first pixel) for diagnosis.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
client.so, engine.so and vguimatsurface.so all export their own
png_create_read_struct. Loading the system libpng16 made its internal calls
bind to the game's older libpng, whose png_struct layout differs, so
png_safe_warning read a NULL error_ptr and crashed.
Replace libpng with a small PNG reader: zlib's uncompress (dlopen'ed) plus the
five PNG row filters, supporting 8-bit non-interlaced RGB/RGBA/gray/palette
images with tRNS alpha for palettes. Output verified byte-identical to libpng
for the skybox.png in use.
|
| |
|
|
|
|
|
|
|
|
|
| |
The crash was CreateTextureFromBits: this build's IMaterialSystem interface
stops at GetDisplayDeviceName, and the slots after it are CMaterialSystem's
own virtuals, so index 134 was an unrelated function.
Use CreateProceduralTexture (81, verified by disassembling the interface
vtable) together with an ITextureRegenerator (SetTextureRegenerator 12,
Download 13) that fills mip 0 via IVTFTexture::ImageData (39; IVTFTexture has
a two-slot virtual destructor, so Width=15, Height=16, RowSizeInBytes=19).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sv_skyname did not take effect at runtime in this build, so the Skybox card now
replaces the skybox materials' textures with <config dir>/skybox.png.
The PNG is decoded through libpng16's simplified API (dlopen'ed, so no new link
dependency) and uploaded with IMaterialSystem::CreateTextureFromBits as an
RGBA8888 texture. IMaterialVar::SetTextureValue assigns it to $basetexture and
the HDR variants for every material in the SkyBox textures group (all six
faces get the same image).
Original textures are recorded per material/var (texture pointer plus string
fallback) and restored when the feature is off. Records survive level changes
so a reused sky material is still restorable; the override is re-applied to a
new map automatically. The card shows the image path and has a Reload image
button; a missing/unreadable PNG raises an error toast.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
New Visuals -> Skybox card with a runtime sv_skyname override using the same
mechanism as the stock skybox_swapper entity. The choice list is the HL2
skybox set extracted from the game VPKs.
The map's own sky is captured from loaded materials (SkyBox group, parsing
skybox/<name>... face names) before the first override, so turning the
feature off or picking "Map default" restores it; a level change restores it
implicitly. Sky changes invalidate the world tint so new sky materials are
tinted as well.
GUI: add a CK_CHOICE control (value box with < / > zones).
|
| |
|
|
|
|
|
|
|
|
| |
Read the server m_NPCState and mark NPC_STATE_SCRIPT actors neutral so
cutscene NPCs and scripted pets are not aimbot targets and draw in the
neutral colour. Add Lamarr (Kleiner's pet headcrab) to the neutral model
list as requested.
Also log state changes in the NPC debug line and resolve/log m_NPCState in
the server datamap summary.
|
| |
|
|
|
|
|
|
|
|
| |
- World tint now also colours prop materials (models/props*) with their own
colour, covering static props and prop_physics while leaving NPC, player and
weapon materials untouched.
- New Fog card: fog_override colour/start/end via ClientCmd, optional skybox
fog, and a Remove fog mode. Restores the map fog (fog_override 0) when
disabled and re-applies after level changes.
- Config sections [worldtint] prop/colour keys and [fog].
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Replace the six RGB sliders on the World tint card with a CK_COLOR control:
each row shows a live swatch and expands an inline picker with a
saturation/value square, a hue bar, and hex/RGB preview. The picker grows the
card in place so it scrolls/clips like any other row, keeps HSV state while
open (grey does not lose its hue), writes the shared 0-255 RGB triple used by
the config, and saves on mouse release.
Costs ~1.2k small rects per frame only while a picker is open; no texture
interface needed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Port Amalgam's modulation approach: obtain IMaterialSystem from the already
loaded materialsystem.so (VMaterialSystem080) and walk materials with
FirstMaterial/NextMaterial/GetMaterial. ColorModulate the "World textures"
group (sky names excluded) and the "SkyBox textures"/sky-named group.
The walk runs only when the enabled groups or colours change, restores white
when disabled, and re-applies after level changes. Before touching materials,
GetNumMaterials() and the first material's name/group are sanity-checked so a
wrong vtable slot logs and aborts instead of walking garbage.
GUI: "World tint" card with world/sky toggles and RGB sliders; config section
[worldtint].
|
| | |
|