#include "eNetGameObject.h"
#include "ePlayer.h"
#include "eLagCompensation.h"
#include "eTimer.h"
#include "uInput.h"
#include "eGrid.h"
#include "eTeam.h"
#include "eTess2.h"
Go to the source code of this file.
Defines | |
#define | MAX_PING_OVERFLOW 3 |
#define | PING_OVERFLOW_TS .1 |
Functions | |
static REAL | se_GetPing (ePlayerNetID *player) |
nMessage & | operator<< (nMessage &m, const eCoord &x) |
nMessage & | operator>> (nMessage &m, eCoord &x) |
Variables | |
static tCallbackOr * | transfer_anchor |
#define MAX_PING_OVERFLOW 3 |
Definition at line 39 of file eNetGameObject.cpp.
Referenced by eNetGameObject::ReceiveControlNet().
#define PING_OVERFLOW_TS .1 |
static REAL se_GetPing | ( | ePlayerNetID * | player | ) | [static] |
Definition at line 43 of file eNetGameObject.cpp.
References nSERVER, nNetObject::Owner(), nConnectionInfo::ping, ePlayerNetID::ping, REAL, sn_Connections, sn_GetNetState(), sn_myNetID, and sn_pingCharityServer.
Referenced by eNetGameObject::SetPlayer(), and eNetGameObject::Timestep().
00044 { 00045 REAL peer_ping=0; 00046 REAL my_ping=0; 00047 00048 if (bool(player) && player->Owner()!=::sn_myNetID) 00049 { 00050 if (sn_GetNetState()!=nSERVER) 00051 peer_ping+=player->ping; 00052 else 00053 peer_ping+=sn_Connections[player->Owner()].ping; 00054 } 00055 if (sn_GetNetState()!=nSERVER && (!player || player->Owner()!=::sn_myNetID)) 00056 my_ping+=sn_Connections[0].ping; 00057 00058 REAL ping = (peer_ping+my_ping)*.5; 00059 00060 if (ping>my_ping+sn_pingCharityServer*.001) 00061 ping=my_ping+sn_pingCharityServer*.001; 00062 00063 if (ping<my_ping-sn_pingCharityServer*.001) 00064 ping=my_ping-sn_pingCharityServer*.001; 00065 00066 return ping; 00067 }
tCallbackOr* transfer_anchor [static] |
Definition at line 343 of file eNetGameObject.cpp.