[crossfire] New layer code bug :)

Mark Wedel mwedel at sonic.net
Wed May 24 01:36:38 CDT 2006


Nicolas Weeger (Laposte) wrote:
> Hello.
> 
> Metalforge having been updated, I'm using the new mapcmd2 protocol, and 
> noticed somee fun bugs :)
> 
> First (no screen copy, sorry), sometimes 1 item only will appear from a pile, 
> sometimes 2 items (without any monster)

  Would be interested in more details on that, especially if you can get a 
reproducible test case.

  Note however there are cases where I know this could happen, based simply on 
the images used.  For example, if you drop a dagger, and then drop plate mail on 
top of it, it would appear that there is only 1 object (plate mail) on that 
space.  In fact, the client is getting both images, it just turns out that the 
plate mail image is bigger than the dagger image, and thus completely obscures it.

  This is of course a waste, but I'm not sure how to really fix it - the server 
certainly doesn't know the extent of the images.  The client could perhaps have 
some idea as to the extent of the image, but that would get pretty messy.

  Now the visibility of the dagger object could be set higher than platemail, so 
it appears on top of the platemail.  But that is then sort of odd - arguably, 
daggers should have a relatively low visibility.

> Second, traps seem to appear above player

  I'm presuming this happens when you are searching for traps?  Looking at the 
archetype that is used for that (runedet), it has flying 1 set, so would make 
sense for it to be above the player.  I'm not sure why flying 1 is set for that 
object, however - I wonder if this was an attempt to make it really visible? 
I'll trying turning off flying and see if it all still works properly.

> Third, some items appear above player (see screenshot)

  I'm taking it those were levitation boots? If so, that makes some sense, but 
isn't correctly visually - I think I'll have to do the change I suggest 
elsewhere where objects can specify what layer they want to be drawn on, 
basically overriding the mechanism use in the update_position code.




More information about the crossfire mailing list