[crossfire] MWedel could you make weather smooth

Mark Wedel mwedel at sonic.net
Sat Mar 19 01:39:37 CST 2005


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.


    
    


More information about the crossfire mailing list