… | |
… | |
74 | i->second = face; |
74 | i->second = face; |
75 | else |
75 | else |
76 | ht.insert (std::make_pair (strdup (str), face)); |
76 | ht.insert (std::make_pair (strdup (str), face)); |
77 | } |
77 | } |
78 | |
78 | |
|
|
79 | //TODO: remove |
|
|
80 | // for gcfclient-compatibility, to vanish at some point |
|
|
81 | faceidx old_sound_index [SOUND_CAST_SPELL_0]; |
|
|
82 | |
79 | /* |
83 | /* |
80 | * Plays a sound for specified player only |
84 | * Plays a sound for specified player only |
81 | */ |
85 | */ |
82 | void |
86 | void |
83 | client::play_sound (faceidx sound, int dx, int dy) |
87 | client::play_sound (faceidx sound, int dx, int dy) |
… | |
… | |
105 | |
109 | |
106 | send_packet (sl); |
110 | send_packet (sl); |
107 | } |
111 | } |
108 | else if (this->sound) |
112 | else if (this->sound) |
109 | { |
113 | { |
|
|
114 | //TODO: remove, or make bearable |
110 | // gcfclient compatibility |
115 | // gcfclient compatibility |
111 | // fetch compatibility sound index first |
|
|
112 | |
116 | |
|
|
117 | int gcfclient_sound; |
|
|
118 | for (gcfclient_sound = SOUND_CAST_SPELL_0; gcfclient_sound--; ) |
|
|
119 | if (old_sound_index [gcfclient_sound] == sound) |
|
|
120 | { |
113 | packet sl ("sound"); |
121 | packet sl ("sound"); |
114 | |
122 | |
115 | sl << uint8 (dx) |
123 | sl << uint8 (dx) |
116 | << uint8 (dy) |
124 | << uint8 (dy) |
117 | << uint16 (sound) |
125 | << uint16 (gcfclient_sound) |
118 | << uint8 (SOUND_NORMAL); |
126 | << uint8 (SOUND_NORMAL); |
119 | |
127 | |
120 | send_packet (sl); |
128 | send_packet (sl); |
|
|
129 | |
|
|
130 | break; |
|
|
131 | } |
121 | } |
132 | } |
122 | } |
133 | } |
123 | |
134 | |