summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-10 13:27:04 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-10 13:27:04 +0100
commit6d56fb41c6e8ab9f26bd66aeac37cde948e46c64 (patch)
treeae9f397e456ed0acf3e157ba48437726d0be54c4
parentPed jump teleport/kill fix (diff)
parentFix repeating pickup sound on revenue pickup (diff)
downloadre3-6d56fb41c6e8ab9f26bd66aeac37cde948e46c64.tar
re3-6d56fb41c6e8ab9f26bd66aeac37cde948e46c64.tar.gz
re3-6d56fb41c6e8ab9f26bd66aeac37cde948e46c64.tar.bz2
re3-6d56fb41c6e8ab9f26bd66aeac37cde948e46c64.tar.lz
re3-6d56fb41c6e8ab9f26bd66aeac37cde948e46c64.tar.xz
re3-6d56fb41c6e8ab9f26bd66aeac37cde948e46c64.tar.zst
re3-6d56fb41c6e8ab9f26bd66aeac37cde948e46c64.zip
-rw-r--r--src/control/Pickups.cpp7
-rw-r--r--src/core/FileLoader.cpp1
-rw-r--r--src/render/Clouds.cpp4
3 files changed, 7 insertions, 5 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index 67e658c6..7bc88321 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -274,10 +274,11 @@ CPickup::CanBePickedUp(CPlayerPed *player, int playerId)
{
assert(m_pObject != nil);
bool cannotBePickedUp =
- (m_pObject->GetModelIndex() == MI_PICKUP_BODYARMOUR && player->m_fArmour > CWorld::Players[playerId].m_nMaxArmour - 0.5f)
- || (m_pObject->GetModelIndex() == MI_PICKUP_HEALTH && player->m_fHealth > CWorld::Players[playerId].m_nMaxHealth - 0.5f)
+ (m_pObject->GetModelIndex() == MI_PICKUP_BODYARMOUR && player->m_fArmour > CWorld::Players[playerId].m_nMaxArmour - 0.2f)
+ || (m_pObject->GetModelIndex() == MI_PICKUP_HEALTH && player->m_fHealth > CWorld::Players[playerId].m_nMaxHealth - 0.2f)
|| (m_pObject->GetModelIndex() == MI_PICKUP_BRIBE && player->m_pWanted->GetWantedLevel() == 0)
- || (m_pObject->GetModelIndex() == MI_PICKUP_KILLFRENZY && (CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame));
+ || (m_pObject->GetModelIndex() == MI_PICKUP_KILLFRENZY && (CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame))
+ || (m_eType == PICKUP_ASSET_REVENUE && m_fRevenue < 10.0f);
return !cannotBePickedUp;
}
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index 4d1cd921..bf017256 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -317,6 +317,7 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname)
buf += 4;
if(model.numLines > 0){
//model.lines = (CColLine*)RwMalloc(model.numLines*sizeof(CColLine));
+ REGISTER_MEMPTR(&model.lines);
for(i = 0; i < model.numLines; i++){
//model.lines[i].Set(*(CVector*)buf, *(CVector*)(buf+12));
buf += 24;
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp
index c7554356..e3a8c86e 100644
--- a/src/render/Clouds.cpp
+++ b/src/render/Clouds.cpp
@@ -265,8 +265,8 @@ CClouds::Render(void)
for(i = 0; i < 37; i++){
RwV3d pos = { 2.0f*CoorsOffsetX[i], 2.0f*CoorsOffsetY[i], 40.0f*CoorsOffsetZ[i] + 40.0f };
- worldpos.x = campos.x*rot_cos + campos.y*rot_sin + pos.x;
- worldpos.y = campos.x*rot_sin + campos.y*rot_cos + pos.y;
+ worldpos.x = pos.x*rot_cos + pos.y*rot_sin + campos.x;
+ worldpos.y = pos.x*rot_sin + pos.y*rot_cos + campos.y;
worldpos.z = pos.z;
if(bCloudOnScreen[i] && CSprite::CalcScreenCoors(worldpos, &screenpos, &szx, &szy, false)){
if(sundist < SCREEN_WIDTH/3){