diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 01:13:09 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 01:13:09 +0100 |
| commit | b9d5965c0366fd7777c3627b9fbf89c8526ac0ec (patch) | |
| tree | 65a1213b902f2a3352ecc19dc76be396e80f63f3 /src/hl2h.h | |
| parent | Skybox image: swap red/blue in the uploaded texture (diff) | |
| download | hl2h-b9d5965c0366fd7777c3627b9fbf89c8526ac0ec.tar.gz hl2h-b9d5965c0366fd7777c3627b9fbf89c8526ac0ec.zip | |
World tint: colour dynamic props through m_clrRender
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.
Diffstat (limited to 'src/hl2h.h')
| -rw-r--r-- | src/hl2h.h | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -96,6 +96,7 @@ struct NetVars { | |||
| 96 | int activeweapon = -1; // client m_hActiveWeapon handle | 96 | int activeweapon = -1; // client m_hActiveWeapon handle |
| 97 | int owner = -1; // client m_hOwnerEntity handle | 97 | int owner = -1; // client m_hOwnerEntity handle |
| 98 | int weapon_owner = -1; // client m_hOwner handle (C_BaseCombatWeapon) | 98 | int weapon_owner = -1; // client m_hOwner handle (C_BaseCombatWeapon) |
| 99 | int clr_render = -1; // client m_clrRender (entity render colour) | ||
| 99 | // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 | 100 | // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 |
| 100 | bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } | 101 | bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } |
| 101 | // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. | 102 | // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. |
| @@ -296,6 +297,7 @@ int engine_get_local_player(); | |||
| 296 | void draw_text_col(int x, int y, const char *s, int r, int g, int b); | 297 | void draw_text_col(int x, int y, const char *s, int r, int g, int b); |
| 297 | void esp_draw(); | 298 | void esp_draw(); |
| 298 | void esp_draw_items(); | 299 | void esp_draw_items(); |
| 300 | void prop_tint_update(); | ||
| 299 | bool world_to_screen(const Vector &w, float &sx, float &sy); | 301 | bool world_to_screen(const Vector &w, float &sx, float &sy); |
| 300 | void set_silent_restore(const QAngle &angles); | 302 | void set_silent_restore(const QAngle &angles); |
| 301 | bool is_visible(const Vector &eye, const Vector &point, | 303 | bool is_visible(const Vector &eye, const Vector &point, |
