[CF-Devel] Sounds

Mark Wedel mwedel at scruz.net
Tue Nov 28 23:30:30 CST 2000


Michael Toennies wrote:
>
     
     
     >
     
      What about this:
     
     >
     
     
     >
     
      a signed short16 as sound ID. If it >=0, its a effect like hit, dead, etc.
     
     >
     
      If it <0, its a sound spell.
     
     
 Look at the code/docs - it already does this.  To quote from the protocol file:

S->C: sound <x><y><num><type>
        Informs the client to play a sound.  All arguments are binary data.
        x,y are signed 1 byte values which are offsets from the player.
        num is the sound number stored as a short (16 bit).
        (IT is up to client to determine which sound to
        play based on that.)  Since sound numbers seldom change (and in fact,
        new sounds will have a higher number than the old sounds - old
        sounds numbers will not change in meaning like what can happen with
        the images), this should not be much of a problem.
        type is a 1 byte value which determines sound type.  Currently, 0
        is normal sound, 1 is spell sound.  This may be extended in the
        future.

 
 In the case of the example you posted, all of those sounds generated are spell
sounds (as denoted by the type 1)

    
    


More information about the crossfire mailing list