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 f0afbb260aeef87de8ac3d56fe683025056e2a22
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 cAudioManager - WIP
CBoat CBoat
CBulletInfo CBulletInfo
CExplosion
CMenuManager - WIP CMenuManager - WIP
CObject CObject
CPacManPickups 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::ClearCarsFromArea(float, float, float, float, float, float) { EAXJMP(0x4B50E0); }
WRAPPER void CWorld::ClearPedsFromArea(float, float, float, float, float, float) { EAXJMP(0x4B52B0); } 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::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 void
CWorld::Initialise() CWorld::Initialise()
@@ -132,6 +132,7 @@ class CWorld
static void SetAllCarsCanBeDamaged(bool); static void SetAllCarsCanBeDamaged(bool);
static void ExtinguishAllCarFiresInArea(CVector, float); static void ExtinguishAllCarFiresInArea(CVector, float);
static void SetCarsOnFire(float, float, float, float, CEntity*); static void SetCarsOnFire(float, float, float, float, CEntity*);
static void SetPedsOnFire(float, float, float, float, CEntity*);


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


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


NUM_GARAGE_STORED_CARS = 6, 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 // 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; spawnDist = (CGeneral::GetRandomNumber()&0xFF)/256.0f + RUBBISH_MAX_DIST;
uint8 r = CGeneral::GetRandomNumber(); uint8 r = CGeneral::GetRandomNumber();
if(r&1) if(r&1)
spawnAngle = (CGeneral::GetRandomNumber()&0xFF)/256.0f * 6.28f; spawnAngle = (CGeneral::GetRandomNumber()&0xFF)/256.0f * TWOPI;
else else
spawnAngle = (r-128)/160.0f + TheCamera.Orientation; spawnAngle = (r-128)/160.0f + TheCamera.Orientation;
sheet->m_basePos.x = TheCamera.GetPosition().x + spawnDist*Sin(spawnAngle); sheet->m_basePos.x = TheCamera.GetPosition().x + spawnDist*Sin(spawnAngle);
sheet->m_basePos.y = TheCamera.GetPosition().y + spawnDist*Cos(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; sheet->m_basePos.z = CWorld::FindGroundZFor3DCoord(sheet->m_basePos.x, sheet->m_basePos.y, TheCamera.GetPosition().z, &foundGround) + 0.1f;
if(foundGround){ if(foundGround){
// Found ground, so add to statics list // 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; sheet->m_state = 1;
if(CCullZones::FindAttributesForCoors(sheet->m_basePos, nil) & ATTRZONE_NORAIN) if(CCullZones::FindAttributesForCoors(sheet->m_basePos, nil) & ATTRZONE_NORAIN)
sheet->m_isVisible = false; 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 IsTrain(void) { return m_vehType == VEHICLE_TYPE_TRAIN; }
bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; } bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; }
bool IsPlane(void) { return m_vehType == VEHICLE_TYPE_PLANE; } bool IsPlane(void) { return m_vehType == VEHICLE_TYPE_PLANE; }
bool IsBike(void) { return m_vehType == VEHICLE_TYPE_BIKE; }


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

0 comments on commit f0afbb2

Please sign in to comment.