(svn r942) -Merged branch/network back into the trunk

This commit is contained in:
truelight
2004-12-04 17:54:56 +00:00
parent c90bba35a2
commit d6a1f3e412
76 changed files with 7839 additions and 2850 deletions

View File

@@ -13,6 +13,7 @@
#include "saveload.h"
#include "economy.h"
#include "gui.h"
#include "network.h"
enum {
TOWN_HAS_CHURCH = 0x02,
@@ -928,7 +929,7 @@ static Town *AllocateTown()
Town *t;
FOR_ALL_TOWNS(t) {
if (t->xy == 0) {
_total_towns++;
if (t->index > _total_towns) _total_towns = t->index;
return t;
}
}
@@ -1342,7 +1343,7 @@ int32 CmdRenameTown(int x, int y, uint32 flags, uint32 p1, uint32 p2)
StringID str;
Town *t = DEREF_TOWN(p1);
str = AllocateName((byte*)_decode_parameters, 4);
str = AllocateNameUnique((byte*)_decode_parameters, 4);
if (str == 0)
return CMD_ERROR;
@@ -1910,7 +1911,7 @@ static void Load_TOWN()
while ((index = SlIterateArray()) != -1) {
Town *t = DEREF_TOWN(index);
SlObject(t, _town_desc);
_total_towns++;
if (index > _total_towns) _total_towns = index;
}
}