… | |
… | |
99 | |
99 | |
100 | packet sl ("sc"); |
100 | packet sl ("sc"); |
101 | |
101 | |
102 | uint8 *len = sl.cur; |
102 | uint8 *len = sl.cur; |
103 | |
103 | |
104 | sl << uint8 (0) // group length |
104 | sl << uint8 (0) // group length, decoded as BER in clients |
105 | << uint8 (0) // type == one-time effect |
105 | << uint8 (0) // type == one-time effect |
106 | << ber32 (sound) |
106 | << ber32 (sound) |
107 | << sint8 (dx) |
107 | << sint8 (dx) |
108 | << sint8 (dy) |
108 | << sint8 (dy) |
109 | << uint8 (vol); // 0 == silent, 255 max |
109 | << uint8 (vol); // 0 == silent, 255 max |
110 | |
110 | |
111 | *len = sl.cur - len; // patch in group length |
111 | *len = sl.cur - len - 1; // patch in group length |
112 | |
112 | |
113 | send_packet (sl); |
113 | send_packet (sl); |
114 | } |
114 | } |
115 | else if (this->sound) |
115 | else if (this->sound) |
116 | { |
116 | { |