Peds, eSound and PedState enum, fixes

This commit is contained in:
eray orçunus
2020-06-03 16:16:31 +03:00
parent c498af29aa
commit 5dc410a999
26 changed files with 1089 additions and 638 deletions

View File

@@ -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);