summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2021-01-15 17:13:05 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2021-01-15 17:13:05 +0100
commit8989b5ea39b06dea9d51e89085ff95d414f2a5c5 (patch)
tree923266843fb6648a13a0183b21b7925f853fd18a /src/core
parentMerge branch 'lcs' of https://github.com/GTAmodding/re3 into lcs (diff)
parentMerge branch 'miami' into lcs (diff)
downloadre3-8989b5ea39b06dea9d51e89085ff95d414f2a5c5.tar
re3-8989b5ea39b06dea9d51e89085ff95d414f2a5c5.tar.gz
re3-8989b5ea39b06dea9d51e89085ff95d414f2a5c5.tar.bz2
re3-8989b5ea39b06dea9d51e89085ff95d414f2a5c5.tar.lz
re3-8989b5ea39b06dea9d51e89085ff95d414f2a5c5.tar.xz
re3-8989b5ea39b06dea9d51e89085ff95d414f2a5c5.tar.zst
re3-8989b5ea39b06dea9d51e89085ff95d414f2a5c5.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Cam.cpp10
-rw-r--r--src/core/SurfaceTable.h1
2 files changed, 7 insertions, 4 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 581e219a..bb3a0fbe 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -4350,7 +4350,7 @@ CCam::ProcessArrestCamOne(void)
((CPed*)TheCamera.pTargetEntity)->m_pedIK.GetComponentPosition(TargetPos, PED_MID);
if(FindPlayerPed() && FindPlayerPed()->m_pArrestingCop)
cop = FindPlayerPed()->m_pArrestingCop;
- if(cop && CGeneral::GetRandomNumberInRange(0.0f, 0.1f) > 0.5f){
+ if(cop && CGeneral::GetRandomNumberInRange(0.0f, 1.0f) > 0.5f){
ArrestModes[0] = ARRESTCAM_OVERSHOULDER;
ArrestModes[1] = ARRESTCAM_ALONGGROUND;
ArrestModes[2] = ARRESTCAM_OVERSHOULDER;
@@ -4372,7 +4372,7 @@ CCam::ProcessArrestCamOne(void)
if(FindPlayerPed() && FindPlayerPed()->m_pArrestingCop)
cop = FindPlayerPed()->m_pArrestingCop;
- if(cop && CGeneral::GetRandomNumberInRange(0.0f, 0.1f) > 0.65f){
+ if(cop && CGeneral::GetRandomNumberInRange(0.0f, 1.0f) > 0.65f){
ArrestModes[0] = ARRESTCAM_OVERSHOULDER;
ArrestModes[1] = ARRESTCAM_LAMPPOST;
ArrestModes[2] = ARRESTCAM_ALONGGROUND;
@@ -4442,6 +4442,7 @@ CCam::ProcessArrestCamOne(void)
pStoredCopPed = nil;
}
+ Source = CamSource;
CVector OrigSource = Source;
TheCamera.AvoidTheGeometry(OrigSource, TargetPos, Source, FOV);
Front = TargetPos - Source;
@@ -4468,8 +4469,9 @@ CCam::ProcessArrestCamOne(void)
if(nUsingWhichCamera == ARRESTCAM_OVERSHOULDER && pStoredCopPed){
foundPos = GetLookOverShoulderPos(TheCamera.pTargetEntity, pStoredCopPed, TargetPos, CamSource);
- if(CamSource.z > Source.z + ARRESTCAM_S_ROTATION_UP*CTimer::GetTimeStep())
- CamSource.z = Source.z + ARRESTCAM_S_ROTATION_UP*CTimer::GetTimeStep();
+ float newZ = Source.z + ARRESTCAM_S_ROTATION_UP*CTimer::GetTimeStep();
+ if(CamSource.z > newZ)
+ CamSource.z = newZ;
}else if(nUsingWhichCamera >= ARRESTCAM_ALONGGROUND_RIGHT && nUsingWhichCamera <= ARRESTCAM_ALONGGROUND_LEFT_UP){
CamSource = Source;
Front = TargetPos - CamSource;
diff --git a/src/core/SurfaceTable.h b/src/core/SurfaceTable.h
index cd08c843..8ff43106 100644
--- a/src/core/SurfaceTable.h
+++ b/src/core/SurfaceTable.h
@@ -81,6 +81,7 @@ inline bool
IsShootThrough(uint8 surfType)
{
switch(surfType)
+ case SURFACE_TRANSPARENT_CLOTH:
case SURFACE_METAL_CHAIN_FENCE:
case SURFACE_TRANSPARENT_STONE:
case SURFACE_SCAFFOLD_POLE: