summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-08 17:07:34 +0200
committeraap <aap@papnet.eu>2019-07-08 17:07:34 +0200
commitedf5ac2626ce17b74037281aa3c9730902b4b1d4 (patch)
treedd3a4838a06a887af9e01d43d70d4c6a9307e24c /src/entities
parentcleaned up patching of virtual functions; started CAutomobile (diff)
downloadre3-edf5ac2626ce17b74037281aa3c9730902b4b1d4.tar
re3-edf5ac2626ce17b74037281aa3c9730902b4b1d4.tar.gz
re3-edf5ac2626ce17b74037281aa3c9730902b4b1d4.tar.bz2
re3-edf5ac2626ce17b74037281aa3c9730902b4b1d4.tar.lz
re3-edf5ac2626ce17b74037281aa3c9730902b4b1d4.tar.xz
re3-edf5ac2626ce17b74037281aa3c9730902b4b1d4.tar.zst
re3-edf5ac2626ce17b74037281aa3c9730902b4b1d4.zip
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Entity.cpp14
-rw-r--r--src/entities/Physical.cpp4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp
index 105f14c3..d562ced5 100644
--- a/src/entities/Entity.cpp
+++ b/src/entities/Entity.cpp
@@ -632,7 +632,7 @@ CEntity::ProcessLightsForEntity(void)
lightOn = true;
else
lightFlickering = true;
- if((CTimer::GetTimeInMilliseconds()>>1 ^ m_randomSeed) & 3)
+ if((CTimer::GetTimeInMilliseconds()>>11 ^ m_randomSeed) & 3)
lightOn = true;
break;
case LIGHT_FLICKER_NIGHT:
@@ -641,7 +641,7 @@ CEntity::ProcessLightsForEntity(void)
lightOn = true;
else
lightFlickering = true;
- if((CTimer::GetTimeInMilliseconds()>>1 ^ m_randomSeed) & 3)
+ if((CTimer::GetTimeInMilliseconds()>>11 ^ m_randomSeed) & 3)
lightOn = true;
}
break;
@@ -680,7 +680,7 @@ CEntity::ProcessLightsForEntity(void)
lightOn = true;
else
lightFlickering = true;
- if((CTimer::GetTimeInMilliseconds()>>1 ^ m_randomSeed*8) & 3)
+ if((CTimer::GetTimeInMilliseconds()>>11 ^ m_randomSeed*8) & 3)
lightOn = true;
}
break;
@@ -693,7 +693,7 @@ CEntity::ProcessLightsForEntity(void)
lightOn = true;
else
lightFlickering = true;
- if((CTimer::GetTimeInMilliseconds()>>1 ^ m_randomSeed*8) & 3)
+ if((CTimer::GetTimeInMilliseconds()>>11 ^ m_randomSeed*8) & 3)
lightOn = true;
}
}
@@ -815,8 +815,8 @@ CEntity::ModifyMatrixForTreeInWind(void)
strength = 0.005f;
}
- mat.GetUp()->x = strength * flutter;
- mat.GetUp()->y = mat.GetUp()->x;
+ mat.GetUp().x = strength * flutter;
+ mat.GetUp().y = mat.GetUp().x;
mat.UpdateRW();
UpdateRwFrame();
@@ -847,7 +847,7 @@ CEntity::ModifyMatrixForBannerInWind(void)
else
strength = 0.66f;
- t = ((int)(GetMatrix().GetPosition()->x + GetMatrix().GetPosition()->y) << 10) + 16*CTimer::GetTimeInMilliseconds();
+ t = ((int)(GetMatrix().GetPosition().x + GetMatrix().GetPosition().y) << 10) + 16*CTimer::GetTimeInMilliseconds();
f = (t & 0x7FF)/(float)0x800;
flutter = f * BannerWindTabel[(t>>11)+1 & 0x1F] +
(1.0f - f) * BannerWindTabel[(t>>11) & 0x1F];
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index 3d45bf52..b2512ec2 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -1883,7 +1883,7 @@ CPhysical::ProcessCollision(void)
if(IsPed() && m_vecMoveSpeed.z == 0.0f &&
!ped->m_ped_flagA2 &&
ped->bIsStanding)
- savedMatrix.GetPosition()->z = GetPosition().z;
+ savedMatrix.GetPosition().z = GetPosition().z;
GetMatrix() = savedMatrix;
CTimer::SetTimeStep(savedTimeStep);
return;
@@ -1891,7 +1891,7 @@ CPhysical::ProcessCollision(void)
if(IsPed() && m_vecMoveSpeed.z == 0.0f &&
!ped->m_ped_flagA2 &&
ped->bIsStanding)
- savedMatrix.GetPosition()->z = GetPosition().z;
+ savedMatrix.GetPosition().z = GetPosition().z;
GetMatrix() = savedMatrix;
CTimer::SetTimeStep(savedTimeStep);
if(IsVehicle()){