fix the lighthouse crash in preview.

This commit is contained in:
Enno Rehling 2018-07-22 10:55:09 +02:00
parent 2282160916
commit cd6154cae6
2 changed files with 3 additions and 3 deletions

View file

@ -99,8 +99,6 @@ function self.update()
r:set_resource("tree", trees * 1.1) r:set_resource("tree", trees * 1.1)
msg:send_region(r) msg:send_region(r)
end end
if clear then
end
end end
end end
else else

View file

@ -1493,10 +1493,12 @@ int read_game(gamedata *data)
if (r->flags & RF_LIGHTHOUSE) { if (r->flags & RF_LIGHTHOUSE) {
building *b; building *b;
for (b = r->buildings; b; b = b->next) { for (b = r->buildings; b; b = b->next) {
if (is_lighthouse(b->type)) {
update_lighthouse(b); update_lighthouse(b);
} }
} }
} }
}
log_debug("marking factions as alive."); log_debug("marking factions as alive.");
for (f = factions; f; f = f->next) { for (f = factions; f; f = f->next) {
if (f->flags & FFL_NPC) { if (f->flags & FFL_NPC) {