| 1870 | // place breakpoint depending on message type |
| 1871 | switch (info.type) |
| 1872 | { |
| 1873 | case NMTUpdateAIUnit: |
| 1874 | NOP; |
| 1875 | break; |
| 1876 | case NMTUpdateMan: |
| 1877 | NOP; |
| 1878 | break; |
| 1879 | case NMTUpdatePositionMan: |
| 1880 | NOP; |
| 1881 | break; |
| 1882 | case NMTUpdateVehicleAI: |
| 1883 | NOP; |
| 1884 | break; |
| 1885 | case NMTUpdateDammageVehicleAI: |
| 1886 | NOP; |
| 1887 | break; |
| 1888 | case NMTUpdateObject: |
| 1889 | NOP; |
| 1890 | break; |
| 1891 | case NMTUpdateDammageObject: |
| 1892 | NOP; |
| 1893 | break; |
| 1894 | } |
| 1895 | float verError = CalculateError(info.type, info.from, info.message, pInfo.dpid, update.lastSentMsg); |
| 1896 | (void)verError; // Calculated for debugging purposes |
| 1897 | NOP; |
| 1898 | } |
| 1899 | |
| 1900 | #endif |
| 1901 | } |
| 1902 | } |
| 1903 | } |
| 1904 | |
| 1905 | // sort objects by errors |
| 1906 | QSort(objects.Data(), objects.Size(), CmpPlayerObjects); |
| 1907 | } |
| 1908 | |
| 1909 | void NetworkServer::OnSendStarted(DWORD msgID, const NetworkMessageQueueItem& item) |
| 1910 | { |
| 1911 | NET_ERROR(msgID != MSGID_REPLACE); |
| 1912 | if (item.msg->objectUpdateInfo) |
| 1913 | { |
| 1914 | #if LOG_SEND_PROCESS |
| 1915 | LOG_DEBUG(Network, " - update info {:x} updated", (uintptr_t)item.msg->objectUpdateInfo); |
| 1916 | #endif |
| 1917 | if (item.msg->objectUpdateInfo->lastCreatedMsg != item.msg) |
| 1918 | { |
| 1919 | RptF("Last created message is bad:"); |
| 1920 | RptF(" sending message: %x (type %s), id = %x", item.msg.GetRef(), NetworkMessageTypeNames[item.type], |
| 1921 | msgID); |
| 1922 | RptF(" attached object info: %x", item.msg->objectUpdateInfo); |
| 1923 | RptF(" last created message: %x, id = %x", item.msg->objectUpdateInfo->lastCreatedMsg.GetRef(), |
| 1924 | item.msg->objectUpdateInfo->lastCreatedMsgId); |
| 1925 | RptF(" last sent message: %x", item.msg->objectUpdateInfo->lastSentMsg.GetRef()); |
| 1926 | |
| 1927 | item.msg->objectUpdateInfo->lastCreatedMsg = item.msg; |
| 1928 | } |
| 1929 | NET_ERROR(item.msg->objectUpdateInfo->lastCreatedMsgId == MSGID_REPLACE); |
nothing calls this directly
no test coverage detected