Ifdef out expensive assert in non-debug mode.

The vehicle slope algorithm goes to pains to avoid GetSlopePixelZ,
but then calls it anyway in the assert...
This commit is contained in:
Jonathan G Rennison
2017-03-05 16:58:28 +00:00
parent fa044852d5
commit 68c280bef8

View File

@@ -225,7 +225,9 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
this->z_pos += HasBit(this->gv_flags, GVF_GOINGUP_BIT) ? d : -d; this->z_pos += HasBit(this->gv_flags, GVF_GOINGUP_BIT) ? d : -d;
} }
#ifdef _DEBUG
assert(this->z_pos == GetSlopePixelZ(this->x_pos, this->y_pos)); assert(this->z_pos == GetSlopePixelZ(this->x_pos, this->y_pos));
#endif
} }
/** /**