(svn r23104) -Codechange: prepare the vehicle/sign z for some further changes to reduce casting

This commit is contained in:
rubidium
2011-11-04 11:09:06 +00:00
parent a72544d5e1
commit f01b3e2721
9 changed files with 22 additions and 18 deletions

View File

@@ -168,7 +168,7 @@ static void SetDisasterVehiclePos(DisasterVehicle *v, int x, int y, byte z)
int safe_y = Clamp(y - 1, 0, MapMaxY() * TILE_SIZE);
u->x_pos = x;
u->y_pos = y - 1 - (max(z - GetSlopePixelZ(safe_x, safe_y), 0U) >> 3);
u->y_pos = y - 1 - (max(z - GetSlopePixelZ(safe_x, safe_y), 0) >> 3);
safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE);
u->z_pos = GetSlopePixelZ(safe_x, safe_y);
u->direction = v->direction;