Skip to content

Commit

Permalink
Probably a better fix compared to 9138c3f. Should fix #1726
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Oct 12, 2024
1 parent 1de523d commit f6ac43d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rts/Sim/Objects/SolidObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ class CSolidObject: public CWorldObject {


// these transform a point or vector to object-space
float3 GetObjectSpaceVec(const float3& v) const { return ( (frontdir * v.z) - (rightdir * v.x) + (updir * v.y)); }
float3 GetObjectSpacePos(const float3& p) const { return (pos + (frontdir * p.z) - (rightdir * p.x) + (updir * p.y)); }
float3 GetObjectSpaceVec(const float3& v) const { return ( (frontdir * v.z) + (rightdir * v.x) + (updir * v.y)); }
float3 GetObjectSpacePos(const float3& p) const { return (pos + (frontdir * p.z) + (rightdir * p.x) + (updir * p.y)); }

// note: requires drawPos to have been set first
float3 GetObjectSpaceDrawPos(const float3& p) const { return (drawPos + GetObjectSpaceVec(p)); }

// unsynced mid-{position,vector}s
float3 GetMdlDrawMidPos() const { return (GetObjectSpaceDrawPos(localModel.GetRelMidPos())); }
float3 GetObjDrawMidPos() const { return (GetObjectSpaceDrawPos( relMidPos )); }
float3 GetMdlDrawMidPos() const { return (GetObjectSpaceDrawPos(WORLD_TO_OBJECT_SPACE * localModel.GetRelMidPos())); }
float3 GetObjDrawMidPos() const { return (GetObjectSpaceDrawPos(WORLD_TO_OBJECT_SPACE * relMidPos )); }


int2 GetMapPos() const { return (GetMapPos(pos)); }
Expand Down

0 comments on commit f6ac43d

Please sign in to comment.