Remove the number of packets which can be sent per second in an MP game. Also tune the max bytes per second to that of a 28.8KB/s modem.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3268 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
cf9e866aaf
commit
50506c390c
|
@ -439,7 +439,6 @@ static bool serializeMultiplayerGame(PHYSFS_file* fileHandle, const MULTIPLAYERG
|
|||
|| !PHYSFS_writeUBE8(fileHandle, serializeMulti->alliance)
|
||||
|| !PHYSFS_writeUBE8(fileHandle, serializeMulti->limit)
|
||||
|| !PHYSFS_writeUBE16(fileHandle, serializeMulti->bytesPerSec)
|
||||
|| !PHYSFS_writeUBE8(fileHandle, serializeMulti->packetsPerSec)
|
||||
|| !PHYSFS_writeUBE8(fileHandle, serializeMulti->encryptKey))
|
||||
return false;
|
||||
|
||||
|
@ -474,9 +473,7 @@ static bool deserializeMultiplayerGame(PHYSFS_file* fileHandle, MULTIPLAYERGAME*
|
|||
|| !PHYSFS_readUBE8(fileHandle, &serializeMulti->base)
|
||||
|| !PHYSFS_readUBE8(fileHandle, &serializeMulti->alliance)
|
||||
|| !PHYSFS_readUBE8(fileHandle, &serializeMulti->limit)
|
||||
|
||||
|| !PHYSFS_readUBE16(fileHandle, &serializeMulti->bytesPerSec)
|
||||
|| !PHYSFS_readUBE8(fileHandle, &serializeMulti->packetsPerSec)
|
||||
|| !PHYSFS_readUBE8(fileHandle, &serializeMulti->encryptKey))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -451,7 +451,6 @@ void runConnectionScreen(void )
|
|||
break;
|
||||
case CON_TYPESID_START+0: // Lobby button
|
||||
game.bytesPerSec = MAX_BYTESPERSEC;
|
||||
game.packetsPerSec = MAX_PACKETSPERSEC;
|
||||
NETsetupTCPIP(&finalconnection, ""); //inet
|
||||
changeTitleMode(GAMEFIND);
|
||||
break;
|
||||
|
@ -469,7 +468,6 @@ void runConnectionScreen(void )
|
|||
}
|
||||
|
||||
game.bytesPerSec = MAX_BYTESPERSEC;
|
||||
game.packetsPerSec = MAX_PACKETSPERSEC;
|
||||
NETsetupTCPIP(&finalconnection, addr); //inet
|
||||
|
||||
changeTitleMode(GAMEFIND);
|
||||
|
@ -2387,7 +2385,6 @@ BOOL startMultiOptions(BOOL bReenter)
|
|||
{
|
||||
// Maximum bitrate achieved before dropping checks
|
||||
game.bytesPerSec = MAX_BYTESPERSEC;
|
||||
game.packetsPerSec = MAX_PACKETSPERSEC;
|
||||
}
|
||||
|
||||
loadMultiStats((char*)sPlayer,&nullStats);
|
||||
|
|
|
@ -109,7 +109,6 @@ typedef struct {
|
|||
uint8_t alliance; // no/yes/AIs vs Humans
|
||||
uint8_t limit; // limit no/time/frag
|
||||
uint16_t bytesPerSec; // maximum bitrate achieved before dropping checks.
|
||||
uint8_t packetsPerSec; // maximum packets to send before dropping checks.
|
||||
uint8_t encryptKey; // key to use for encryption.
|
||||
// uint8_t skirmishPlayers[MAX_PLAYERS];// players to use in skirmish game.
|
||||
uint8_t skDiff[MAX_PLAYERS]; // skirmish game difficulty settings.
|
||||
|
@ -148,10 +147,9 @@ extern UBYTE bDisplayMultiJoiningStatus; // draw load progress?
|
|||
// ////////////////////////////////////////////////////////////////////////////
|
||||
// defines
|
||||
|
||||
// Max bit-rate/packet count, set for a 14.4KB modem (we have hardcore fans!)
|
||||
// Max bit-rate, set for a 28.8KB/s modem (we have hardcore fans!)
|
||||
|
||||
#define MAX_BYTESPERSEC 1200
|
||||
#define MAX_PACKETSPERSEC 6
|
||||
#define MAX_BYTESPERSEC 3400
|
||||
|
||||
#define ANYPLAYER 99
|
||||
#define ONEPLAYER 98
|
||||
|
|
|
@ -105,11 +105,6 @@ static BOOL okToSend(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if( NETgetRecentPacketsSent() >= game.packetsPerSec )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue