diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Radar.cpp | 8 | ||||
-rw-r--r-- | src/core/World.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 2a56598a..6fb28184 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -534,7 +534,7 @@ void CRadar::Draw3dMarkers() CEntity *entity = CPools::GetVehiclePool()->GetAt(ms_RadarTrace[i].m_nEntityHandle); if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { CVector pos = entity->GetPosition(); - pos.z += 1.2f * CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 2.5f; + pos.z += 1.2f * CModelInfo::GetColModel(entity->GetModelIndex())->boundingBox.max.z + 2.5f; C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 2.5f, CARBLIP_MARKER_COLOR_R, CARBLIP_MARKER_COLOR_G, CARBLIP_MARKER_COLOR_B, CARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); } break; @@ -558,7 +558,7 @@ void CRadar::Draw3dMarkers() CEntity *entity = CPools::GetObjectPool()->GetAt(ms_RadarTrace[i].m_nEntityHandle); if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { CVector pos = entity->GetPosition(); - pos.z += CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 1.0f + 1.0f; + pos.z += CModelInfo::GetColModel(entity->GetModelIndex())->boundingBox.max.z + 1.0f + 1.0f; C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 1.0f, OBJECTBLIP_MARKER_COLOR_R, OBJECTBLIP_MARKER_COLOR_G, OBJECTBLIP_MARKER_COLOR_B, OBJECTBLIP_MARKER_COLOR_A, 1024, 0.2f, 5); } break; @@ -1560,12 +1560,12 @@ CRadar::ToggleTargetMarker(float x, float y) { if (TargetMarkerId == -1) { int nextBlip; - for (nextBlip = 0; nextBlip < NUMRADARBLIPS; nextBlip++) { + for (nextBlip = NUMRADARBLIPS-1; nextBlip >= 0; nextBlip--) { if (!ms_RadarTrace[nextBlip].m_bInUse) break; } - if (nextBlip == NUMRADARBLIPS) + if (nextBlip == 0) return; ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD; diff --git a/src/core/World.cpp b/src/core/World.cpp index fb0323ae..2de36383 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -365,7 +365,7 @@ CWorld::ProcessLineOfSightSectorList(CPtrList &list, const CColLine &line, CColP colmodel = nil; } else if(e->bUsesCollision) - colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + colmodel = CModelInfo::GetColModel(e->GetModelIndex()); if(colmodel && CCollision::ProcessLineOfSight(line, e->GetMatrix(), *colmodel, point, mindist, ignoreSeeThrough, ignoreShootThrough)) @@ -465,7 +465,7 @@ CWorld::ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CCol if(e->m_scanCode != GetCurrentScanCode() && e->bUsesCollision) { e->m_scanCode = GetCurrentScanCode(); - colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + colmodel = CModelInfo::GetColModel(e->GetModelIndex()); if(CCollision::ProcessVerticalLine(line, e->GetMatrix(), *colmodel, point, mindist, ignoreSeeThrough, false, poly)) entity = e; @@ -666,7 +666,7 @@ CWorld::GetIsLineOfSightSectorListClear(CPtrList &list, const CColLine &line, bo if(e != pIgnoreEntity && !(ignoreSomeObjects && CameraToIgnoreThisObject(e))) { - colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + colmodel = CModelInfo::GetColModel(e->GetModelIndex()); if(CCollision::TestLineOfSight(line, e->GetMatrix(), *colmodel, ignoreSeeThrough, false)) return false; @@ -971,7 +971,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad float distance = diff.Magnitude(); if(e->GetBoundRadius() + radius > distance) { - CColModel *eCol = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + CColModel *eCol = CModelInfo::GetColModel(e->GetModelIndex()); int collidedSpheres = CCollision::ProcessColModels(sphereMat, OurColModel, e->GetMatrix(), *eCol, gaTempSphereColPoints, nil, nil); |