summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.h
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-03 15:16:31 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-03 16:01:11 +0200
commit5dc410a999f02f1e90c991c9de617bb2b1dc6bbc (patch)
tree4ad32e600c365326d721db8d3d6359e7b4d7f00d /src/control/PathFind.h
parentget rid of III code (diff)
downloadre3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.gz
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.bz2
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.lz
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.xz
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.zst
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.zip
Diffstat (limited to '')
-rw-r--r--src/control/PathFind.h5
1 files changed, 4 insertions, 1 deletions
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);