Bugfix #58: typo turn to the west corner of the func_tracktrain

This commit is contained in:
s1lentq 2016-08-28 23:27:04 +07:00
parent fc0064c9bb
commit 89d2bf7b1e

View File

@ -1167,16 +1167,16 @@ void CFuncTrackTrain::Next()
Vector delta = nextFront - pev->origin; Vector delta = nextFront - pev->origin;
Vector angles = UTIL_VecToAngles(delta); Vector angles = UTIL_VecToAngles(delta);
float_precision fixAngleY = angles.y + 180.0f; #ifndef PLAY_GAMEDLL
// The train actually points west // The train actually points west
angles.y += fixAngleY; angles.y += 180.0f;
// TODO: All of this crap has to be done to make the angles not wrap around, revisit this. // TODO: All of this crap has to be done to make the angles not wrap around, revisit this.
#ifndef PLAY_GAMEDLL
FixupAngles(angles); FixupAngles(angles);
FixupAngles(pev->angles); FixupAngles(pev->angles);
#else #else
float_precision fixAngleY = angles.y + 180.0f;
angles.x = Fix(angles.x); angles.x = Fix(angles.x);
angles.y = Fix(fixAngleY); // TODO: fix test demo angles.y = Fix(fixAngleY); // TODO: fix test demo
angles.z = Fix(angles.z); angles.z = Fix(angles.z);
@ -1214,7 +1214,7 @@ void CFuncTrackTrain::Next()
} }
} }
if (pnext != NULL) if (pnext)
{ {
if (pnext != m_ppath) if (pnext != m_ppath)
{ {