summaryrefslogtreecommitdiff
path: root/src/emap
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-03-02 23:31:15 +0300
committerAndrei Karas <akaras@inbox.ru>2019-03-02 23:31:15 +0300
commitfdb0fdf03b7d0947c6ee5b9c9febd5cc4b603520 (patch)
treef6f0f07eb1c29d9daeb8aebc2c1238f9de8bd7c5 /src/emap
parent4effbb02d2e656d0d8f33e4337b4b932d6ae8ce7 (diff)
downloadevol-hercules-fdb0fdf03b7d0947c6ee5b9c9febd5cc4b603520.tar.gz
evol-hercules-fdb0fdf03b7d0947c6ee5b9c9febd5cc4b603520.tar.bz2
evol-hercules-fdb0fdf03b7d0947c6ee5b9c9febd5cc4b603520.tar.xz
evol-hercules-fdb0fdf03b7d0947c6ee5b9c9febd5cc4b603520.zip
Try to load map cells before set wall on map
Diffstat (limited to 'src/emap')
-rw-r--r--src/emap/map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/emap/map.c b/src/emap/map.c
index cc4bae4..cfbffef 100644
--- a/src/emap/map.c
+++ b/src/emap/map.c
@@ -409,6 +409,9 @@ void emap_setgatcell2(int16 m,
j = x + y * map->list[m].xs;
+ if (map->list[m].cell == (struct mapcell *)0xdeadbeaf)
+ map->cellfromcache(&map->list[m]);
+
struct mapcell cell0 = map->gat2cell(gat);
struct mapcell2 *cell = (struct mapcell2 *)&cell0;
struct mapcell2 *cell2 = (struct mapcell2 *)&map->list[m].cell[j];