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:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user