SA:MP Надёжность пакетов

Tema05

Известный
Автор темы
1,510
476
Версия SA-MP
  1. 0.3.7-R3
У пакетов есть параметр PacketReliability отвечающий на надёжность. В интернете нашёл только описание значений 0-4, но на практике в игре я замечаю исходящие пакеты с значением этого параметра 8, 9. Как это можно объяснить?
 

MrCreepTon

Неизвестный
Всефорумный модератор
2,270
5,156
C++:
enum PacketReliability
{
    UNRELIABLE = 6,   /// Same as regular UDP, except that it will also discard duplicate datagrams.  RakNet adds (6 to 17) + 21 bits of overhead, 16 of which is used to detect duplicate packets and 6 to 17 of which is used for message length.
    UNRELIABLE_SEQUENCED,  /// Regular UDP with a sequence counter.  Out of order messages will be discarded.  This adds an additional 13 bits on top what is used for UNRELIABLE.
    RELIABLE,   /// The message is sent reliably, but not necessarily in any order.  Same overhead as UNRELIABLE.
    RELIABLE_ORDERED,   /// This message is reliable and will arrive in the order you sent it.  Messages will be delayed while waiting for out of order messages.  Same overhead as UNRELIABLE_SEQUENCED.
    RELIABLE_SEQUENCED /// This message is reliable and will arrive in the sequence you sent it.  Out or order messages will be dropped.  Same overhead as UNRELIABLE_SEQUENCED.
};
 

Tema05

Известный
Автор темы
1,510
476
C++:
enum PacketReliability
{
    UNRELIABLE = 6,   /// Same as regular UDP, except that it will also discard duplicate datagrams.  RakNet adds (6 to 17) + 21 bits of overhead, 16 of which is used to detect duplicate packets and 6 to 17 of which is used for message length.
    UNRELIABLE_SEQUENCED,  /// Regular UDP with a sequence counter.  Out of order messages will be discarded.  This adds an additional 13 bits on top what is used for UNRELIABLE.
    RELIABLE,   /// The message is sent reliably, but not necessarily in any order.  Same overhead as UNRELIABLE.
    RELIABLE_ORDERED,   /// This message is reliable and will arrive in the order you sent it.  Messages will be delayed while waiting for out of order messages.  Same overhead as UNRELIABLE_SEQUENCED.
    RELIABLE_SEQUENCED /// This message is reliable and will arrive in the sequence you sent it.  Out or order messages will be dropped.  Same overhead as UNRELIABLE_SEQUENCED.
};
Я находил уже этот блок, но в твоём есть "= 6". Значит нумерация начинается с 6. Это всё расставляет на свои места. Получается в сампе это 6-10, а не 0-4, спасибо
 
  • Нравится
Реакции: MrCreepTon