From fdb0fdf03b7d0947c6ee5b9c9febd5cc4b603520 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Mar 2019 23:31:15 +0300 Subject: Try to load map cells before set wall on map --- src/Makefile.am | 4 ++-- src/emap/map.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index d17cc8a..48fc44b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -138,8 +138,8 @@ MAP_SRC = emap/atcommand.c \ SHARED_CFLAGS = ${CFLAGS} -O3 -pipe -ffast-math -std=c11 -Wall -Wextra -Wno-sign-compare -Wno-unused -fno-omit-frame-pointer \ -DPCRE_SUPPORT -I../../.. -I../../../../3rdparty \ - -DPACKETVER=20150513 \ - -DevolPacketOffset=0 + -DPACKETVER=20181002 \ + -DevolPacketOffset=0x200 SHARED_LDFLAGS = -lm -avoid-version -Wl,--no-undefined if ENABLE_STATIC_BUILD 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]; -- cgit v1.2.3-60-g2f50