Merge remote-tracking branch 'upstream/miami' into miami

This commit is contained in:
Nikolay Korolev 2021-01-13 22:03:21 +03:00
commit 9f914dcd10
2 changed files with 9 additions and 9 deletions

View file

@ -172,11 +172,10 @@ workspace "reVC"
filter {} filter {}
function setpaths (gamepath, exepath, scriptspath) function setpaths (gamepath, exepath)
scriptspath = scriptspath or ""
if (gamepath) then if (gamepath) then
postbuildcommands { postbuildcommands {
'{COPYFILE} "%{cfg.buildtarget.abspath}" "' .. gamepath .. scriptspath .. '%{cfg.buildtarget.name}"' '{COPYFILE} "%{cfg.buildtarget.abspath}" "' .. gamepath .. '%{cfg.buildtarget.name}"'
} }
debugdir (gamepath) debugdir (gamepath)
if (exepath) then if (exepath) then
@ -186,7 +185,6 @@ workspace "reVC"
debugdir (gamepath .. (dir or "")) debugdir (gamepath .. (dir or ""))
end end
end end
--targetdir ("bin/%{prj.name}/" .. scriptspath)
end end
if(_OPTIONS["with-librw"]) then if(_OPTIONS["with-librw"]) then
@ -309,7 +307,7 @@ project "reVC"
filter {} filter {}
if(os.getenv("GTA_VC_RE_DIR")) then if(os.getenv("GTA_VC_RE_DIR")) then
setpaths("$(GTA_VC_RE_DIR)/", "%(cfg.buildtarget.name)", "") setpaths("$(GTA_VC_RE_DIR)/", "%(cfg.buildtarget.name)")
end end
filter "platforms:win*" filter "platforms:win*"

View file

@ -4346,7 +4346,7 @@ CCam::ProcessArrestCamOne(void)
((CPed*)TheCamera.pTargetEntity)->m_pedIK.GetComponentPosition(TargetPos, PED_MID); ((CPed*)TheCamera.pTargetEntity)->m_pedIK.GetComponentPosition(TargetPos, PED_MID);
if(FindPlayerPed() && FindPlayerPed()->m_pArrestingCop) if(FindPlayerPed() && FindPlayerPed()->m_pArrestingCop)
cop = 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[0] = ARRESTCAM_OVERSHOULDER;
ArrestModes[1] = ARRESTCAM_ALONGGROUND; ArrestModes[1] = ARRESTCAM_ALONGGROUND;
ArrestModes[2] = ARRESTCAM_OVERSHOULDER; ArrestModes[2] = ARRESTCAM_OVERSHOULDER;
@ -4368,7 +4368,7 @@ CCam::ProcessArrestCamOne(void)
if(FindPlayerPed() && FindPlayerPed()->m_pArrestingCop) if(FindPlayerPed() && FindPlayerPed()->m_pArrestingCop)
cop = 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[0] = ARRESTCAM_OVERSHOULDER;
ArrestModes[1] = ARRESTCAM_LAMPPOST; ArrestModes[1] = ARRESTCAM_LAMPPOST;
ArrestModes[2] = ARRESTCAM_ALONGGROUND; ArrestModes[2] = ARRESTCAM_ALONGGROUND;
@ -4438,6 +4438,7 @@ CCam::ProcessArrestCamOne(void)
pStoredCopPed = nil; pStoredCopPed = nil;
} }
Source = CamSource;
CVector OrigSource = Source; CVector OrigSource = Source;
TheCamera.AvoidTheGeometry(OrigSource, TargetPos, Source, FOV); TheCamera.AvoidTheGeometry(OrigSource, TargetPos, Source, FOV);
Front = TargetPos - Source; Front = TargetPos - Source;
@ -4464,8 +4465,9 @@ CCam::ProcessArrestCamOne(void)
if(nUsingWhichCamera == ARRESTCAM_OVERSHOULDER && pStoredCopPed){ if(nUsingWhichCamera == ARRESTCAM_OVERSHOULDER && pStoredCopPed){
foundPos = GetLookOverShoulderPos(TheCamera.pTargetEntity, pStoredCopPed, TargetPos, CamSource); foundPos = GetLookOverShoulderPos(TheCamera.pTargetEntity, pStoredCopPed, TargetPos, CamSource);
if(CamSource.z > Source.z + ARRESTCAM_S_ROTATION_UP*CTimer::GetTimeStep()) float newZ = Source.z + ARRESTCAM_S_ROTATION_UP*CTimer::GetTimeStep();
CamSource.z = 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){ }else if(nUsingWhichCamera >= ARRESTCAM_ALONGGROUND_RIGHT && nUsingWhichCamera <= ARRESTCAM_ALONGGROUND_LEFT_UP){
CamSource = Source; CamSource = Source;
Front = TargetPos - CamSource; Front = TargetPos - CamSource;