(svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order.

This commit is contained in:
rubidium
2008-04-06 07:22:26 +00:00
parent 3edb967ecf
commit a3224512cc
7 changed files with 56 additions and 70 deletions

View File

@@ -504,7 +504,7 @@ static bool LoadOldOrder(LoadgameState *ls, int num)
{
if (!LoadChunk(ls, NULL, order_chunk)) return false;
(new (num) Order())->AssignOrder(UnpackOldOrder(_old_order));
new (num) Order(UnpackOldOrder(_old_order));
/* Relink the orders to eachother (in TTD(Patch) the orders for one
vehicle are behind eachother, with an invalid order (OT_NOTHING) as indication that