(svn r10314) -Codechange: Refer to vehicle names by index

This commit is contained in:
2007-06-24 22:42:11 +00:00
parent ce91598e3c
commit fc7418d19d
13 changed files with 43 additions and 36 deletions

View File

@@ -18,6 +18,7 @@
#include "saveload.h"
#include "vehicle_gui.h"
#include "cargotype.h"
#include "strings.h"
/**
* Called if a new block is added to the order-pool
@@ -974,7 +975,8 @@ void BackupVehicleOrders(const Vehicle *v, BackuppedOrders *bak)
if (!IsCustomName(v->string_id)) {
bak->name[0] = '\0';
} else {
GetName(bak->name, v->string_id & 0x7FF, lastof(bak->name));
SetDParam(0, v->index);
GetString(bak->name, STR_VEHICLE_NAME, lastof(bak->name));
}
/* If we have shared orders, store it on a special way */