fixing some uninitialized stuff
This commit is contained in:
parent
408f47fc9d
commit
3f26250d73
@ -11763,7 +11763,11 @@ void CTheScripts::UpdateObjectIndices()
|
||||
if (!pModel)
|
||||
continue;
|
||||
strcpy(name, pModel->GetName());
|
||||
#ifdef FIX_BUGS
|
||||
for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++)
|
||||
#else
|
||||
for (int k = 0; k < USED_OBJECT_NAME_LENGTH; k++)
|
||||
#endif
|
||||
name[k] = toupper(name[k]);
|
||||
if (strcmp(name, UsedObjectArray[i].name) == 0) {
|
||||
found = true;
|
||||
|
@ -63,6 +63,9 @@ CPhysical::CPhysical(void)
|
||||
m_phy_flagA10 = false;
|
||||
m_phy_flagA20 = false;
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
m_nSurfaceTouched = SURFACE_DEFAULT;
|
||||
#endif
|
||||
m_nZoneLevel = LEVEL_NONE;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,11 @@ public:
|
||||
RwMatrixDestroy(m_attachment);
|
||||
}
|
||||
void Attach(RwMatrix *matrix, bool owner = false){
|
||||
#ifdef FIX_BUGS
|
||||
if(m_attachment && m_hasRwMatrix)
|
||||
#else
|
||||
if(m_hasRwMatrix && m_attachment)
|
||||
#endif
|
||||
RwMatrixDestroy(m_attachment);
|
||||
m_attachment = matrix;
|
||||
m_hasRwMatrix = owner;
|
||||
|
@ -187,6 +187,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
|
||||
m_queuedSound = SOUND_NO_SOUND;
|
||||
m_objective = OBJECTIVE_NONE;
|
||||
m_prevObjective = OBJECTIVE_NONE;
|
||||
#ifdef FIX_BUGS
|
||||
m_objectiveTimer = 0;
|
||||
#endif
|
||||
CharCreatedBy = RANDOM_CHAR;
|
||||
m_leader = nil;
|
||||
m_pedInObjective = nil;
|
||||
|
@ -35,6 +35,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
|
||||
{
|
||||
m_fMoveSpeed = 0.0f;
|
||||
SetModelIndex(MI_PLAYER);
|
||||
#ifdef FIX_BUGS
|
||||
m_fCurrentStamina = m_fMaxStamina = 150.0f;
|
||||
#endif
|
||||
SetInitialState();
|
||||
|
||||
m_pWanted = new CWanted();
|
||||
@ -46,8 +49,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
|
||||
m_bSpeedTimerFlag = false;
|
||||
m_pPointGunAt = nil;
|
||||
m_nPedState = PED_IDLE;
|
||||
m_fMaxStamina = 150.0f;
|
||||
m_fCurrentStamina = m_fMaxStamina;
|
||||
#ifndef FIX_BUGS
|
||||
m_fCurrentStamina = m_fMaxStamina = 150.0f;
|
||||
#endif
|
||||
m_fStaminaProgress = 0.0f;
|
||||
m_nEvadeAmount = 0;
|
||||
field_1367 = 0;
|
||||
|
@ -84,6 +84,10 @@ CPlane::CPlane(int32 id, uint8 CreatedBy)
|
||||
SetStatus(STATUS_PLANE);
|
||||
bIsBIGBuilding = true;
|
||||
m_level = LEVEL_NONE;
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
m_isFarAway = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
CPlane::~CPlane()
|
||||
|
@ -63,6 +63,10 @@ CTrain::CTrain(int32 id, uint8 CreatedBy)
|
||||
|
||||
bUsesCollision = true;
|
||||
SetStatus(STATUS_TRAIN_MOVING);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
m_isFarAway = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -59,6 +59,9 @@ CVehicle::CVehicle(uint8 CreatedBy)
|
||||
bIsLawEnforcer = false;
|
||||
bIsAmbulanceOnDuty = false;
|
||||
bIsFireTruckOnDuty = false;
|
||||
#ifdef FIX_BUGS
|
||||
bIsHandbrakeOn = false;
|
||||
#endif
|
||||
CCarCtrl::UpdateCarCount(this, false);
|
||||
m_fHealth = 1000.0f;
|
||||
bEngineOn = true;
|
||||
|
Loading…
Reference in New Issue
Block a user