… | |
… | |
190 | static struct packet_type packets[] = { |
190 | static struct packet_type packets[] = { |
191 | {"ncom", PC(NewPlayerCmd) PF_PLAYING | PF_COMMAND6 }, |
191 | {"ncom", PC(NewPlayerCmd) PF_PLAYING | PF_COMMAND6 }, |
192 | {"command", PC(PlayerCmd) PF_PLAYING | PF_COMMAND0 }, |
192 | {"command", PC(PlayerCmd) PF_PLAYING | PF_COMMAND0 }, |
193 | |
193 | |
194 | {"examine", PC(ExamineCmd) PF_PLAYING }, |
194 | {"examine", PC(ExamineCmd) PF_PLAYING }, |
|
|
195 | {"ex", PC(ExCmd) PF_PLAYING }, |
195 | {"apply", PC(ApplyCmd) PF_PLAYING }, |
196 | {"apply", PC(ApplyCmd) PF_PLAYING }, |
196 | {"lookat", PC(LookAt) PF_PLAYING }, |
197 | {"lookat", PC(LookAt) PF_PLAYING }, |
197 | {"lock", PC(LockItem) PF_PLAYING }, |
198 | {"lock", PC(LockItem) PF_PLAYING }, |
198 | {"mark", PC(MarkItem) PF_PLAYING }, |
199 | {"mark", PC(MarkItem) PF_PLAYING }, |
199 | {"move", PC(MoveCmd) PF_PLAYING }, |
200 | {"move", PC(MoveCmd) PF_PLAYING }, |
200 | {"ext", PC(ExtCmd) 0 }, /* CF+ */ |
201 | {"ext", PC(ExtCmd) 0 }, // CF+ |
201 | {"mapredraw", PC(MapRedrawCmd) 0 }, /* Added: phil */ |
202 | {"mapredraw", PC(MapRedrawCmd) 0 }, |
202 | {"mapinfo", PC(MapInfoCmd) 0 }, /* CF+ */ |
203 | {"mapinfo", PC(MapInfoCmd) 0 }, // CF+ |
203 | |
204 | |
204 | {"reply", SC(ReplyCmd) 0 }, |
205 | {"reply", SC(ReplyCmd) 0 }, |
205 | {"exti", SC(ExtiCmd) 0 }, /* CF+ */ |
206 | {"exti", SC(ExtiCmd) 0 }, // CF+ |
206 | {"addme", SC(AddMeCmd) 0 }, |
207 | {"addme", SC(AddMeCmd) 0 }, |
207 | {"askface", SC(AskFaceCmd) 0 }, |
208 | {"askface", SC(AskFaceCmd) 0 }, |
208 | {"requestinfo", SC(RequestInfo) 0 }, |
209 | {"requestinfo", SC(RequestInfo) 0 }, |
209 | {"setfacemode", SC(SetFaceMode) 0 }, |
210 | {"setfacemode", SC(SetFaceMode) 0 }, |
210 | {"setsound", SC(SetSound) 0 }, |
211 | {"setsound", SC(SetSound) 0 }, |
… | |
… | |
532 | enum { maxlen = 32 / 7 + 1}; |
533 | enum { maxlen = 32 / 7 + 1}; |
533 | uint8 buf[maxlen]; |
534 | uint8 buf[maxlen]; |
534 | uint8 *p = buf + maxlen; |
535 | uint8 *p = buf + maxlen; |
535 | uint32 val = v.val; |
536 | uint32 val = v.val; |
536 | |
537 | |
|
|
538 | *--p = val & 0x7F; |
|
|
539 | |
537 | while (val > 0x7F) |
540 | while (val > 0x7F) |
538 | { |
541 | { |
|
|
542 | val >>= 7; |
539 | *--p = (val & 0x7F) | 0x80; |
543 | *--p = (val & 0x7F) | 0x80; |
540 | val >>= 7; |
|
|
541 | } |
544 | } |
542 | |
|
|
543 | *--p = val; |
|
|
544 | |
545 | |
545 | return *this << data (p, buf + maxlen - p); |
546 | return *this << data (p, buf + maxlen - p); |
546 | } |
547 | } |
547 | |
548 | |
548 | packet &packet::operator <<(const data &v) |
549 | packet &packet::operator <<(const data &v) |