Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Finished CExplosion
  • Loading branch information
Sergeanur committed Apr 8, 2020
1 parent 5a03409 commit 1f212dfa92b422383e5231cc2419cd6e30a8c454
Showing with 428 additions and 49 deletions.
  1. +0 −1 README.md
  2. +2 −0 src/core/World.cpp
  3. +2 −0 src/core/World.h
  4. +3 −1 src/core/config.h
  5. +2 −2 src/render/Rubbish.cpp
  6. +15 −0 src/vehicles/Bike.h
  7. +1 −0 src/vehicles/Vehicle.h
  8. +391 −32 src/weapons/Explosion.cpp
  9. +12 −13 src/weapons/Explosion.h
@@ -41,7 +41,6 @@ to reverse at the time, calling the original functions is acceptable.
cAudioManager - WIP
CBoat
CBulletInfo
CExplosion
CMenuManager - WIP
CObject
CPacManPickups
@@ -56,6 +56,8 @@ WRAPPER void CWorld::FindMissionEntitiesIntersectingCube(const CVector&, const C
WRAPPER void CWorld::ClearCarsFromArea(float, float, float, float, float, float) { EAXJMP(0x4B50E0); }
WRAPPER void CWorld::ClearPedsFromArea(float, float, float, float, float, float) { EAXJMP(0x4B52B0); }
WRAPPER void CWorld::CallOffChaseForArea(float, float, float, float) { EAXJMP(0x4B5530); }
WRAPPER void CWorld::TriggerExplosion(const CVector& a1, float a2, float a3, CEntity *a4, bool a5) { EAXJMP(0x4B1140); }
WRAPPER void CWorld::SetPedsOnFire(float, float, float, float, CEntity*) { EAXJMP(0x4B3D30); }

void
CWorld::Initialise()
@@ -132,6 +132,7 @@ class CWorld
static void SetAllCarsCanBeDamaged(bool);
static void ExtinguishAllCarFiresInArea(CVector, float);
static void SetCarsOnFire(float, float, float, float, CEntity*);
static void SetPedsOnFire(float, float, float, float, CEntity*);

static void Initialise();
static void AddParticles();
@@ -140,6 +141,7 @@ class CWorld
static void RepositionCertainDynamicObjects();
static void RemoveStaticObjects();
static void Process();
static void TriggerExplosion(const CVector &, float, float, CEntity*, bool);
};

extern CColPoint *gaTempSphereColPoints;
@@ -125,7 +125,9 @@ enum Config {

NUM_GARAGE_STORED_CARS = 6,

NUM_CRANES = 8
NUM_CRANES = 8,

NUM_EXPLOSIONS = 48,
};

// We'll use this once we're ready to become independent of the game
@@ -230,15 +230,15 @@ CRubbish::Update(void)
spawnDist = (CGeneral::GetRandomNumber()&0xFF)/256.0f + RUBBISH_MAX_DIST;
uint8 r = CGeneral::GetRandomNumber();
if(r&1)
spawnAngle = (CGeneral::GetRandomNumber()&0xFF)/256.0f * 6.28f;
spawnAngle = (CGeneral::GetRandomNumber()&0xFF)/256.0f * TWOPI;
else
spawnAngle = (r-128)/160.0f + TheCamera.Orientation;
sheet->m_basePos.x = TheCamera.GetPosition().x + spawnDist*Sin(spawnAngle);
sheet->m_basePos.y = TheCamera.GetPosition().y + spawnDist*Cos(spawnAngle);
sheet->m_basePos.z = CWorld::FindGroundZFor3DCoord(sheet->m_basePos.x, sheet->m_basePos.y, TheCamera.GetPosition().z, &foundGround) + 0.1f;
if(foundGround){
// Found ground, so add to statics list
sheet->m_angle = (CGeneral::GetRandomNumber()&0xFF)/256.0f * 6.28f;
sheet->m_angle = (CGeneral::GetRandomNumber()&0xFF)/256.0f * TWOPI;
sheet->m_state = 1;
if(CCullZones::FindAttributesForCoors(sheet->m_basePos, nil) & ATTRZONE_NORAIN)
sheet->m_isVisible = false;
@@ -0,0 +1,15 @@
#pragma once

// some miami bike leftovers

enum eBikeNodes {
BIKE_NODE_NONE,
BIKE_CHASSIS,
BIKE_FORKS_FRONT,
BIKE_FORKS_REAR,
BIKE_WHEEL_FRONT,
BIKE_WHEEL_REAR,
BIKE_MUDGUARD,
BIKE_HANDLEBARS,
BIKE_NUM_NODES
};
@@ -238,6 +238,7 @@ class CVehicle : public CPhysical
bool IsTrain(void) { return m_vehType == VEHICLE_TYPE_TRAIN; }
bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; }
bool IsPlane(void) { return m_vehType == VEHICLE_TYPE_PLANE; }
bool IsBike(void) { return m_vehType == VEHICLE_TYPE_BIKE; }

void FlyingControl(eFlightModel flightModel);
void ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelContactSpeed, CVector &wheelContactPoint,

0 comments on commit 1f212df

Please sign in to comment.