diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-10-09 11:02:21 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-10-09 11:24:21 +0200 |
commit | a01b14f301afe9cea86f47b3ab27ce999097741a (patch) | |
tree | 6717762cc85090ec6aecc99cc052c82039debcbe /src/objects/Object.cpp | |
parent | Fix POSIX streaming (diff) | |
download | re3-a01b14f301afe9cea86f47b3ab27ce999097741a.tar re3-a01b14f301afe9cea86f47b3ab27ce999097741a.tar.gz re3-a01b14f301afe9cea86f47b3ab27ce999097741a.tar.bz2 re3-a01b14f301afe9cea86f47b3ab27ce999097741a.tar.lz re3-a01b14f301afe9cea86f47b3ab27ce999097741a.tar.xz re3-a01b14f301afe9cea86f47b3ab27ce999097741a.tar.zst re3-a01b14f301afe9cea86f47b3ab27ce999097741a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/objects/Object.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index daa48d98..9a9eaa73 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -36,6 +36,7 @@ CObject::CObject(void) m_colour2 = 0; m_colour1 = m_colour2; m_nBonusValue = 0; + // m_nCostValue = 0; // TODO(Miami) bIsPickup = false; bPickupObjWithMessage = false; bOutOfStock = false; @@ -44,8 +45,12 @@ CObject::CObject(void) bHasBeenDamaged = false; m_nRefModelIndex = -1; bUseVehicleColours = false; +// bIsStreetLight = false; // duplicate m_pCurSurface = nil; m_pCollidingEntity = nil; + m_nBeachballBounces = 0; + bIsStreetLight = false; + m_area = AREA_EVERYWHERE; } CObject::CObject(int32 mi, bool createRW) @@ -138,12 +143,16 @@ CObject::Render(void) bool CObject::SetupLighting(void) { - DeActivateDirectional(); - SetAmbientColours(); - if(bRenderScorched){ WorldReplaceNormalLightsWithScorched(Scene.world, 0.1f); return true; + } else if (bIsPickup) { + SetFullAmbient(); + return true; + } else if (bIsWeapon) { + ActivateDirectional(); + SetAmbientColoursForPedsCarsAndObjects(); + return true; } return false; } @@ -151,8 +160,10 @@ CObject::SetupLighting(void) void CObject::RemoveLighting(bool reset) { - if(reset) - WorldReplaceScorchedLightsWithNormal(Scene.world); + if(reset) { + SetAmbientColours(); + DeActivateDirectional(); + } } void @@ -363,6 +374,8 @@ CObject::CanBeDeleted(void) return true; case CUTSCENE_OBJECT: return false; + case CONTROLLED_SUB_OBJECT: + return false; default: return true; } |