diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-08-10 09:44:39 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-08-10 09:44:39 +0200 |
commit | 6a7fdadeaab25e7b17557c30cea4c8be094d9bd9 (patch) | |
tree | 76a3086f2819de9248a2a2cabf00f24eeb5e82b0 /src/entities/Physical.cpp | |
parent | More CCarCtrl (diff) | |
parent | finished CPathFind (diff) | |
download | re3-6a7fdadeaab25e7b17557c30cea4c8be094d9bd9.tar re3-6a7fdadeaab25e7b17557c30cea4c8be094d9bd9.tar.gz re3-6a7fdadeaab25e7b17557c30cea4c8be094d9bd9.tar.bz2 re3-6a7fdadeaab25e7b17557c30cea4c8be094d9bd9.tar.lz re3-6a7fdadeaab25e7b17557c30cea4c8be094d9bd9.tar.xz re3-6a7fdadeaab25e7b17557c30cea4c8be094d9bd9.tar.zst re3-6a7fdadeaab25e7b17557c30cea4c8be094d9bd9.zip |
Diffstat (limited to 'src/entities/Physical.cpp')
-rw-r--r-- | src/entities/Physical.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index 391f1e33..fbd1322d 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -11,6 +11,7 @@ #include "ParticleObject.h" #include "Particle.h" #include "SurfaceTable.h" +#include "PathFind.h" #include "CarCtrl.h" #include "DMAudio.h" #include "Automobile.h" @@ -56,8 +57,8 @@ CPhysical::CPhysical(void) m_phy_flagA80 = false; m_fDistanceTravelled = 0.0f; - m_pedTreadable = nil; - m_carTreadable = nil; + m_treadable[PATH_CAR] = nil; + m_treadable[PATH_PED] = nil; m_phy_flagA10 = false; m_phy_flagA20 = false; @@ -267,16 +268,16 @@ CPhysical::AddCollisionRecord_Treadable(CEntity *ent) { if(ent->IsBuilding() && ((CBuilding*)ent)->GetIsATreadable()){ CTreadable *t = (CTreadable*)ent; - if(t->m_nodeIndicesPeds[0] >= 0 || - t->m_nodeIndicesPeds[1] >= 0 || - t->m_nodeIndicesPeds[2] >= 0 || - t->m_nodeIndicesPeds[3] >= 0) - m_pedTreadable = t; - if(t->m_nodeIndicesCars[0] >= 0 || - t->m_nodeIndicesCars[1] >= 0 || - t->m_nodeIndicesCars[2] >= 0 || - t->m_nodeIndicesCars[3] >= 0) - m_carTreadable = t; + if(t->m_nodeIndices[PATH_PED][0] >= 0 || + t->m_nodeIndices[PATH_PED][1] >= 0 || + t->m_nodeIndices[PATH_PED][2] >= 0 || + t->m_nodeIndices[PATH_PED][3] >= 0) + m_treadable[PATH_PED] = t; + if(t->m_nodeIndices[PATH_CAR][0] >= 0 || + t->m_nodeIndices[PATH_CAR][1] >= 0 || + t->m_nodeIndices[PATH_CAR][2] >= 0 || + t->m_nodeIndices[PATH_CAR][3] >= 0) + m_treadable[PATH_CAR] = t; } } |