Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge pull request #411 from aap/master
finished CBoat
  • Loading branch information
erorcun committed Apr 13, 2020
2 parents a622c9e + 3aae52d commit c35efa23d7da71cdba8e918687f08487df7629db
@@ -33,7 +33,6 @@ to reverse at the time, calling the original functions is acceptable.
### Unreversed / incomplete classes (at least the ones we know) ### Unreversed / incomplete classes (at least the ones we know)
``` ```
cAudioManager - WIP cAudioManager - WIP
CBoat
CBulletInfo CBulletInfo
CPacManPickups CPacManPickups
CPedPath CPedPath
@@ -342,6 +342,7 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Spawn", "Spawn Dodo", [](){ SpawnCar(MI_DODO); }); DebugMenuAddCmd("Spawn", "Spawn Dodo", [](){ SpawnCar(MI_DODO); });
DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); }); DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); });
DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); }); DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); });
DebugMenuAddCmd("Spawn", "Spawn Predator", [](){ SpawnCar(MI_PREDATOR); });


DebugMenuAddVarBool8("Debug", "Draw hud", (int8*)&CHud::m_Wants_To_Draw_Hud, nil); DebugMenuAddVarBool8("Debug", "Draw hud", (int8*)&CHud::m_Wants_To_Draw_Hud, nil);
DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil); DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil);
@@ -21,7 +21,7 @@ CPhysical::CPhysical(void)
{ {
int i; int i;


fForceMultiplier = 1.0f; m_fForceMultiplier = 1.0f;
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f);
m_vecMoveFriction = CVector(0.0f, 0.0f, 0.0f); m_vecMoveFriction = CVector(0.0f, 0.0f, 0.0f);
@@ -29,7 +29,7 @@ class CPhysical : public CEntity
CVector m_vecTurnSpeedAvg; CVector m_vecTurnSpeedAvg;
float m_fMass; float m_fMass;
float m_fTurnMass; // moment of inertia float m_fTurnMass; // moment of inertia
float fForceMultiplier; float m_fForceMultiplier;
float m_fAirResistance; float m_fAirResistance;
float m_fElasticity; float m_fElasticity;
float m_fBuoyancy; float m_fBuoyancy;
@@ -12,6 +12,7 @@
#include "World.h" #include "World.h"
#include "Vehicle.h" #include "Vehicle.h"
#include "Automobile.h" #include "Automobile.h"
#include "Boat.h"
#include "Train.h" #include "Train.h"
#include "Plane.h" #include "Plane.h"
#include "Heli.h" #include "Heli.h"
@@ -80,9 +81,9 @@ RwObjectNameIdAssocation carIds[] = {
}; };


RwObjectNameIdAssocation boatIds[] = { RwObjectNameIdAssocation boatIds[] = {
{ "boat_moving_hi", 1, VEHICLE_FLAG_COLLAPSE }, { "boat_moving_hi", BOAT_MOVING, VEHICLE_FLAG_COLLAPSE },
{ "boat_rudder_hi", 3, VEHICLE_FLAG_COLLAPSE }, { "boat_rudder_hi", BOAT_RUDDER, VEHICLE_FLAG_COLLAPSE },
{ "windscreen", 2, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_COLLAPSE }, { "windscreen", BOAT_WINDSCREEN, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_COLLAPSE },
{ "ped_frontseat", BOAT_POS_FRONTSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, { "ped_frontseat", BOAT_POS_FRONTSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
{ nil, 0, 0 } { nil, 0, 0 }
}; };
@@ -667,7 +667,7 @@ CAutomobile::ProcessControl(void)
if(!strongGrip1 && !CVehicle::bCheat3) if(!strongGrip1 && !CVehicle::bCheat3)
gripCheat = false; gripCheat = false;
float acceleration = pHandling->Transmission.CalculateDriveAcceleration(m_fGasPedal, m_nCurrentGear, m_fChangeGearTime, fwdSpeed, gripCheat); float acceleration = pHandling->Transmission.CalculateDriveAcceleration(m_fGasPedal, m_nCurrentGear, m_fChangeGearTime, fwdSpeed, gripCheat);
acceleration /= fForceMultiplier; acceleration /= m_fForceMultiplier;


// unused // unused
if(GetModelIndex() == MI_MIAMI_RCBARON || if(GetModelIndex() == MI_MIAMI_RCBARON ||
@@ -718,7 +718,7 @@ CAutomobile::ProcessControl(void)
else else
traction = 0.004f; traction = 0.004f;
traction *= pHandling->fTractionMultiplier / 4.0f; traction *= pHandling->fTractionMultiplier / 4.0f;
traction /= fForceMultiplier; traction /= m_fForceMultiplier;
if(CVehicle::bCheat3) if(CVehicle::bCheat3)
traction *= 4.0f; traction *= 4.0f;


@@ -3791,7 +3791,7 @@ CAutomobile::BlowUpCar(CEntity *culprit)
} }
ChangeLawEnforcerState(false); ChangeLawEnforcerState(false);


gFireManager.StartFire(this, culprit, 0.8f, 1); // TODO gFireManager.StartFire(this, culprit, 0.8f, true);
CDarkel::RegisterCarBlownUpByPlayer(this); CDarkel::RegisterCarBlownUpByPlayer(this);
if(GetModelIndex() == MI_RCBANDIT) if(GetModelIndex() == MI_RCBANDIT)
CExplosion::AddExplosion(this, culprit, EXPLOSION_CAR_QUICK, GetPosition(), 0); CExplosion::AddExplosion(this, culprit, EXPLOSION_CAR_QUICK, GetPosition(), 0);
@@ -4054,7 +4054,7 @@ CAutomobile::HasCarStoppedBecauseOfLight(void)
if(ThePaths.m_connections[curnode->firstLink + i] == AutoPilot.m_nNextRouteNode) if(ThePaths.m_connections[curnode->firstLink + i] == AutoPilot.m_nNextRouteNode)
break; break;
if(i < curnode->numLinks && if(i < curnode->numLinks &&
ThePaths.m_carPathLinks[ThePaths.m_carPathConnections[curnode->firstLink + i]].trafficLightType & 3) // TODO ThePaths.m_carPathLinks[ThePaths.m_carPathConnections[curnode->firstLink + i]].trafficLightType & 3)
return true; return true;
} }


@@ -4064,7 +4064,7 @@ CAutomobile::HasCarStoppedBecauseOfLight(void)
if(ThePaths.m_connections[curnode->firstLink + i] == AutoPilot.m_nPrevRouteNode) if(ThePaths.m_connections[curnode->firstLink + i] == AutoPilot.m_nPrevRouteNode)
break; break;
if(i < curnode->numLinks && if(i < curnode->numLinks &&
ThePaths.m_carPathLinks[ThePaths.m_carPathConnections[curnode->firstLink + i]].trafficLightType & 3) // TODO ThePaths.m_carPathLinks[ThePaths.m_carPathConnections[curnode->firstLink + i]].trafficLightType & 3)
return true; return true;
} }


0 comments on commit c35efa2

Please sign in to comment.