16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 15:49:19 +02:00

milek7's branch merge; model file serialization, 64bit compatibility

This commit is contained in:
tmj-fstate
2017-03-06 18:20:26 +01:00
61 changed files with 2765 additions and 2431 deletions

View File

@@ -260,8 +260,8 @@ bool TSpeedPos::Update(vector3 *p, vector3 *dir, double &len)
}
if (iFlags & spSwitch) // jeśli odcinek zmienny
{
if (bool(trTrack->GetSwitchState() & 1) !=
bool(iFlags & spSwitchStatus)) // czy stan się zmienił?
if (((trTrack->GetSwitchState() & 1) != 0) !=
((iFlags & spSwitchStatus) != 0)) // czy stan się zmienił?
{ // Ra: zakładam, że są tylko 2 możliwe stany
iFlags ^= spSwitchStatus;
// fVelNext=trTrack->VelocityGet(); //nowa prędkość
@@ -389,7 +389,7 @@ void TSpeedPos::Set(TTrack *track, double dist, int flag)
fVelNext = (trTrack->iCategoryFlag & 1) ?
0.0 :
20.0; // jeśli koniec, to pociąg stój, a samochód zwolnij
vPos = (bool(iFlags & spReverse) != bool(iFlags & spEnd)) ?
vPos = (((iFlags & spReverse) != 0) != ((iFlags & spEnd) != 0)) ?
trTrack->CurrentSegment()->FastGetPoint_1() :
trTrack->CurrentSegment()->FastGetPoint_0();
}