summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Train.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-30 20:41:20 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-30 20:41:20 +0200
commitdc12718fc20b2e70fa27653b19dd57f7d141d606 (patch)
tree80667ad887360af7a6ed8d9500e2952d57c61bc0 /src/vehicles/Train.cpp
parentMerge remote-tracking branch 'upstream/master' (diff)
parentRename m_phy_flagA80 to bSkipLineCol (diff)
downloadre3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.gz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.bz2
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.lz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.xz
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.tar.zst
re3-dc12718fc20b2e70fa27653b19dd57f7d141d606.zip
Diffstat (limited to 'src/vehicles/Train.cpp')
-rw-r--r--src/vehicles/Train.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp
index 0d1ff9b0..07d81501 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -59,7 +59,7 @@ CTrain::CTrain(int32 id, uint8 CreatedBy)
m_nDoorState = TRAIN_DOOR_CLOSED;
bUsesCollision = true;
- m_status = STATUS_TRAIN_MOVING;
+ SetStatus(STATUS_TRAIN_MOVING);
}
void
@@ -177,11 +177,11 @@ CTrain::ProcessControl(void)
m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f);
if(engineTrackSpeed[m_nWagonGroup] > 0.001f){
- m_status = STATUS_TRAIN_MOVING;
+ SetStatus(STATUS_TRAIN_MOVING);
m_bTrainStopping = false;
m_bProcessDoor = true;
}else{
- m_status = STATUS_TRAIN_NOT_MOVING;
+ SetStatus(STATUS_TRAIN_NOT_MOVING);
m_bTrainStopping = true;
}
@@ -252,7 +252,7 @@ CTrain::ProcessControl(void)
}
// Hit stuff
- if(m_bIsFirstWagon && m_status == STATUS_TRAIN_MOVING){
+ if(m_bIsFirstWagon && GetStatus()== STATUS_TRAIN_MOVING){
CVector front = GetPosition() + GetForward()*GetColModel()->boundingBox.max.y + m_vecMoveSpeed*CTimer::GetTimeStep();
int x, xmin, xmax;
@@ -440,7 +440,7 @@ CTrain::InitTrains(void)
for(i = 0; i < 5; i++){
train = new CTrain(MI_TRAIN, PERMANENT_VEHICLE);
train->GetMatrix().SetTranslate(0.0f, 0.0f, 0.0f);
- train->m_status = STATUS_ABANDONED;
+ train->SetStatus(STATUS_ABANDONED);
train->bIsLocked = true;
train->m_fWagonPosition = wagonPositions[i];
train->m_bIsFirstWagon = firstWagon[i];
@@ -459,7 +459,7 @@ CTrain::InitTrains(void)
for(i = 0; i < 8; i++){
train = new CTrain(MI_TRAIN, PERMANENT_VEHICLE);
train->GetMatrix().SetTranslate(0.0f, 0.0f, 0.0f);
- train->m_status = STATUS_ABANDONED;
+ train->SetStatus(STATUS_ABANDONED);
train->bIsLocked = true;
train->m_fWagonPosition = wagonPositions_S[i];
train->m_bIsFirstWagon = firstWagon_S[i];