Changeset - r13926:df3a72e4160c
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-12-12 21:04:08
rubidium@openttd.org
(svn r18468) -Codechange: make sure one never makes self-loops using Vehicle::SetNext
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1616,6 +1616,8 @@ CommandCost Vehicle::SendToDepot(DoComma
 

	
 
void Vehicle::SetNext(Vehicle *next)
 
{
 
	assert(this != next);
 

	
 
	if (this->next != NULL) {
 
		/* We had an old next vehicle. Update the first and previous pointers */
 
		for (Vehicle *v = this->next; v != NULL; v = v->Next()) {
0 comments (0 inline, 0 general)