NetBufExtender [Linux / Windows]

AMXX and Metamod Extra Modules
Avatar utilizator
CryWolf
Sys Admin
Sys Admin
Mesaje: 466
Membru din: Mar Dec 15, 2009 11:32 am
Detinator Steam: Da
Cunostinte CS: Excelente
Reputatie: Detinator
Webmaster
Scripter
Trance Fan
Localitate: Botosani

NetBufExtender [Linux / Windows]

Mesaj de CryWolf »

Imagine
NBEX este un plugin metamod care extinde „net buffer”: buffer-uri de server (de încredere, semnare) și buffer de încredere pentru client (dar nu nesigur). Le extinde la 64 kbytes.
Aceasta înseamnă că jucătorii vor avea mult mai puține șanse să fie loviti cu „Canal de încredere debordat”. De exemplu, puteți schimba modelele jucătorilor la începutul rundei fără consecințe negative.

Features:
  • Increases server Reliable, SignOn buffers to 64 kbytes
  • Increases server Spectator buffer to 3990 bytes
  • Increases client Reliable buffer to 64 kbytes by sending it by fragments if need
  • Reduces the chance to be kicked with "Reliable channel overflowed" by increasing client reliable buffer
Installation:
  • Go to your <gamedir> (for example "valve" or "cstrike") and copy there folder "addons" from the archive.
  • Then go to your metamod directory (for default is <gamedir>/addons/metamod/) and add into plugins.ini :
    • For windows:
      win32 addons\nbex\nbex.dll
    • For linux:
      linux addons/nbex/nbex.so
Current version: 1.0 (Jan 07 2015)
NetBufExtender_1_0.zip
Partial source code:

Cod: Selectaţi tot

bool SV_SpawnServer_Pre(size_t nDeprecated, const char *pszMapName, const char *pszStartSpot) {
    bool fRes = SV_SpawnServer(nDeprecated, pszMapName, pszStartSpot);
 
    //sv.m_ServerMsg.data = g_bServerUnreliableBuffer;
    //sv.m_ServerMsg.maxsize = sizeof(g_bServerUnreliableBuffer);
    sv.m_ServerReliableMsg.data = g_bServerReliableBuffer;
    sv.m_ServerReliableMsg.maxsize = sizeof(g_bServerReliableBuffer); // 65536
    sv.m_MulticastMsg.data = g_bMulticastBuffer;
    sv.m_MulticastMsg.maxsize = sizeof(g_bMulticastBuffer); // 65536, but why?
    sv.m_SpectatorMsg.data = g_bSpectatorBuffer;
    sv.m_SpectatorMsg.maxsize = sizeof(g_bSpectatorBuffer); // 3990
    sv.m_SignOnMsg.data = g_bSignOnBuffer;
    sv.m_SignOnMsg.maxsize = sizeof(g_bSignOnBuffer); // 65536
 
    return fRes;
}
 
void Netchan_Setup_Pre(netsrc_t netsrc, netchan_t *pNetchan, netadr_t netadr, size_t nClientID, client_t *pClient, GETFRAGMENTSIZE_FUNC *pfnGetFragmentSize) {
    Netchan_Setup(netsrc, pNetchan, netadr, nClientID, pClient, pfnGetFragmentSize);
 
    pNetchan->msg.data = g_bPlayerReliableBuffer[nClientID];
    pNetchan->msg.maxsize = sizeof(g_bPlayerReliableBuffer[nClientID]); // 65536
}
 
void Netchan_Transmit_Pre(netchan_t *pNetchan, size_t nBufSize, const byte *pBuf) {
    if (pNetchan->msg.cursize > MAX_NETBUF_SIZE) { // > 3990
        Netchan_CreateFragments(true, pNetchan, &pNetchan->msg);
        pNetchan->msg.cursize = 0;
    } else {
        memcpy(pNetchan->msg_buf, pNetchan->msg.data, pNetchan->msg.cursize);
    }
 
    Netchan_Transmit(pNetchan, nBufSize, pBuf);
}
Thanks list:
  • Crock - big thanks for his dynpatcher code
  • FIELD LINE - active testing
  • Subb98 - testing
  • SAZONISCHE - testing
  • Nixon - testing
Nu aveţi permisiunea de a vizualiza fişierele ataşate acestui mesaj.
Info: NU IMI DATI PM PENTRU CERERI AJUTOR ETC (NU RASPUND) FOLOSITI FORUMUL.
Imagine

Imagine
CUM SA NU LUPTI PENTRU IUBIRE ????
Daca lupti,inseamna ca vrei sa castigi ceva.Iubirea nu-i o miza.