Merge branch 'save_ext' into jgrpp
# Conflicts: # Makefile.src.in # findversion.sh # projects/determineversion.vbs # src/gamelog.cpp # src/gamelog_internal.h # src/lang/german.txt # src/lang/korean.txt # src/network/core/config.h # src/network/network.cpp # src/network/network_udp.cpp # src/rev.h # src/saveload/afterload.cpp # src/saveload/company_sl.cpp # src/saveload/depot_sl.cpp # src/saveload/gamelog_sl.cpp # src/saveload/misc_sl.cpp # src/saveload/order_sl.cpp # src/saveload/saveload.cpp # src/saveload/station_sl.cpp # src/saveload/town_sl.cpp # src/saveload/vehicle_sl.cpp # src/table/settings.ini # src/viewport.cpp
This commit is contained in:
@@ -320,6 +320,15 @@ void Ship::UpdateDeltaXY()
|
||||
this->x_extent = bb[1];
|
||||
this->y_extent = bb[0];
|
||||
this->z_extent = 6;
|
||||
|
||||
if (this->direction != this->rotation) {
|
||||
/* If we are rotating, then it is possible the ship was moved to its next position. In that
|
||||
* case, because we are still showing the old direction, the ship will appear to glitch sideways
|
||||
* slightly. We can work around this by applying an additional offset to make the ship appear
|
||||
* where it was before it moved. */
|
||||
this->x_offs -= this->x_pos - this->rotation_x_pos;
|
||||
this->y_offs -= this->y_pos - this->rotation_y_pos;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -829,6 +838,9 @@ static void ShipController(Ship *v)
|
||||
/* Stop for rotation */
|
||||
v->cur_speed = 0;
|
||||
v->direction = new_direction;
|
||||
/* Remember our current location to avoid movement glitch */
|
||||
v->rotation_x_pos = v->x_pos;
|
||||
v->rotation_y_pos = v->y_pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -858,6 +870,9 @@ getout:
|
||||
|
||||
reverse_direction:
|
||||
v->direction = ReverseDir(v->direction);
|
||||
/* Remember our current location to avoid movement glitch */
|
||||
v->rotation_x_pos = v->x_pos;
|
||||
v->rotation_y_pos = v->y_pos;
|
||||
v->cur_speed = 0;
|
||||
v->path.clear();
|
||||
goto getout;
|
||||
|
Reference in New Issue
Block a user