implemented CTrain

This commit is contained in:
aap
2019-07-29 19:18:03 +02:00
15 changed files with 941 additions and 97 deletions

View File

@ -142,8 +142,8 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
veh = FindPlayerVehicle();
if(veh && veh->IsTrain()){
if(((CTrain*)veh)->m_doorState != TRAIN_DOOR_STATE2)
return ;
if(((CTrain*)veh)->m_nDoorState != TRAIN_DOOR_OPEN)
return;
}else if(playerCoors.z < 4.0f && !CCullZones::DoINeedToLoadCollision())
return;

View File

@ -186,7 +186,7 @@ CCullZones::MarkSubwayAsInvisible(bool visible)
n = CPools::GetVehiclePool()->GetSize();
for(i = 0; i < n; i++){
v = CPools::GetVehiclePool()->GetSlot(i);
if(v && v->IsTrain() && ((CTrain*)v)->m_trackId != 0)
if(v && v->IsTrain() && ((CTrain*)v)->m_nTrackId != TRACK_ELTRAIN)
v->bIsVisible = visible;
}
}

View File

@ -71,6 +71,7 @@ char version_name[64];
float FramesPerSecond = 30.0f;
bool gbPrintShite = false;
bool gbModelViewer;
bool DoRWStuffStartOfFrame_Horizon(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);

View File

@ -18,6 +18,7 @@ extern wchar *gUString;
extern wchar *gUString2;
extern bool &b_FoundRecentSavedGameWantToLoad;
extern bool gbPrintShite;
extern bool gbModelViewer;
class CSprite2d;