(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.

This commit is contained in:
rubidium
2007-08-30 13:03:56 +00:00
parent ac5fde61fb
commit cb7eaff353
21 changed files with 164 additions and 147 deletions

View File

@@ -158,7 +158,7 @@ static void SetDisasterVehiclePos(Vehicle *v, int x, int y, byte z)
VehiclePositionChanged(v);
EndVehicleMove(v);
if ((u = v->next) != NULL) {
if ((u = v->Next()) != NULL) {
int safe_x = clamp(x, 0, MapMaxX() * TILE_SIZE);
int safe_y = clamp(y - 1, 0, MapMaxY() * TILE_SIZE);
BeginVehicleMove(u);
@@ -173,7 +173,7 @@ static void SetDisasterVehiclePos(Vehicle *v, int x, int y, byte z)
VehiclePositionChanged(u);
EndVehicleMove(u);
if ((u = u->next) != NULL) {
if ((u = u->Next()) != NULL) {
BeginVehicleMove(u);
u->x_pos = x;
u->y_pos = y;