AW: [CF-Devel] problems with darkness

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Fri Mar 21 07:09:37 CST 2003


i think i posted releated fix information about darkness 2 times in the
past.
Sadly, the response was not "as it should".

Some of the fixes and some of the extensions i put in daimonin are now reput
in
crossfire. But this always comes in a bit odd way ignoring daimonin and the
code.
I really wish more sharing here - it will be help us all and reduce work for
all of us.


For the darkness bug:

The big bug is, that we call for the map redraw a old code artifact, which
destroys
our LOS information. This is not only a darkness problem - it effects the
whole LOS.
The problem with this bug is, that it don't comes with bug messages or
something.

The only way to notice it, is to generate a set of test maps and test
situations. Then the
tester have to drive with a char over the maps and test the functions with
it. Sadly, nor
crossfire or daimonin has it. This is a major mistake from both projects and
i will change
it for daimonin asap when i have some more time after beta. We should think
for both projects about the right test maps.

When a map is redrawn, this function in info.c is called first:

void draw(object *pl) {

    if(pl->map == NULL || pl->map->in_memory != MAP_IN_MEMORY)
	return;

    if(pl->contr->do_los) {
	update_los(pl);              <- *here is the bug*
	pl->contr->do_los = 0;
    }

    draw_client_map(pl);
}

This function is redundant code and must be removed - the functions who
calls it must call
draw_client_map() direct instead.

Now, look at the funktion draw_client_map() in socket/request.c.
There we handle the los once more. As you can see, we do some more stuff
before it.
Because draw() update the LOS before we prepare the LOS stuff in
draw_client_map(),
the whole LOS correction in draw_client_map() will fail all the time.

There is a good way to see the broken LOS and how this fix it.
In Navar is in the south-east corner a tower which is totally dark in it.
Enter it,
stay on the door and cast a spell like firebolt which lights up the area in
a
flash effect. Then apply the door without moving and you will see outside
still artifact
of the other map including LOS/darkness bugs.

You have perhaps try it one or two times - even try different positions.
This kind of
effects are hard to track without test maps desinged for it.

michtoen

>
     
      -----Ursprungliche Nachricht-----
     
     >
     
      Von: 
      
      crossfire-devel-admin at lists.real-time.com
      
      
     >
     
      [mailto:
      
      crossfire-devel-admin at lists.real-time.com
      
      ]Im Auftrag von Mark
     
     >
     
      Wedel
     
     >
     
      Gesendet: Freitag, 21. Marz 2003 06:56
     
     >
     
      An: 
      
      crossfire-devel at lists.real-time.com
      
      
     >
     
      Betreff: Re: [CF-Devel] problems with darkness
     
     >
     
     
     >
     
     
     >
     
      Preston Crow wrote:
     
     >
     
      >> Turn off fog of war (if on) and report back.  Most likely, the
     
     >
     
      client is
     
     >
     
      >>storing this information in its fog of war - it stores what it last knew
     
     >
     
      >>the space to look like, which includes monsters, spell effects,
     
     >
     
      etc.  Fog
     
     >
     
      >>of war is completely done on the client - for this reason, the server
     
     >
     
      >>doesn't see any reason that the client needs updated info on
     
     >
     
      those spaces.
     
     >
     
      >
     
     >
     
      >
     
     >
     
      > I'm also seeing fog of war problems.  In my case, it happens most often
     
     >
     
      > when I'm running quickly through visibility-obstructing squares.  What
     
     >
     
      > happens is that a copy of my character image is left on some of the
     
     >
     
      > squares.  My guess is that I'm moving fast enough that the
     
     >
     
      server doesn't
     
     >
     
      > do a full update for every square that I move over.  (If it
     
     >
     
      would help, I
     
     >
     
      > could try to see if this only happens when my movement rate is
     
     >
     
      above some
     
     >
     
      > threshold.)  I've also seen a few cases where a monster image is left on
     
     >
     
      > the screen, though this is quite rare.
     
     >
     
     
     >
     
        I've not been able to reproduce it, and thus hard to fix.  The
     
     >
     
      thing to really
     
     >
     
      see is where the data is wrong, eg, does the server have the
     
     >
     
      wrong impression of
     
     >
     
      what a space looks like, or is it the client.
     
     >
     
     
     >
     
        Also, this bug seems pretty rare, so isn't all that high
     
     >
     
      priority to fix.
     
     >
     
     
     >
     
     
     >
     
     
     >
     
     
     >
     
      _______________________________________________
     
     >
     
      crossfire-devel mailing list
     
     >
     
     
      crossfire-devel at lists.real-time.com
      
      
     >
     
     
      https://mailman.real-time.com/mailman/listinfo/crossfire-devel
      
      
     

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list