summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-05 13:48:35 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-05 13:48:35 +0200
commite9b334d7bf270682f83c5c18b2d85a25703c1a2d (patch)
treebaa7ed00dedd2b09f99a2bb4958d2837ef6a8da6 /src/control
parentSetPosition, final part (diff)
downloadre3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.gz
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.bz2
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.lz
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.xz
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.zst
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/PathFind.cpp11
-rw-r--r--src/control/Phones.cpp2
-rw-r--r--src/control/Pickups.cpp2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index 86314d36..b8203821 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -661,8 +661,7 @@ CPathFind::CountFloodFillGroups(uint8 type)
if(type == PATH_CAR)
#ifndef MIAMI
printf("Single car node: %f %f %f (%d)\n",
- node->GetX(), node->GetY(), node->GetZ(),
- m_mapObjects[node->objectIndex]->m_modelIndex);
+ node->GetX(), node->GetY(), node->GetZ(), m_mapObjects[node->objectIndex]->GetModelIndex());
#else
printf("Single car node: %f %f %f\n",
node->GetX(), node->GetY(), node->GetZ());
@@ -737,7 +736,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor
// Calculate internal nodes, store them and connect them to defining object
for(i = 0; i < m_numMapObjects; i++){
tileStart = m_numPathNodes;
- start = 12*m_mapObjects[i]->m_modelIndex;
+ start = 12 * m_mapObjects[i]->GetModelIndex();
for(j = 0; j < 12; j++){
if(objectpathinfo[start + j].type == NodeTypeIntern){
CalcNodeCoors(
@@ -826,7 +825,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor
TempListLength = 0;
#ifndef MIAMI
for(i = 0; i < m_numMapObjects; i++){
- start = 12*m_mapObjects[i]->m_modelIndex;
+ start = 12 * m_mapObjects[i]->GetModelIndex();
for(j = 0; j < 12; j++){
if(objectpathinfo[start + j].type != NodeTypeExtern)
continue;
@@ -1056,7 +1055,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor
iseg++;
#ifndef MIAMI
- istart = 12*m_mapObjects[m_pathNodes[i].objectIndex]->m_modelIndex;
+ istart = 12 * m_mapObjects[m_pathNodes[i].objectIndex]->GetModelIndex();
#endif
// Add links to other internal nodes
for(j = Max(oldNumPathNodes, i-12); j < Min(m_numPathNodes, i+12); j++){
@@ -1066,7 +1065,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor
jseg = j-i + iseg;
#ifndef MIAMI
- jstart = 12*m_mapObjects[m_pathNodes[j].objectIndex]->m_modelIndex;
+ jstart = 12 * m_mapObjects[m_pathNodes[j].objectIndex]->GetModelIndex();
if(objectpathinfo[istart + iseg].next == jseg ||
objectpathinfo[jstart + jseg].next == iseg){
#else
diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp
index 27bdc010..136ef7db 100644
--- a/src/control/Phones.cpp
+++ b/src/control/Phones.cpp
@@ -298,7 +298,7 @@ CPhoneInfo::Initialise(void)
for (int i = pool->GetSize() - 1; i >= 0; i--) {
CBuilding *building = pool->GetSlot(i);
if (building) {
- if (building->m_modelIndex == MI_PHONEBOOTH1) {
+ if (building->GetModelIndex() == MI_PHONEBOOTH1) {
CPhone *maxPhone = &m_aPhones[m_nMax];
maxPhone->m_nState = PHONE_STATE_FREE;
maxPhone->m_vecPos = building->GetPosition();
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index bc1bbf1c..6b56cd8f 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -229,7 +229,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
if (m_eType == PICKUP_ON_STREET) {
m_nTimer = CTimer::GetTimeInMilliseconds() + 30000;
} else if (m_eType == PICKUP_ON_STREET_SLOW) {
- if (MI_PICKUP_BRIBE == m_pObject->m_modelIndex)
+ if (MI_PICKUP_BRIBE == m_pObject->GetModelIndex())
m_nTimer = CTimer::GetTimeInMilliseconds() + 300000;
else
m_nTimer = CTimer::GetTimeInMilliseconds() + 720000;