Преглед на файлове

fixed sending of unsequenced packages

There was a bug where packets that were supposed to be sent as unsequenced
were sent as reliable. This fix now properly handles sending of unsequenced
packets.
Martin Felis преди 12 години
родител
ревизия
214ae3a160
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      enet.c

+ 1 - 1
enet.c

@@ -177,7 +177,7 @@ static ENetPacket *read_packet(lua_State *l, int idx, enet_uint8 *channel_id) {
 	if (argc >= idx+2 && !lua_isnil(l, idx+2)) {
 		const char *flag_str = luaL_checkstring(l, idx+2);
 		if (strcmp("unsequenced", flag_str) == 0) {
-			flags = ENET_PACKET_FLAG_RELIABLE;
+			flags = ENET_PACKET_FLAG_UNSEQUENCED;
 		} else if (strcmp("reliable", flag_str) == 0) {
 			flags = ENET_PACKET_FLAG_RELIABLE;
 		} else if (strcmp("unreliable", flag_str) == 0) {