From 7d758f3a9f7ad9b46cc9ab296166365597898bf5 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 30 Apr 2020 16:45:45 +0300 Subject: Adding getters and setters for type and status --- src/core/AnimViewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/AnimViewer.cpp') diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp index 36ea20b7..7afda509 100644 --- a/src/core/AnimViewer.cpp +++ b/src/core/AnimViewer.cpp @@ -278,7 +278,7 @@ CAnimViewer::Update(void) // } } else { newEntity = pTarget = new CAutomobile(modelId, RANDOM_VEHICLE); - newEntity->m_status = STATUS_ABANDONED; + newEntity->SetStatus(STATUS_ABANDONED); } newEntity->bIsStuck = true; } else if (modelInfo->m_type == MITYPE_PED) { @@ -296,7 +296,7 @@ CAnimViewer::Update(void) CWorld::Add(newEntity); TheCamera.TakeControl(pTarget, CCam::MODE_MODELVIEW, JUMP_CUT, CAMCONTROL_SCRIPT); } - if (pTarget->m_type == ENTITY_TYPE_VEHICLE || pTarget->m_type == ENTITY_TYPE_PED || pTarget->m_type == ENTITY_TYPE_OBJECT) { + if (pTarget->IsVehicle() || pTarget->IsPed() || pTarget->IsObject()) { ((CPhysical*)pTarget)->m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); } pTarget->GetPosition().z = 0.0f; -- cgit v1.2.3