--- deliantra/server/socket/sounds.C 2007/07/26 00:38:34 1.16 +++ deliantra/server/socket/sounds.C 2007/07/26 21:44:43 1.17 @@ -76,6 +76,10 @@ ht.insert (std::make_pair (strdup (str), face)); } +//TODO: remove +// for gcfclient-compatibility, to vanish at some point +faceidx old_sound_index [SOUND_CAST_SPELL_0]; + /* * Plays a sound for specified player only */ @@ -107,17 +111,24 @@ } else if (this->sound) { + //TODO: remove, or make bearable // gcfclient compatibility - // fetch compatibility sound index first - packet sl ("sound"); + int gcfclient_sound; + for (gcfclient_sound = SOUND_CAST_SPELL_0; gcfclient_sound--; ) + if (old_sound_index [gcfclient_sound] == sound) + { + packet sl ("sound"); + + sl << uint8 (dx) + << uint8 (dy) + << uint16 (gcfclient_sound) + << uint8 (SOUND_NORMAL); - sl << uint8 (dx) - << uint8 (dy) - << uint16 (sound) - << uint8 (SOUND_NORMAL); + send_packet (sl); - send_packet (sl); + break; + } } }