mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-31 00:51:17 +00:00
Refactoring patch by DevHC
This commit is contained in:
parent
21668c0616
commit
fef4d12d68
31 changed files with 60 additions and 98 deletions
|
@ -660,7 +660,7 @@ static qboolean SV_DelBanEntryFromList(int index)
|
|||
{
|
||||
if(index == serverBansCount - 1)
|
||||
serverBansCount--;
|
||||
else if(index < sizeof(serverBans) / sizeof(*serverBans) - 1)
|
||||
else if(index < ARRAY_LEN(serverBans) - 1)
|
||||
{
|
||||
memmove(serverBans + index, serverBans + index + 1, (serverBansCount - index - 1) * sizeof(*serverBans));
|
||||
serverBansCount--;
|
||||
|
@ -740,7 +740,7 @@ static void SV_AddBanToList(qboolean isexception)
|
|||
return;
|
||||
}
|
||||
|
||||
if(serverBansCount > sizeof(serverBans) / sizeof(*serverBans))
|
||||
if(serverBansCount > ARRAY_LEN(serverBans))
|
||||
{
|
||||
Com_Printf ("Error: Maximum number of bans/exceptions exceeded.\n");
|
||||
return;
|
||||
|
|
|
@ -1782,7 +1782,7 @@ void SV_UserVoip( client_t *cl, msg_t *msg ) {
|
|||
|
||||
// Transmit this packet to the client.
|
||||
// !!! FIXME: I don't like this queueing system.
|
||||
if (client->queuedVoipPackets >= (sizeof (client->voipPacket) / sizeof (client->voipPacket[0]))) {
|
||||
if (client->queuedVoipPackets >= ARRAY_LEN(client->voipPacket)) {
|
||||
Com_Printf("Too many VoIP packets queued for client #%d\n", i);
|
||||
continue; // no room for another packet right now.
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ void SV_AdjustAreaPortalState( sharedEntity_t *ent, qboolean open ) {
|
|||
|
||||
/*
|
||||
==================
|
||||
SV_GameAreaEntities
|
||||
SV_EntityContact
|
||||
==================
|
||||
*/
|
||||
qboolean SV_EntityContact( vec3_t mins, vec3_t maxs, const sharedEntity_t *gEnt, int capsule ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue