[crossfire] MWedel could you make weather smooth

tchize tchize at myrealbox.com
Wed Mar 23 14:56:13 CST 2005


Just some enlightments about that test:

>
     
      if ( (the_map.cells[mx][my].heads[0].face==0)
     
     
This checks if the tile we are smoothing on does have at least one face. This 
is done to prevent smoothing at borders of map. nothing to do with buildings 
and so on. Correct me if i am wrong but if face at layer 0 is '0' we either 
don't have info about that space (because hidden from player) or there is 
nothing at that space on map (not even a ground).



>
     
      !CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]) )
     
     
This indeed check of at given layer we are smooth capable. This simply check 
the smoothlevel at current layer is not 0 (0 having the meaning 'do not 
smooth on me').
Ok, and now i am reading what is just said, i see where the bug comes from. 
There is no face at current layer (let' s say one) so smoothlevel is 0 and 
the client concludes it can't do smoothing there. Damn am going to correct 
this immediatly :s:s:s (Et je vais au passage aller me flageler avec des 
orties fraîches).

Sorry Sorry Sorry...


Le Samedi 19 Mars 2005 16:46, Mitch Obrian a écrit :
Ah.. well this has been a (visual) problem for about
.... well atleast a year. I think it would be good to
set 255 smoothing on all that don't have anything set
also :)

basically snow weather dosn't smooth at all, nor does
some of the other tiles weather puts down... makes
things ugly and thus players don't want to play with
glorious weather turned on.

--- Mark Wedel <
     
     mwedel at sonic.net
     
     > wrote:
>
     
      Mitch Obrian wrote:
     
     >
     
      > Currently the clients don't smooth tiles dropped
     
     >
     
     
     >
     
      by
     
     >
     
     
     >
     
      > weather code (snow and all that stuff) because the
     
     >
     
      > client dosn't smooth anything thats not set
     
     >
     
     
     >
     
      floor=1 I
     
     >
     
     
     >
     
      > guess... now since only things that are ment to be
     
     >
     
      > smoothed have smoothing set at all .... could you
     
     >
     
     
     >
     
      let
     
     >
     
     
     >
     
      > things that arent floor=1 smooth so weather stuff
     
     >
     
     
     >
     
      will
     
     >
     
     
     >
     
      > smooth?
     
     >
     
     
     >
     
        I did not write the smooth logic - might be better
     
     >
     
      of to talk to tchize since
     
     >
     
      he wrote that code.
     
     >
     
     
     >
     
        Taking a brief look at the code in question, these
     
     >
     
      are my observations:
     
     >
     
      1) the server doesn't care what layer the objects
     
     >
     
      are that have smoothing, and
     
     >
     
      doesn't care if it is a floor or not, so is sending
     
     >
     
      the right data to the client.
     
     >
     
     
     >
     
      2) The client is getting all the right data -
     
     >
     
      however, this line (from the sdl.c
     
     >
     
      file, drawsmooth_sdl()) is probably the culprit:
     
     >
     
     
     >
     
           if ( (the_map.cells[mx][my].heads[0].face==0)
     
     >
     
     
     >
     
      !CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]) )
     
     >
     
               return;
     
     >
     
     
     >
     
        This basically means that objects will only smooth
     
     >
     
      if the objects they are
     
     >
     
      smoothing onto are also smooth capable.  So at
     
     >
     
      minimum, the weather effect
     
     >
     
      objects need to have a smoothlevel set (I haven't
     
     >
     
      checked if they do that).  If
     
     >
     
      this is done for all the weather objects, I think it
     
     >
     
      should work OK.
     
     >
     
     
     >
     
        The problem you still will get is that spaces that
     
     >
     
      have weather won't tile
     
     >
     
      onto those spaces that don't.  That is because the
     
     >
     
      weather tile will be at layer
     
     >
     
      1, while on the other square, might be nothing at
     
     >
     
      level 1 (face==0), or some
     
     >
     
      other ojbect that is not smoothable.
     
     >
     
     
     >
     
        Presumably that is done because if you say have a
     
     >
     
      space with a house on it,
     
     >
     
      you don't want the smooth effect to go on top of the
     
     >
     
      building, so instead, safer
     
     >
     
      to not smooth.  Perhaps making the default smooth
     
     >
     
      values for objects that don't
     
     >
     
      have it set to 255 would work, thus, these objects
     
     >
     
      would always be on top, but
     
     >
     
      not 100% sure if that would in fact work.
     
     >
     
     
     >
     
     
     >
     
      _______________________________________________
     
     >
     
      crossfire mailing list
     
     >
     
     
      crossfire at metalforge.org
      
      
     
     http://mailman.metalforge.org/mailman/listinfo/crossfire
     
     




__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
     
     http://smallbusiness.yahoo.com/resources/
     
     

_______________________________________________
crossfire mailing list
     
     crossfire at metalforge.org
     
     
     http://mailman.metalforge.org/mailman/listinfo/crossfire
     
     

-- 
--
Tchize (David Delbecq)
     
     tchize at myrealbox.com
     
     
Public PGP KEY FINGERPRINT:
    F4BC EF69 54CC F2B5 4621  8DAF 1C71 8E6B 5436 C17C
Public PGP KEY location:
    
     
     http://wwwkeys.pgp.net/pgpnet/wwwkeys.html
     
     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 
     
     http://shadowknight.real-time.com/pipermail/crossfire/attachments/20050323/37338787/attachment.pgp
     
     
    


More information about the crossfire mailing list