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...
pull/16/head
Jonathan G Rennison 7 years ago
parent fa044852d5
commit 68c280bef8

@ -225,7 +225,9 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
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));
#endif
}
/**

Loading…
Cancel
Save