[crossfire] Inconsistencies between map loading and map saving code

Andreas Kirschbaum kirschbaum at myrealbox.com
Fri Aug 26 15:08:57 CDT 2005


There are some inconsistencies in how crossfire/crossedit and
CFJavaEditor handle the map headers "reset_timeout" and
"enter_x"/"enter_y":

 - CFJavaEditor uses the default value "0" for missing headers. It saves
   the headers only if the current value is positive.

 - crossfire/crossedit use the default value "7200" (for reset_timeout)
   or "1" (for enter_x and enter_y). But it saves these values only if
   the current value is not "0".

This behavior makes crossedit add these headers by just loading and
saving a map.

I'd like to remove these inconsistencies by always using "0" as the
default value for missing headers, and saving the headers only if the
current value is positive.

To not change the semantics for maps without a reset_timeout header
field, I'd change set_map_reset_time() in common/map.c to treat the
value "0" as the "default timeout value" (7200). (Note that
set_map_reset_time() is the only function accessing this field.)

For the fields enter_x/enter_y I just hope that most (all?) maps will
still work: either the exit leading into this map contains coordinates,
or the server will (hopefully) place the player to 1/1 if row and column
0 are blocked.

    
    


More information about the crossfire mailing list