summaryrefslogtreecommitdiffstats
path: root/src/objects
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/objects
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/objects')
-rw-r--r--src/objects/CutsceneHead.cpp2
-rw-r--r--src/objects/CutsceneObject.cpp2
-rw-r--r--src/objects/Object.cpp12
3 files changed, 8 insertions, 8 deletions
diff --git a/src/objects/CutsceneHead.cpp b/src/objects/CutsceneHead.cpp
index 3ef257d2..0938960e 100644
--- a/src/objects/CutsceneHead.cpp
+++ b/src/objects/CutsceneHead.cpp
@@ -131,7 +131,7 @@ CCutsceneHead::RenderLimb(int32 bone)
RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(m_parentObject->GetClump());
int idx = RpHAnimIDGetIndex(hier, bone);
RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier);
- CPedModelInfo *mi = (CPedModelInfo*)CModelInfo::GetModelInfo(m_modelIndex);
+ CPedModelInfo *mi = (CPedModelInfo *)CModelInfo::GetModelInfo(GetModelIndex());
switch(bone){
case BONE_Lhand:
atomic = mi->getLeftHand();
diff --git a/src/objects/CutsceneObject.cpp b/src/objects/CutsceneObject.cpp
index 492d5416..5c10d37d 100644
--- a/src/objects/CutsceneObject.cpp
+++ b/src/objects/CutsceneObject.cpp
@@ -100,7 +100,7 @@ void
CCutsceneObject::RenderLimb(int32 bone)
{
RpAtomic *atomic;
- CPedModelInfo *mi = (CPedModelInfo*)CModelInfo::GetModelInfo(m_modelIndex);
+ CPedModelInfo *mi = (CPedModelInfo *)CModelInfo::GetModelInfo(GetModelIndex());
switch(bone){
case BONE_head:
atomic = mi->getHead();
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp
index 1ae5e9b0..1587749d 100644
--- a/src/objects/Object.cpp
+++ b/src/objects/Object.cpp
@@ -57,7 +57,7 @@ CObject::CObject(int32 mi, bool createRW)
CObject::CObject(CDummyObject *dummy)
{
- SetModelIndexNoCreate(dummy->m_modelIndex);
+ SetModelIndexNoCreate(dummy->GetModelIndex());
if (dummy->m_rwObject)
AttachToRwObject(dummy->m_rwObject);
@@ -97,7 +97,7 @@ CObject::ProcessControl(void)
m_vecMoveSpeed *= fTimeStep;
m_vecTurnSpeed *= fTimeStep;
}
- if ((m_modelIndex == MI_EXPLODINGBARREL || m_modelIndex == MI_PETROLPUMP) && bHasBeenDamaged && bIsVisible
+ if ((GetModelIndex() == MI_EXPLODINGBARREL || GetModelIndex() == MI_PETROLPUMP) && bHasBeenDamaged && bIsVisible
&& (CGeneral::GetRandomNumber() & 0x1F) == 10) {
bExplosionProof = true;
bIsVisible = false;
@@ -159,7 +159,7 @@ CObject::ObjectDamage(float amount)
return;
static int8 nFrameGen = 0;
bool bBodyCastDamageEffect = false;
- if (m_modelIndex == MI_BODYCAST){
+ if (GetModelIndex() == MI_BODYCAST) {
if (amount > 50.0f)
nBodyCastHealth = (int16)(nBodyCastHealth - 0.5f * amount);
if (nBodyCastHealth < 0)
@@ -310,7 +310,7 @@ void
CObject::Init(void)
{
m_type = ENTITY_TYPE_OBJECT;
- CObjectData::SetObjectData(m_modelIndex, *this);
+ CObjectData::SetObjectData(GetModelIndex(), *this);
m_nEndOfLifeTime = 0;
ObjectCreatedBy = GAME_OBJECT;
bIsStatic = true;
@@ -333,9 +333,9 @@ CObject::Init(void)
m_pCurSurface = outEntity;
else
m_pCurSurface = nil;
- if (m_modelIndex == MI_BODYCAST)
+ if (GetModelIndex() == MI_BODYCAST)
nBodyCastHealth = 1000;
- else if (m_modelIndex == MI_BUOY)
+ else if (GetModelIndex() == MI_BUOY)
bTouchingWater = true;
}