From 5dc410a999f02f1e90c991c9de617bb2b1dc6bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Wed, 3 Jun 2020 16:16:31 +0300 Subject: Peds, eSound and PedState enum, fixes --- src/control/PathFind.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/control/PathFind.h') diff --git a/src/control/PathFind.h b/src/control/PathFind.h index e481f4c6..2896237a 100644 --- a/src/control/PathFind.h +++ b/src/control/PathFind.h @@ -62,7 +62,7 @@ struct CPathNode int16 z; int16 distance; // in path search int16 firstLink; - int8 width; + uint8 width; int8 group; uint8 numLinks : 4; @@ -89,6 +89,7 @@ struct CPathNode float GetZ(void) { return z/8.0f; } bool HasDivider(void) { return width != 0; } float GetDividerWidth(void) { return width/(2*8.0f); } + float GetPedNodeWidth(void) { return width*(31.f/(500.f * 8.f)); } CPathNode *GetPrev(void); CPathNode *GetNext(void); void SetPrev(CPathNode *node); @@ -253,6 +254,8 @@ public: void Save(uint8 *buf, uint32 *size); void Load(uint8 *buf, uint32 size); + static CVector TakeWidthIntoAccountForWandering(CPathNode*, uint16); + CPathNode *GetNode(int16 index); int16 GetIndex(CPathNode *node); -- cgit v1.2.3