P_P_F void Plugin_ServerPacketEvent(netadr_t* to, void* data, int len) { msg_t msg; msg.data = data; msg.cursize = len; msg.maxsize = len; msg.bit = 0; msg.overflowed = qfalse; msg.readonly = qtrue; SV_PacketEvent( to, &msg ); }
/* ================= Com_RunAndTimeServerPacket ================= */ void Com_RunAndTimeServerPacket( netadr_t *evFrom, msg_t *buf ) { int t1, t2, msec; t1 = 0; if ( com_speeds->integer ) { t1 = Sys_Milliseconds (); } SV_PacketEvent( *evFrom, buf ); if ( com_speeds->integer ) { t2 = Sys_Milliseconds (); msec = t2 - t1; if ( com_speeds->integer == 3 ) { Com_Printf( "SV_PacketEvent time: %i\n", msec ); } } }
void NET_UDPPacketEvent(netadr_t* from, void* data, int len) { msg_t msg; qboolean returnNow = qfalse; PHandler_Event(PLUGINS_ONUDPNETEVENT, from, data, len, &returnNow); if(returnNow) { return; } msg.data = data; msg.cursize = len; msg.maxsize = len; msg.readcount = 0; msg.bit = 0; msg.readonly = qtrue; msg.overflowed = qfalse; SV_PacketEvent(from, &msg); }