(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
This commit is contained in:
@@ -159,13 +159,13 @@ static void SetDisasterVehiclePos(Vehicle *v, int x, int y, byte z)
|
||||
EndVehicleMove(v);
|
||||
|
||||
if ((u = v->Next()) != NULL) {
|
||||
int safe_x = clamp(x, 0, MapMaxX() * TILE_SIZE);
|
||||
int safe_y = clamp(y - 1, 0, MapMaxY() * TILE_SIZE);
|
||||
int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE);
|
||||
int safe_y = Clamp(y - 1, 0, MapMaxY() * TILE_SIZE);
|
||||
BeginVehicleMove(u);
|
||||
|
||||
u->x_pos = x;
|
||||
u->y_pos = y - 1 - (max(z - GetSlopeZ(safe_x, safe_y), 0U) >> 3);
|
||||
safe_y = clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE);
|
||||
safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE);
|
||||
u->z_pos = GetSlopeZ(safe_x, safe_y);
|
||||
u->direction = v->direction;
|
||||
|
||||
|
Reference in New Issue
Block a user