1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2025-01-09 20:35:27 +00:00

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

This commit is contained in:
Nikolay Korolev 2021-07-24 01:02:23 +03:00
commit dc729009ac
81 changed files with 21 additions and 18 deletions

View file

@ -13,7 +13,7 @@
"src/modelinfo", "src/modelinfo",
"src/objects", "src/objects",
"src/peds", "src/peds",
"src/render", "src/renderer",
"src/rw", "src/rw",
"src/save", "src/save",
"src/skel", "src/skel",

View file

@ -187,7 +187,7 @@
</SETTING> </SETTING>
<SETTING> <SETTING>
<SETTING><NAME>SearchPath</NAME> <SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>..\src\render</VALUE></SETTING> <SETTING><NAME>Path</NAME><VALUE>..\src\renderer</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>Windows</VALUE></SETTING> <SETTING><NAME>PathFormat</NAME><VALUE>Windows</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING> </SETTING>
@ -6712,7 +6712,7 @@
</SETTING> </SETTING>
<SETTING> <SETTING>
<SETTING><NAME>SearchPath</NAME> <SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>..\src\render</VALUE></SETTING> <SETTING><NAME>Path</NAME><VALUE>..\src\renderer</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>Windows</VALUE></SETTING> <SETTING><NAME>PathFormat</NAME><VALUE>Windows</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING> </SETTING>
@ -14909,7 +14909,7 @@
<PATHFORMAT>Windows</PATHFORMAT> <PATHFORMAT>Windows</PATHFORMAT>
</FILEREF> </FILEREF>
</GROUP> </GROUP>
<GROUP><NAME>render</NAME> <GROUP><NAME>renderer</NAME>
<FILEREF> <FILEREF>
<TARGETNAME>Debug</TARGETNAME> <TARGETNAME>Debug</TARGETNAME>
<PATHTYPE>Name</PATHTYPE> <PATHTYPE>Name</PATHTYPE>

View file

@ -273,7 +273,7 @@ project "reLCS"
files { addSrcFiles("src/modelinfo") } files { addSrcFiles("src/modelinfo") }
files { addSrcFiles("src/objects") } files { addSrcFiles("src/objects") }
files { addSrcFiles("src/peds") } files { addSrcFiles("src/peds") }
files { addSrcFiles("src/render") } files { addSrcFiles("src/renderer") }
files { addSrcFiles("src/rw") } files { addSrcFiles("src/rw") }
files { addSrcFiles("src/save") } files { addSrcFiles("src/save") }
files { addSrcFiles("src/skel") } files { addSrcFiles("src/skel") }
@ -304,7 +304,7 @@ project "reLCS"
includedirs { "src/modelinfo" } includedirs { "src/modelinfo" }
includedirs { "src/objects" } includedirs { "src/objects" }
includedirs { "src/peds" } includedirs { "src/peds" }
includedirs { "src/render" } includedirs { "src/renderer" }
includedirs { "src/rw" } includedirs { "src/rw" }
includedirs { "src/save/" } includedirs { "src/save/" }
includedirs { "src/skel/" } includedirs { "src/skel/" }

View file

@ -2965,7 +2965,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
CPed *pPed = params.m_pVehicle->pDriver; CPed *pPed = params.m_pVehicle->pDriver;
if(!pPed) if(!pPed)
break; break;
if(!pPed->HasWeaponSlot(WEAPONSLOT_SUBMACHINEGUN)) { if(!pPed->HasWeaponSlot(WEAPONSLOT_SUBMACHINEGUN) || (params.m_pVehicle->GetModelIndex() == MI_PREDATOR && !pPed->IsPedDoingDriveByShooting())) {
sampleIndex = SFX_UZI_LEFT; sampleIndex = SFX_UZI_LEFT;
frequency = SampleManager.GetSampleBaseFrequency(sampleIndex); frequency = SampleManager.GetSampleBaseFrequency(sampleIndex);
frequency += RandomDisplacement(frequency / 32); frequency += RandomDisplacement(frequency / 32);

View file

@ -2618,6 +2618,9 @@ void CGarages::Save(uint8 * buf, uint32 * size)
//INITSAVEBUF //INITSAVEBUF
*size = 10692; // for some reason it's not actual size again *size = 10692; // for some reason it's not actual size again
//*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage)); //*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage));
#if !defined THIS_IS_STUPID && defined COMPATIBLE_SAVES
memset(buf + 7340, 0, *size - 7340); // garbage data is written otherwise
#endif
CloseHideOutGaragesBeforeSave(); CloseHideOutGaragesBeforeSave();
WriteSaveBuf(buf, NumGarages); WriteSaveBuf(buf, NumGarages);
WriteSaveBuf(buf, (uint32)BombsAreFree); WriteSaveBuf(buf, (uint32)BombsAreFree);

View file

@ -2362,12 +2362,12 @@ CPed::ProcessControl(void)
} else { } else {
obstacleForFlyingOtherDirZ = 501.0f; obstacleForFlyingOtherDirZ = 501.0f;
} }
uint8 flyDir = 0; int16 flyDir = 0;
float feetZ = GetPosition().z - FEET_OFFSET; float feetZ = GetPosition().z - FEET_OFFSET;
#ifdef FIX_BUGS #ifdef FIX_BUGS
if (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f) if (obstacleForFlyingZ > feetZ && obstacleForFlyingZ < 500.0f)
flyDir = 1; flyDir = 1;
else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 500.0f) else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f)
flyDir = 2; flyDir = 2;
#else #else
if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ)) if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ))
@ -2376,8 +2376,8 @@ CPed::ProcessControl(void)
flyDir = 2; flyDir = 2;
#endif #endif
if (flyDir != 0 && !bHeadStuckInCollision) { if (flyDir > 0 && !bHeadStuckInCollision) {
SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point)); GetMatrix().SetTranslateOnly(flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point);
GetMatrix().GetPosition().z += FEET_OFFSET; GetMatrix().GetPosition().z += FEET_OFFSET;
GetMatrix().UpdateRW(); GetMatrix().UpdateRW();
SetLanding(); SetLanding();
@ -3009,7 +3009,7 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints)
lowerSpeedLimit *= 1.5f; lowerSpeedLimit *= 1.5f;
} }
CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL); CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL);
if (!bWasStanding && speed > upperSpeedLimit && (!bPushedAlongByCar || m_vecMoveSpeed.z < lowerSpeedLimit) if (!bWasStanding && ((speed > upperSpeedLimit && !bPushedAlongByCar) || (m_vecMoveSpeed.z < lowerSpeedLimit))
&& m_pCollidingEntity != collidingEnt) { && m_pCollidingEntity != collidingEnt) {
float damage = 100.0f * Max(speed - 0.25f, 0.0f); float damage = 100.0f * Max(speed - 0.25f, 0.0f);

View file

@ -3182,7 +3182,7 @@ bool
CPed::IsPedDoingDriveByShooting(void) CPed::IsPedDoingDriveByShooting(void)
{ {
#ifdef FIX_BUGS #ifdef FIX_BUGS
if (FindPlayerPed() == this && CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_nWeaponSlot == 5) { if (FindPlayerPed() == this && CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_nWeaponSlot == WEAPONSLOT_SUBMACHINEGUN) {
#else #else
if (FindPlayerPed() == this && GetWeapon()->m_eWeaponType == WEAPONTYPE_UZI) { if (FindPlayerPed() == this && GetWeapon()->m_eWeaponType == WEAPONTYPE_UZI) {
#endif #endif