[Crossfire-wiki] [Crossfire DokuWiki] page changed: dev_todo:fancy_generators
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Thu Dec 6 01:07:23 CST 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/12/06 01:07
User :
Edit Summary: Add comment
@@ -48,6 +48,7 @@
The limit has been implemented. Patch is here: [[http://baugher.pikenet.net/cf/generator_radius.patch]]. If a generator has ''generator_max'' set, it will only create new objects when there are less than that many objects belonging to it already on the map. This works a little funny at the edges of tiled maps: If the generator creates a monster on the neighboring map, it won't be counted, so it could end up creating more than the limit. I'm not sure whether this is really a problem, but if it is, it could be fixed by preventing the generator from creating monsters on other maps.
Note from mwedel: current implementation of finding out how many monsters a generator has generated is highly inefficient - looking at all objects on the map can be a very time consuming process if there are large piles of treasure. A better approach would be to look on the active object list, on the basis all monsters are active objects, and then narrow the search criteria. Even on maps without treasure lists, this may be a gain - taking a quick look at metalforge, there were 3205 active objects when I logged in. A 50x50 world map is sure to have at least 2500 objects.
+ Reply from Rednaxela: Perhaps one thought, is maybe we should have per-map active object lists? This would increase efficiency of such searches by quite a bit. It would also benefit spells like Charm Monster and Destruction
Both these changes have been committed to trunk.
IP-Address : 136.159.134.152
Old Revision: http://wiki.metalforge.net/doku.php/dev_todo:fancy_generators?rev=1196923923
New Revision: http://wiki.metalforge.net/doku.php/dev_todo:fancy_generators
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list