Fix sniper and water creatures bug, mark some files

This commit is contained in:
eray orçunus
2020-10-09 12:02:21 +03:00
parent ed82c55475
commit a01b14f301
12 changed files with 44 additions and 16 deletions

View File

@ -3,6 +3,8 @@
#include "DummyObject.h"
#include "Pools.h"
// --MIAMI: file done
CDummyObject::CDummyObject(CObject *obj)
{
SetModelIndexNoCreate(obj->GetModelIndex());

View File

@ -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;
}

View File

@ -8,7 +8,7 @@ enum {
MISSION_OBJECT = 2,
TEMP_OBJECT = 3,
CUTSCENE_OBJECT = 4,
ESCALATOR_OBJECT = 5,
CONTROLLED_SUB_OBJECT = 5,
};
enum CollisionSpecialResponseCase

View File

@ -2,6 +2,8 @@
#include "Projectile.h"
// --MIAMI: file done
CProjectile::CProjectile(int32 model) : CObject()
{
m_fMass = 1.0f;

View File

@ -23,7 +23,7 @@ CStingerSegment::CStingerSegment()
m_fBuoyancy = GRAVITY * m_fMass * 0.1f;
bExplosionProof = true;
SetModelIndex(MI_PLC_STINGER);
ObjectCreatedBy = ESCALATOR_OBJECT;
ObjectCreatedBy = CONTROLLED_SUB_OBJECT;
NumOfStingerSegments++;
}