[crossfire] Weather bug, continued

Andreas Kirschbaum kirschbaum at myrealbox.com
Mon Nov 14 15:19:13 CST 2005


Nicolas Weeger wrote:
[...]
>
      My proposed check is to change insert_ob_in_map for:
     >
     
     >
              originator->below = op;
     >
          } else {
     >
              /* If there are other objects, then */
     >
              if((top=GET_MAP_OB(op->map,op->x,op->y))!=NULL) {
     >
                  object *last=NULL;
     >
                  /*
     >
                   * If there are multiple objects on this space, we do some trickier
     >
      handling.
     >
     
     >
      ie search floor & such all the time. The code after handles INS_MAP_LOAD
     >
      and INS_ABOVE_FLOOR_ONLY flags.
     
I still cannot follow all the code that are done while loading maps. But
since the fix you propose here just reverses a part of the patch to
accelerate map loading (see cvs diff -r 1.100 -r 1.101 common/object.c),
it should not break too much. But reversing it will probably make map
loading slow again. Therefore: would it be possible to limit this
processing for overlay maps only? I.e. use something like

    if ((!(flag&INS_MAP_LOAD) || <is overlay loading>) && top = ...)

instead of the original version

    if (!(flag&INS_MAP_LOAD) && top = ...)


>
      Btw it looks strange to me that an overlay is always on top.
     
This problem should be solved with the above proposal, too: objects from
the overlay map are merged correctly, but the original map is loaded
with all the checks skipped.

    


More information about the crossfire mailing list