From 361808923a099674d7af6701670ecb90d905c337 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 13 Jan 2021 14:16:38 +0100 Subject: arrest cam fixes --- src/core/Cam.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index 731537ef..d8c66279 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -4346,7 +4346,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; @@ -4368,7 +4368,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; @@ -4438,6 +4438,7 @@ CCam::ProcessArrestCamOne(void) pStoredCopPed = nil; } + Source = CamSource; CVector OrigSource = Source; TheCamera.AvoidTheGeometry(OrigSource, TargetPos, Source, FOV); Front = TargetPos - Source; @@ -4464,8 +4465,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; -- cgit v1.2.3 From daf1de550c307b984c0092d3dda4eba5234cbd10 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Wed, 13 Jan 2021 22:02:28 +0300 Subject: fix --- src/control/Script7.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp index 5a70fd28..55068bb6 100644 --- a/src/control/Script7.cpp +++ b/src/control/Script7.cpp @@ -95,8 +95,8 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) CollectParameters(&m_nIp, 2); CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); script_assert(pPed); - ScriptParams[0] = pPed->GetWeapon(ScriptParams[1]).m_eWeaponType; - ScriptParams[1] = pPed->GetWeapon(ScriptParams[1]).m_nAmmoTotal; + ScriptParams[0] = pPed->GetWeapon(ScriptParams[1] - 1).m_eWeaponType; + ScriptParams[1] = pPed->GetWeapon(ScriptParams[1] - 1).m_nAmmoTotal; ScriptParams[2] = CPickups::ModelForWeapon((eWeaponType)ScriptParams[0]); StoreParameters(&m_nIp, 3); return 0; -- cgit v1.2.3 From 7994b80dcf0d62001c3282dacf1cd376abc9955c Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 13 Jan 2021 20:09:53 +0100 Subject: fixed weapon LOS check --- src/weapons/Weapon.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index e2213399..940a6b98 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -911,7 +911,7 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource) CWorld::bIncludeDeadPeds = true; CWorld::bIncludeBikers = true; - CWorld::ProcessLineOfSight(*fireSource, target, point, victim, true, true, true, true, true, false, false, true); + ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, false, false); CWorld::bIncludeDeadPeds = false; CWorld::bIncludeBikers = false; } @@ -924,7 +924,7 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource) shooterPed->TransformToNode(target, PED_HANDR); CWorld::bIncludeBikers = true; - CWorld::ProcessLineOfSight(*fireSource, target, point, victim, true, true, true, true, true, false, false, true); + ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, false, false); CWorld::bIncludeBikers = false; } } @@ -935,7 +935,7 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource) CWorld::bIncludeBikers = true; CWorld::bIncludeDeadPeds = true; CWorld::bIncludeCarTyres = true; - CWorld::ProcessLineOfSight(source, target, point, victim, true, true, true, true, true, false, false, true); + ProcessLineOfSight(source, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, false, false); CWorld::bIncludeBikers = false; CWorld::bIncludeDeadPeds = false; CWorld::bIncludeCarTyres = false; @@ -981,7 +981,7 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource) target *= info->m_fRange; target += *fireSource; CWorld::pIgnoreEntity = shooter; - CWorld::ProcessLineOfSight(*fireSource, target, point, victim, true, true, true, true, true, false, false, true); + ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false); CWorld::pIgnoreEntity = nil; int32 rotSpeed = 1; @@ -1014,7 +1014,7 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource) } CWorld::bIncludeBikers = true; - CWorld::ProcessLineOfSight(*fireSource, target, point, victim, true, true, true, true, true, false, false, true); + ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, false, false); CWorld::bIncludeBikers = false; int32 rotSpeed = 1; @@ -1683,7 +1683,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource) CWorld::bIncludeCarTyres = true; CWorld::bIncludeBikers = true; CWorld::bIncludeDeadPeds = true; - CWorld::ProcessLineOfSight(source, target, point, victim, true, true, true, true, true, false, false, true); + ProcessLineOfSight(source, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, false, false); CWorld::bIncludeDeadPeds = false; CWorld::bIncludeCarTyres = false; } @@ -1716,7 +1716,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource) CWorld::bIncludeDeadPeds = true; CWorld::bIncludeBikers = true; - CWorld::ProcessLineOfSight(*fireSource, target, point, victim, true, true, true, true, true, false, false, true); + ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, false, false); CWorld::bIncludeDeadPeds = false; } CWorld::bIncludeBikers = false; @@ -2329,7 +2329,7 @@ CWeapon::FireM16_1stPerson(CEntity *shooter) CVector source = cam->Source; CVector target = cam->Front*info->m_fRange + source; - if (CWorld::ProcessLineOfSight(source, target, point, victim, true, true, true, true, true, false, false, true)) { + if (ProcessLineOfSight(source, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false)) { CheckForShootingVehicleOccupant(&victim, &point, m_eWeaponType, source, target); } CWorld::pIgnoreEntity = nil; @@ -3176,7 +3176,7 @@ CPed::IsPedDoingDriveByShooting(void) bool CWeapon::ProcessLineOfSight(CVector const &point1, CVector const &point2, CColPoint &point, CEntity *&entity, eWeaponType type, CEntity *shooter, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, bool ignoreSomeObjects) { - return CWorld::ProcessLineOfSight(point1, point2, point, entity, checkBuildings, checkVehicles, checkPeds, checkObjects, checkDummies, ignoreSeeThrough, ignoreSomeObjects); + return CWorld::ProcessLineOfSight(point1, point2, point, entity, checkBuildings, checkVehicles, checkPeds, checkObjects, checkDummies, false, ignoreSomeObjects, true); } -- cgit v1.2.3 From 3a6935f126a9bdebe933578f66eaae208a0d6b5c Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 13 Jan 2021 20:39:00 +0100 Subject: fixed shoot through collision --- src/collision/Collision.cpp | 16 ++++++++++++---- src/core/SurfaceTable.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/collision/Collision.cpp b/src/collision/Collision.cpp index c90390c4..947cad59 100644 --- a/src/collision/Collision.cpp +++ b/src/collision/Collision.cpp @@ -507,12 +507,14 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod for(i = 0; i < model.numSpheres; i++){ if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue; + if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue; if(TestLineSphere(*(CColLine*)newline, model.spheres[i])) return true; } for(i = 0; i < model.numBoxes; i++){ if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue; + if(ignoreShootThrough && IsShootThrough(model.boxes[i].surface)) continue; if(TestLineBox(*(CColLine*)newline, model.boxes[i])) return true; } @@ -522,6 +524,7 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod VuTriangle vutri; for(i = 0; i < model.numTriangles; i++){ if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue; + if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue; CColTriangle *tri = &model.triangles[i]; model.vertices[tri->a].Unpack(vutri.v0); @@ -539,6 +542,7 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod #endif for(; i < model.numTriangles; i++){ if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue; + if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue; CColTriangle *tri = &model.triangles[i]; model.vertices[tri->a].Unpack(vutri.v0); @@ -1333,6 +1337,7 @@ CCollision::ProcessLineOfSight(const CColLine &line, float coldist = 1.0f; for(i = 0; i < model.numSpheres; i++){ if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue; + if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue; if(ProcessLineSphere(*(CColLine*)newline, model.spheres[i], point, coldist)) point.Set(0, 0, model.spheres[i].surface, model.spheres[i].piece); } @@ -1348,6 +1353,7 @@ CCollision::ProcessLineOfSight(const CColLine &line, CColTriangle *lasttri = nil; for(i = 0; i < model.numTriangles; i++){ if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue; + if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue; CColTriangle *tri = &model.triangles[i]; model.vertices[tri->a].Unpack(vutri.v0); @@ -1367,6 +1373,7 @@ CCollision::ProcessLineOfSight(const CColLine &line, float dist; for(; i < model.numTriangles; i++){ if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue; + if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue; CColTriangle *tri = &model.triangles[i]; model.vertices[tri->a].Unpack(vutri.v0); @@ -1466,13 +1473,13 @@ CCollision::ProcessVerticalLine(const CColLine &line, float coldist = 1.0f; for(i = 0; i < model.numSpheres; i++){ - if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue; + if(ignoreSeeThrough && IsSeeThroughVertical(model.spheres[i].surface)) continue; if(ProcessLineSphere(*(CColLine*)newline, model.spheres[i], point, coldist)) point.Set(0, 0, model.spheres[i].surface, model.spheres[i].piece); } for(i = 0; i < model.numBoxes; i++){ - if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue; + if(ignoreSeeThrough && IsSeeThroughVertical(model.boxes[i].surface)) continue; if(ProcessLineBox(*(CColLine*)newline, model.boxes[i], point, coldist)) point.Set(0, 0, model.boxes[i].surface, model.boxes[i].piece); } @@ -1484,7 +1491,7 @@ CCollision::ProcessVerticalLine(const CColLine &line, CColTriangle *lasttri = nil; VuTriangle vutri; for(i = 0; i < model.numTriangles; i++){ - if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue; + if(ignoreSeeThrough && IsSeeThroughVertical(model.triangles[i].surface)) continue; CColTriangle *tri = &model.triangles[i]; model.vertices[tri->a].Unpack(vutri.v0); @@ -1503,7 +1510,7 @@ CCollision::ProcessVerticalLine(const CColLine &line, CVuVector pnt, normal; float dist; for(; i < model.numTriangles; i++){ - if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue; + if(ignoreSeeThrough && IsSeeThroughVertical(model.triangles[i].surface)) continue; CColTriangle *tri = &model.triangles[i]; model.vertices[tri->a].Unpack(vutri.v0); @@ -2289,6 +2296,7 @@ CCollision::DrawColModel(const CMatrix &mat, const CColModel &colModel) } for(i = 0; i < colModel.numBoxes; i++){ +if(IsShootThrough(colModel.boxes[i].surface)) continue; min = colModel.boxes[i].min; max = colModel.boxes[i].max; 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: -- cgit v1.2.3 From ab14a0bc61b8c6dd5a00431518f90de3c6a8a565 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 13 Jan 2021 20:40:20 +0100 Subject: foobar --- src/collision/Collision.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/collision/Collision.cpp b/src/collision/Collision.cpp index 947cad59..703804d9 100644 --- a/src/collision/Collision.cpp +++ b/src/collision/Collision.cpp @@ -2296,7 +2296,6 @@ CCollision::DrawColModel(const CMatrix &mat, const CColModel &colModel) } for(i = 0; i < colModel.numBoxes; i++){ -if(IsShootThrough(colModel.boxes[i].surface)) continue; min = colModel.boxes[i].min; max = colModel.boxes[i].max; -- cgit v1.2.3 From 13b52229be04b265e1fe3d0f76cf4b88e3e72edf Mon Sep 17 00:00:00 2001 From: erorcun Date: Wed, 13 Jan 2021 23:07:12 +0300 Subject: hud ammo fix --- src/render/Hud.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index d7a9d75d..238dfbb5 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -449,10 +449,10 @@ void CHud::Draw() } if (m_WeaponState != FADED_OUT) { CWeapon *weapon = playerPed->GetWeapon(); - uint32 AmmoAmount = CWeaponInfo::GetWeaponInfo((eWeaponType)WeaponType)->m_nAmountofAmmunition; - uint32 AmmoInClip = weapon->m_nAmmoInClip; - uint32 TotalAmmo = weapon->m_nAmmoTotal; - uint32 Ammo, Clip; + int32 AmmoAmount = CWeaponInfo::GetWeaponInfo((eWeaponType)WeaponType)->m_nAmountofAmmunition; + int32 AmmoInClip = weapon->m_nAmmoInClip; + int32 TotalAmmo = weapon->m_nAmmoTotal; + int32 Ammo, Clip; if (AmmoAmount <= 1 || AmmoAmount >= 1000) sprintf(sTemp, "%d", TotalAmmo); -- cgit v1.2.3 From 6a93cc49be79a397bb1549813ba2001fbbab120f Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 14 Jan 2021 00:15:45 +0300 Subject: fix --- src/control/Script8.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp index 74552b23..c34830e7 100644 --- a/src/control/Script8.cpp +++ b/src/control/Script8.cpp @@ -66,7 +66,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) return 0; case COMMAND_WANTED_STARS_ARE_FLASHING: { - CWanted *pWanted = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted; + CWanted* pWanted = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted; UpdateCompareFlag(pWanted->m_nMinWantedLevel - pWanted->m_nWantedLevel > 0); return 0; } @@ -136,7 +136,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) CTheScripts::ReadTextLabelFromScript(&m_nIp, key); m_nIp += KEY_LENGTH_IN_SCRIPT; CVector pos = pPlayerInfo->GetPos(); - CZone *infoZone = CTheZones::FindInformationZoneForPosition(&pos); + CZone* infoZone = CTheZones::FindInformationZoneForPosition(&pos); UpdateCompareFlag(strncmp(key, infoZone->name, 8) == 0); // original code doesn't seem to be using strncmp in here and compare 2 ints instead return 0; } @@ -352,7 +352,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_CREATE_DUST_EFFECT_FOR_CUTSCENE_HELI: { CollectParameters(&m_nIp, 3); - CObject *pHeli = CPools::GetObjectPool()->GetAt(ScriptParams[0]); + CObject* pHeli = CPools::GetObjectPool()->GetAt(ScriptParams[0]); bool found = false; float waterLevel = -1000.0f; CVector pos = pHeli->GetPosition(); @@ -396,11 +396,13 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) return 0; #elif (!defined GTA_PS2) case COMMAND_SET_ONSCREEN_COUNTER_FLASH_WHEN_FIRST_DISPLAYED: + { script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR); uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp); CollectParameters(&m_nIp, 1); //CUserDisplay::OnscnTimer.SetCounterFlashWhenFirstDisplayed(var, ScriptParams[0]); - break; + return 0; + } #endif #if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) case COMMAND_SHUFFLE_CARD_DECKS: -- cgit v1.2.3 From 70358d90b4d75a9fb38c962e6355a52c016cbd59 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 15:30:33 +0100 Subject: Backport fix from re3 --- src/audio/oal/stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index 81a78381..4523b07a 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -4,7 +4,7 @@ #include "stream.h" #include "sampman.h" -#ifdef _WIN32 +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #ifdef AUDIO_OAL_USE_SNDFILE #pragma comment( lib, "libsndfile-1.lib" ) #endif -- cgit v1.2.3 From 0b0d286f5c0ce3bdc4cebccb43adb45c76cb3dab Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 14 Jan 2021 23:15:12 +0300 Subject: incoming "fuck" commit --- src/control/Script2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp index a94bf907..f2d9ed9e 100644 --- a/src/control/Script2.cpp +++ b/src/control/Script2.cpp @@ -1299,9 +1299,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) CollectParameters(&m_nIp, 2); CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); pPed->bScriptObjectiveCompleted = false; - pPed->SetObjective(OBJECTIVE_DESTROY_OBJECT, pVehicle); + pPed->SetObjective(OBJECTIVE_DESTROY_OBJECT, pObject); return 0; } case COMMAND_SET_CHAR_OBJ_DESTROY_CAR: -- cgit v1.2.3 From c7b905c0ec9ce2ff39bf74b5bfc832645a1c6ef1 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 22:06:27 +0100 Subject: More checks before autolinking --- src/audio/sampman_miles.cpp | 2 ++ src/audio/sampman_oal.cpp | 2 +- src/core/Pad.cpp | 2 ++ src/skel/glfw/glfw.cpp | 2 +- src/skel/win/win.cpp | 2 ++ 5 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 2a4286eb..2a9b4a13 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -18,7 +18,9 @@ #include "Timer.h" #include "crossplatform.h" +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #pragma comment( lib, "mss32.lib" ) +#endif // --MIAMI: file done diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index ce6458e6..27b60e8f 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -38,7 +38,7 @@ //TODO: max channels //TODO: loop count -#ifdef _WIN32 +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #pragma comment( lib, "OpenAL32.lib" ) #endif diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index feda19c6..8d55250a 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -10,6 +10,7 @@ #include "crossplatform.h" #include "platform.h" #ifdef XINPUT +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #include #if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1) #pragma comment( lib, "Xinput9_1_0.lib" ) @@ -17,6 +18,7 @@ #pragma comment( lib, "Xinput.lib" ) #endif #endif +#endif #include "Pad.h" #include "ControllerConfig.h" diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index f039819c..e34edf7a 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -223,7 +223,7 @@ psGrabScreen(RwCamera *pCamera) /* ***************************************************************************** */ -#ifdef _WIN32 +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #pragma comment( lib, "Winmm.lib" ) // Needed for time RwUInt32 psTimer(void) diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 1fd959f2..85278432 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -32,6 +32,7 @@ #define WM_GRAPHNOTIFY WM_USER+13 +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #ifndef USE_D3D9 #pragma comment( lib, "d3d8.lib" ) #endif @@ -40,6 +41,7 @@ #pragma comment( lib, "dxguid.lib" ) #pragma comment( lib, "strmiids.lib" ) #pragma comment( lib, "dinput8.lib" ) +#endif #if (defined(_MSC_VER)) #include -- cgit v1.2.3 From 1082b138301767a73877af30509712f7c6f5f6ee Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 22:15:36 +0100 Subject: RE3_NO_AUTOLINK to CMAKE_NO_AUTOLINK --- src/CMakeLists.txt | 2 +- src/audio/oal/stream.cpp | 2 +- src/audio/sampman_miles.cpp | 2 +- src/audio/sampman_oal.cpp | 2 +- src/core/Pad.cpp | 2 +- src/skel/glfw/glfw.cpp | 2 +- src/skel/win/win.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc204d17..ad72eb56 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,7 +36,7 @@ target_compile_definitions(${EXECUTABLE} PRIVATE $,DEBUG,NDEBUG> LIBRW - ${PROJECT}_NO_AUTOLINK + CMAKE_NO_AUTOLINK ) if(LIBRW_PLATFORM_D3D9) diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index 4523b07a..19fa4ec4 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -4,7 +4,7 @@ #include "stream.h" #include "sampman.h" -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #ifdef AUDIO_OAL_USE_SNDFILE #pragma comment( lib, "libsndfile-1.lib" ) #endif diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 2a9b4a13..43c46fc4 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -18,7 +18,7 @@ #include "Timer.h" #include "crossplatform.h" -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #pragma comment( lib, "mss32.lib" ) #endif diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 27b60e8f..e944b05f 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -38,7 +38,7 @@ //TODO: max channels //TODO: loop count -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #pragma comment( lib, "OpenAL32.lib" ) #endif diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index 8d55250a..757f0f50 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -10,7 +10,7 @@ #include "crossplatform.h" #include "platform.h" #ifdef XINPUT -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #include #if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1) #pragma comment( lib, "Xinput9_1_0.lib" ) diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index e34edf7a..3c1dac5d 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -223,7 +223,7 @@ psGrabScreen(RwCamera *pCamera) /* ***************************************************************************** */ -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #pragma comment( lib, "Winmm.lib" ) // Needed for time RwUInt32 psTimer(void) diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 85278432..8738a714 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -32,7 +32,7 @@ #define WM_GRAPHNOTIFY WM_USER+13 -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #ifndef USE_D3D9 #pragma comment( lib, "d3d8.lib" ) #endif -- cgit v1.2.3 From 5acbf9ef59cbfcd5b4a71f6a782b654417db1464 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 22:20:40 +0100 Subject: fix --- src/core/Pad.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index 757f0f50..feda19c6 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -10,7 +10,6 @@ #include "crossplatform.h" #include "platform.h" #ifdef XINPUT -#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #include #if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1) #pragma comment( lib, "Xinput9_1_0.lib" ) @@ -18,7 +17,6 @@ #pragma comment( lib, "Xinput.lib" ) #endif #endif -#endif #include "Pad.h" #include "ControllerConfig.h" -- cgit v1.2.3 From 7541fa7cb73870a2a5af3300c35ec9ad081ec369 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 22:26:36 +0100 Subject: Revert extra checks before autolinking --- src/audio/sampman_miles.cpp | 2 -- src/skel/glfw/glfw.cpp | 2 +- src/skel/win/win.cpp | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 43c46fc4..2a4286eb 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -18,9 +18,7 @@ #include "Timer.h" #include "crossplatform.h" -#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #pragma comment( lib, "mss32.lib" ) -#endif // --MIAMI: file done diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 3c1dac5d..f039819c 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -223,7 +223,7 @@ psGrabScreen(RwCamera *pCamera) /* ***************************************************************************** */ -#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK +#ifdef _WIN32 #pragma comment( lib, "Winmm.lib" ) // Needed for time RwUInt32 psTimer(void) diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 8738a714..1fd959f2 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -32,7 +32,6 @@ #define WM_GRAPHNOTIFY WM_USER+13 -#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #ifndef USE_D3D9 #pragma comment( lib, "d3d8.lib" ) #endif @@ -41,7 +40,6 @@ #pragma comment( lib, "dxguid.lib" ) #pragma comment( lib, "strmiids.lib" ) #pragma comment( lib, "dinput8.lib" ) -#endif #if (defined(_MSC_VER)) #include -- cgit v1.2.3 From 19749effce625c31ab6bb2bf7293fcde94048208 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 15 Jan 2021 17:54:21 +0200 Subject: Fix Jumbo Sound reseting when walking --- src/audio/AudioLogic.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 01b33fa5..b5127fc5 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -4106,6 +4106,7 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol) m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; + m_sQueueSample.m_bReleasingSoundFlag = false; m_sQueueSample.m_nReleasingVolumeDivider = 5; m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bRequireReflection = false; // todo port fix to re3 -- cgit v1.2.3