summaryrefslogtreecommitdiffstats
path: root/src/core/AnimViewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/AnimViewer.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp
index 36ea20b7..40a8b09e 100644
--- a/src/core/AnimViewer.cpp
+++ b/src/core/AnimViewer.cpp
@@ -108,7 +108,7 @@ CAnimViewer::Initialise(void) {
CTimeCycle::Initialise();
CCarCtrl::Init();
CPlayerPed *player = new CPlayerPed();
- player->GetPosition() = CVector(0.0f, 0.0f, 0.0f);
+ player->SetPosition(0.0f, 0.0f, 0.0f);
CWorld::Players[0].m_pPed = player;
CDraw::SetFOV(120.0f);
CDraw::ms_fLODDistance = 500.0f;
@@ -148,7 +148,7 @@ LastPedModelId(int modelId)
CBaseModelInfo *model;
for (int i = modelId; i >= 0; i--) {
model = CModelInfo::GetModelInfo(i);
- if (model->m_type == MITYPE_PED)
+ if (model->GetModelType() == MITYPE_PED)
return i;
}
return modelId;
@@ -160,7 +160,7 @@ LastVehicleModelId(int modelId)
CBaseModelInfo* model;
for (int i = modelId; i >= 0; i--) {
model = CModelInfo::GetModelInfo(i);
- if (model->m_type == MITYPE_VEHICLE)
+ if (model->GetModelType() == MITYPE_VEHICLE)
return i;
}
return modelId;
@@ -222,7 +222,7 @@ CAnimViewer::Update(void)
CBaseModelInfo *modelInfo = CModelInfo::GetModelInfo(modelId);
CEntity *newEntity = nil;
- if (modelInfo->m_type == MITYPE_PED) {
+ if (modelInfo->GetModelType() == MITYPE_PED) {
int animGroup = ((CPedModelInfo*)modelInfo)->m_animGroup;
if (animId > ANIM_IDLE_STANCE)
@@ -248,8 +248,9 @@ CAnimViewer::Update(void)
}
CPad::UpdatePads();
CPad* pad = CPad::GetPad(0);
-
+#ifdef DEBUGMENU
DebugMenuProcess();
+#endif
CStreaming::UpdateForAnimViewer();
CStreaming::RequestModel(modelId, 0);
@@ -257,7 +258,7 @@ CAnimViewer::Update(void)
if (!pTarget) {
- if (modelInfo->m_type == MITYPE_VEHICLE) {
+ if (modelInfo->GetModelType() == MITYPE_VEHICLE) {
CVehicleModelInfo* veh = (CVehicleModelInfo*)modelInfo;
if (veh->m_vehicleType != VEHICLE_TYPE_CAR) {
@@ -278,10 +279,10 @@ 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) {
+ } else if (modelInfo->GetModelType() == MITYPE_PED) {
pTarget = newEntity = new CPed(PEDTYPE_CIVMALE);
newEntity->SetModelIndex(modelId);
} else {
@@ -292,18 +293,18 @@ CAnimViewer::Update(void)
}
newEntity->bIsStuck = true;
}
- newEntity->GetPosition() = CVector(0.0f, 0.0f, 0.0f);
+ newEntity->SetPosition(0.0f, 0.0f, 0.0f);
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;
+ pTarget->GetMatrix().GetPosition().z = 0.0f;
- if (modelInfo->m_type != MITYPE_PED) {
+ if (modelInfo->GetModelType() != MITYPE_PED) {
- if (modelInfo->m_type == MITYPE_VEHICLE) {
+ if (modelInfo->GetModelType() == MITYPE_VEHICLE) {
if (pad->NewState.LeftShoulder1 && !pad->OldState.LeftShoulder1) {
nextModelId = LastPedModelId(modelId);
@@ -369,10 +370,11 @@ CAnimViewer::Update(void)
if (pad->NewState.Triangle) {
#ifdef PED_SKIN
if(IsClumpSkinned(pTarget->GetClump()))
- ((CPedModelInfo*)CModelInfo::GetModelInfo(pTarget->m_modelIndex))->AnimatePedColModelSkinned(pTarget->GetClump());
+ ((CPedModelInfo *)CModelInfo::GetModelInfo(pTarget->GetModelIndex()))->AnimatePedColModelSkinned(pTarget->GetClump());
else
#endif
- CPedModelInfo::AnimatePedColModel(((CPedModelInfo*)CModelInfo::GetModelInfo(pTarget->m_modelIndex))->GetHitColModel(), RpClumpGetFrame(pTarget->GetClump()));
+ CPedModelInfo::AnimatePedColModel(((CPedModelInfo *)CModelInfo::GetModelInfo(pTarget->GetModelIndex()))->GetHitColModel(),
+ RpClumpGetFrame(pTarget->GetClump()));
AsciiToUnicode("Ped Col model will be animated as long as you hold the button", gUString);
CMessages::AddMessage(gUString, 100, 0);
}