void icon indicating copy to clipboard operation
void copied to clipboard

Collision check for rooves

Open GregHib opened this issue 4 years ago • 4 comments

To prevent large emotes being done inside, and to keep shop keepers in their shops

GregHib avatar May 18 '21 18:05 GregHib

I've added a collision strategy which checks for anything above the tested tile. It's not quite perfect overhanging rooves are also included, allowing npcs to leave and cross to other neighbouring buildings.

Perhaps shopkeepers also aren't able to walk through open doorways?

GregHib avatar Jan 12 '22 21:01 GregHib

Needs adding to shopkeeper npcs

GregHib avatar Jan 20 '23 17:01 GregHib

Also needed to prevent normal npcs from going into buildings (camels in alkharid walking into the bank)

GregHib avatar Feb 21 '24 00:02 GregHib

MapTileDecoder rooves are marked by settings and 0x4 == 0x4. Pf has strategy for indoors and outdoors which uses the last flag 0x80000000 (2.147b), indoors for shops, outdoors is for guards.

Might be a good opportunity to move MapTile methods into MapDefinition and have MapTileDecoder which loadTiles into an IntArray or ByteArray with just the settings for better performance/overhead

GregHib avatar Mar 10 '24 23:03 GregHib