[crossfire] Curse bug

Mark Wedel mwedel at sonic.net
Mon Nov 20 23:26:33 CST 2006


Nicolas Weeger (Laposte) wrote:
> Agreed on previous points :)
> 
>>   and so on.  The only harder part in this case is figure out how/when to
>> store away those original values.  It could make most sense to just do
>> after the object is loaded from the original map.
> 
> Just after item loading, from original map?
> Check (fast memcmp probably?) whether something is not the same as the arch, 
> and if so save.

  I wonder what the performance hit on that would be.  If restricted only to 
monsters, probably not that bad.

  Conversely, the code could assume that any value stored in the original map is 
stored because it is different, eg, if it finds a 'Str', then that is different 
from the arches.  So handling it in that case isn't hard, but I'm not sure if 
the loader itself knows if the data it is reading is from an original map vs 
modified map.

  For that matter, the check_loaded_object() doesn't even know that info, which 
seems a bit odd also, since a temporary map presumably already has correct 
objects - the idea of check_loaded_objects() so to basically handle various 
changes to objects/archetypes so that we don't have to update all of the maps.

  It would probably make the most sense to change it so taht 
check_loaded_object() is only called when loading objects from original maps 
(not temp maps), and add the original stat check code in there.





More information about the crossfire mailing list