Remove GTA_TRAIN, GTA_BRIDGE, GTA_ZONECULL

This commit is contained in:
Sergeanur
2020-05-05 18:32:46 +03:00
parent 0163a7bc46
commit 1eb817de77
15 changed files with 4 additions and 126 deletions

View File

@ -38,7 +38,6 @@ CVector CTrain::aStationCoors_S[4];
CTrain::CTrain(int32 id, uint8 CreatedBy)
: CVehicle(CreatedBy)
{
#ifdef GTA_TRAIN
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
m_vehType = VEHICLE_TYPE_TRAIN;
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
@ -61,28 +60,22 @@ CTrain::CTrain(int32 id, uint8 CreatedBy)
bUsesCollision = true;
SetStatus(STATUS_TRAIN_MOVING);
#else
assert(0 && "No trains in this game");
#endif
}
void
CTrain::SetModelIndex(uint32 id)
{
#ifdef GTA_TRAIN
int i;
CVehicle::SetModelIndex(id);
for(i = 0; i < NUM_TRAIN_NODES; i++)
m_aTrainNodes[i] = nil;
CClumpModelInfo::FillFrameArray(GetClump(), m_aTrainNodes);
#endif
}
void
CTrain::ProcessControl(void)
{
#ifdef GTA_TRAIN
if(gbModelViewer || m_isFarAway && (CTimer::GetFrameCounter() + m_nWagonId) & 0xF)
return;
@ -285,13 +278,11 @@ CTrain::ProcessControl(void)
TrainHitStuff(s->m_lists[ENTITYLIST_PEDS_OVERLAP]);
}
}
#endif GTA_TRAIN
}
void
CTrain::PreRender(void)
{
#ifdef GTA_TRAIN
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex());
if(m_bIsFirstWagon){
@ -351,21 +342,17 @@ CTrain::PreRender(void)
CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
}
#endif
}
void
CTrain::Render(void)
{
#ifdef GTA_TRAIN
CEntity::Render();
#endif
}
void
CTrain::TrainHitStuff(CPtrList &list)
{
#ifdef GTA_TRAIN
CPtrNode *node;
CPhysical *phys;
@ -374,13 +361,11 @@ CTrain::TrainHitStuff(CPtrList &list)
if(phys != this && Abs(this->GetPosition().z - phys->GetPosition().z) < 1.5f)
phys->bHitByTrain = true;
}
#endif
}
void
CTrain::AddPassenger(CPed *ped)
{
#ifdef GTA_TRAIN
int i = ped->m_vehEnterType;
if((i == TRAIN_POS_LEFT_ENTRY || i == TRAIN_POS_MID_ENTRY || i == TRAIN_POS_RIGHT_ENTRY) && pPassengers[i] == nil){
pPassengers[i] = ped;
@ -393,13 +378,11 @@ CTrain::AddPassenger(CPed *ped)
return;
}
}
#endif
}
void
CTrain::OpenTrainDoor(float ratio)
{
#ifdef GTA_TRAIN
if(m_rwObject == nil)
return;
@ -424,7 +407,6 @@ CTrain::OpenTrainDoor(float ratio)
doorL.UpdateRW();
doorR.UpdateRW();
#endif
}
@ -432,7 +414,6 @@ CTrain::OpenTrainDoor(float ratio)
void
CTrain::InitTrains(void)
{
#ifdef GTA_TRAIN
int i, j;
CTrain *train;
@ -499,25 +480,21 @@ CTrain::InitTrains(void)
for(j = 0; pTrackNodes_S[j].t < StationDist_S[i]; j++);
aStationCoors_S[i] = pTrackNodes_S[j].p;
}
#endif
}
void
CTrain::Shutdown(void)
{
#ifdef GTA_TRAIN
delete[] pTrackNodes;
delete[] pTrackNodes_S;
pTrackNodes = nil;
pTrackNodes_S = nil;
#endif
}
void
CTrain::ReadAndInterpretTrackFile(char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail)
{
#ifdef GTA_TRAIN
bool readingFile = false;
int bp, lp;
int i, tmp;
@ -639,7 +616,6 @@ CTrain::ReadAndInterpretTrackFile(char *filename, CTrainNode **nodes, int16 *num
// end
interpLines[j].time = *totalDuration;
#endif
}
void
@ -651,7 +627,6 @@ ProcessTrainAnnouncements(void)
void
CTrain::UpdateTrains(void)
{
#ifdef GTA_TRAIN
int i, j;
uint32 time;
float t, deltaT;
@ -715,5 +690,4 @@ CTrain::UpdateTrains(void)
// time offset for each train
time += 0x40000/4;
}
#endif
}