Page 2 of 2
Re: Bug Fix: Fully working entitiesAt and allEntities functi
Posted: Sun Oct 06, 2013 6:25 am
by Diarmuid
Eleven Warrior wrote:Hi
At the risk of sounding Stupid (lol) does this mean that if a player puts a maker on the map the game wont crash??
EDIT: If I add this Code to my mod now would it affect it Eg: Crash it?
Due to a bug in the game, if players put map markers on the map, it messes up with entitiesAt/allEntitiesAt functions that most scripts use. So no crashes, but scripts stop working correctly because they think objects that are in the dungeon aren't there.
This fixes the problem, but you have to replace every call to the default functions by a call to those functions in every script entity, every .lua file, everywhere. The only clean way to do that is to do a find/replace in all files in your entire mod directory (backup first!!!!!) using something like notepad++. Even then, you must be careful to make the search to match case, and whole words only.
Re: Bug Fix: Fully working entitiesAt and allEntities functi
Posted: Sun Oct 06, 2013 7:09 am
by Komag
I suppose you should check everywhere to be sure, but I didn't have any outside my dungeon.lua
Re: Bug Fix: Fully working entitiesAt and allEntities functi
Posted: Sun Oct 06, 2013 8:38 am
by Eleven Warrior
Hi guys..
Whooooaaaa This is HEAVEY STUFF.. I think ill use the Code in my next Mod. ATM it probably take me ages to readjust my (lua Files and Scripts) LOL..
Thxs for the reply guys GJ..
Note To Self: Remind players not to put makers on the Maps ATM..
Re: Bug Fix: Fully working entitiesAt and allEntities functi
Posted: Thu Feb 13, 2014 12:49 pm
by JohnWordsworth
Just wanted to say that I've updated the main post of the thread with Diarmuid's improved newAllEntities method so that anyone just popping in and copying the script without reading the thread gets the best version of the script.
Re: Bug Fix: Fully working entitiesAt and allEntities functi
Posted: Thu Feb 13, 2014 4:20 pm
by Diarmuid
Great,
BTW, the entitesAt fixes have been implemented mod-wide in the latest beta3 tests of the ORRR2, without any noticeable drop in performance, and that's saying something with the amount of stuff going on in that mod.
Re: Bug Fix: Fully working entitiesAt and allEntities functi
Posted: Thu Feb 13, 2014 6:56 pm
by germanny
Nice work from you two!
Lots of competent fans around, this is so nice and inpiring
