… | |
… | |
793 | { |
793 | { |
794 | LOG (llevDebug, "Corrupt ncom command <%s> not long enough - discarding\n", buf); |
794 | LOG (llevDebug, "Corrupt ncom command <%s> not long enough - discarding\n", buf); |
795 | return; |
795 | return; |
796 | } |
796 | } |
797 | |
797 | |
798 | packet = GetShort_String (buf); |
798 | packet = net_uint16 (buf); |
799 | repeat = GetInt_String (buf + 2); |
799 | repeat = net_uint32 (buf + 2); |
|
|
800 | |
800 | /* -1 is special - no repeat, but don't update */ |
801 | /* -1 is special - no repeat, but don't update */ |
801 | if (repeat != -1) |
802 | if (repeat != -1) |
802 | pl->count = repeat; |
803 | pl->count = repeat; |
803 | |
804 | |
804 | if ((len - 4) >= MAX_BUF) |
805 | if ((len - 4) >= MAX_BUF) |
… | |
… | |
1482 | else |
1483 | else |
1483 | face_num = 0; |
1484 | face_num = 0; |
1484 | |
1485 | |
1485 | if (face_num != ns.lastmap.cells[ax][ay].faces[layer]) |
1486 | if (face_num != ns.lastmap.cells[ax][ay].faces[layer]) |
1486 | { |
1487 | { |
1487 | SockList_AddShort (&sl, face_num); |
1488 | sl << uint16 (face_num); |
1488 | if (face_num && !(ns.faces_sent[face_num] & NS_FACESENT_FACE)) |
1489 | if (face_num && !(ns.faces_sent[face_num] & NS_FACESENT_FACE)) |
1489 | esrv_send_face (&ns, face_num, 0); |
1490 | esrv_send_face (&ns, face_num, 0); |
1490 | |
1491 | |
1491 | heads[(ay * MAX_HEAD_POS + ax) * MAX_LAYERS + layer] = NULL; |
1492 | heads[(ay * MAX_HEAD_POS + ax) * MAX_LAYERS + layer] = NULL; |
1492 | ns.lastmap.cells[ax][ay].faces[layer] = face_num; |
1493 | ns.lastmap.cells[ax][ay].faces[layer] = face_num; |