Use pause_fps_max also on multiplayer
[oweals/minetest.git] / src / connection.h
index 90344da3efd428bc6fc8eca94c1062c69d2f79a7..516702cb8e19daa5639b0db0749bfcc711df0117 100644 (file)
@@ -120,9 +120,9 @@ public:
 };
 
 typedef enum MTProtocols {
-       PRIMARY,
-       UDP,
-       MINETEST_RELIABLE_UDP
+       MTP_PRIMARY,
+       MTP_UDP,
+       MTP_MINETEST_RELIABLE_UDP
 } MTProtocols;
 
 #define SEQNUM_MAX 65535
@@ -162,16 +162,19 @@ inline bool seqnum_in_window(u16 seqnum, u16 next,u16 window_size)
 struct BufferedPacket
 {
        BufferedPacket(u8 *a_data, u32 a_size):
-               data(a_data, a_size), time(0.0), totaltime(0.0), absolute_send_time(-1)
+               data(a_data, a_size), time(0.0), totaltime(0.0), absolute_send_time(-1),
+               resend_count(0)
        {}
        BufferedPacket(u32 a_size):
-               data(a_size), time(0.0), totaltime(0.0), absolute_send_time(-1)
+               data(a_size), time(0.0), totaltime(0.0), absolute_send_time(-1),
+               resend_count(0)
        {}
        SharedBuffer<u8> data; // Data of the packet, including headers
        float time; // Seconds from buffering the packet or re-sending
        float totaltime; // Seconds from buffering the packet
        unsigned int absolute_send_time;
        Address address; // Sender or destination
+       unsigned int resend_count;
 };
 
 // This adds the base headers to the data and makes a packet out of it
@@ -546,7 +549,7 @@ public:
        void setWindowSize(unsigned int size) { window_size = size; };
 private:
        JMutex m_internal_mutex;
-       unsigned int window_size;
+       int window_size;
 
        u16 next_incoming_seqnum;