- Status
- Offline
- Joined
- Mar 3, 2026
- Messages
- 330
- Reaction score
- 7
Anyone currently digging into the GoldSrc engine for Day of Defeat? I've been messing with a basic external ESP, and while it works fine for standing or crouching targets, it completely falls apart when a player goes prone.
The issue is pretty standard for external RPM projects: the player class usually gives you a single origin point (middle of the model), and static height/width offsets for 2D boxes just don't align when the model rotates on the XYZ axes while lying down.
Technical Hurdles:
If you're only working with the center point, you need to calculate the 8 corners of an oriented bounding box (OBB) using those rotation variables and then pass them through your WorldToScreen (W2S) function. A simple AABB (Axis-Aligned Bounding Box) will always look scuffed in DoD when someone is prone because their horizontal footprint becomes much larger than their vertical one.
Has anyone found a clean way to distinguish the prone state via a specific flag in the m_fFlags or similar offsets without having to rely on bone data? It's a classic GoldSrc headache where the hull size changes but the origin stays stubborn.
who's handled these rotations in an external build lately?
The issue is pretty standard for external RPM projects: the player class usually gives you a single origin point (middle of the model), and static height/width offsets for 2D boxes just don't align when the model rotates on the XYZ axes while lying down.
Technical Hurdles:
- The origin point doesn't shift dynamically based on the stance, leading to boxes floating above or sinking into the ground.
- Rotation floats (ranging -180 to +180 for yaw and -1 to +1 for normalized vectors) need to be factored into the corner calculations.
- Without bone offsets, you're stuck projecting a 3D bounding box onto a 2D plane.
If you're only working with the center point, you need to calculate the 8 corners of an oriented bounding box (OBB) using those rotation variables and then pass them through your WorldToScreen (W2S) function. A simple AABB (Axis-Aligned Bounding Box) will always look scuffed in DoD when someone is prone because their horizontal footprint becomes much larger than their vertical one.
You basically need to construct a transformation matrix using the player's yaw. Since you have the floats for rotation, you can define the min/max extents for a 'lying' state (e.g., length 70, width 30, height 20) and rotate those points around the origin before projecting to the screen. If you're just doing a 2D box, you'll need to find the min/max X and Y of all 8 projected corners to wrap the model correctly.
Has anyone found a clean way to distinguish the prone state via a specific flag in the m_fFlags or similar offsets without having to rely on bone data? It's a classic GoldSrc headache where the hull size changes but the origin stays stubborn.
who's handled these rotations in an external build lately?