1197: Fix typo r=heinrich5991 a=yangfl



Co-authored-by: yangfl <yangfl@users.noreply.github.com>
This commit is contained in:
bors[bot] 2018-07-10 09:35:21 +00:00
commit 94a8fe79bc
40 changed files with 73 additions and 73 deletions

View file

@ -201,7 +201,7 @@ function(set_glob VAR GLOBBING DIRECTORY) # ...
endfunction() endfunction()
######################################################################## ########################################################################
# INITALIZE TARGET LISTS # INITIALIZE TARGET LISTS
######################################################################## ########################################################################
set(TARGETS_OWN) set(TARGETS_OWN)

View file

@ -155,7 +155,7 @@ ImmersiveMode=y
# Application implements Android-specific routines to put to background, and will not draw anything to screen # Application implements Android-specific routines to put to background, and will not draw anything to screen
# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them # between SDL_ACTIVEEVENT lost / gained notifications - you should check for them
# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) # right after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n)
# This option is reported to be buggy, sometimes failing to restore video state # This option is reported to be buggy, sometimes failing to restore video state
NonBlockingSwapBuffers=n NonBlockingSwapBuffers=n
@ -214,7 +214,7 @@ CompiledLibraries="sdl_image freetype glu ogg opus opusfile curl"
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) # Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
CustomBuildScript=n CustomBuildScript=n
# Aditional CFLAGS for application # Additional CFLAGS for application
AppCflags='-O3' AppCflags='-O3'
# Additional LDFLAGS for application # Additional LDFLAGS for application

View file

@ -1,6 +1,6 @@
import sys, os import sys, os
# genereate keys.h file # generate keys.h file
f = file("src/engine/keys.h", "w") f = file("src/engine/keys.h", "w")
keynames = [] keynames = []

View file

@ -169,7 +169,7 @@ static void sha_done(sha256_state* md, void* out)
md->curlen = 0; md->curlen = 0;
} }
// Pad upto 56 bytes of zeroes // Pad up to 56 bytes of zeroes
while(md->curlen < 56) while(md->curlen < 56)
md->buf[md->curlen++] = 0; md->buf[md->curlen++] = 0;

View file

@ -1283,7 +1283,7 @@ static int priv_net_create_socket(int domain, int type, struct sockaddr *addr, i
} }
#endif #endif
/* set to IPv6 only if thats what we are creating */ /* set to IPv6 only if that's what we are creating */
#if defined(IPV6_V6ONLY) /* windows sdk 6.1 and higher */ #if defined(IPV6_V6ONLY) /* windows sdk 6.1 and higher */
if(domain == AF_INET6) if(domain == AF_INET6)
{ {

View file

@ -189,7 +189,7 @@ IOHANDLE io_open(const char *filename, int flags);
Parameters: Parameters:
io - Handle to the file to read data from. io - Handle to the file to read data from.
buffer - Pointer to the buffer that will recive the data. buffer - Pointer to the buffer that will receive the data.
size - Number of bytes to read from the file. size - Number of bytes to read from the file.
Returns: Returns:
@ -586,7 +586,7 @@ int64 time_freq();
/* /*
Function: time_timestamp Function: time_timestamp
Retrives the current time as a UNIX timestamp Retrieves the current time as a UNIX timestamp
Returns: Returns:
The time as a UNIX timestamp The time as a UNIX timestamp
@ -636,7 +636,7 @@ typedef struct sockaddr_un UNIXSOCKETADDR;
#endif #endif
/* /*
Function: net_init Function: net_init
Initiates network functionallity. Initiates network functionality.
Returns: Returns:
Returns 0 on success, Returns 0 on success,
@ -734,13 +734,13 @@ int net_udp_send(NETSOCKET sock, const NETADDR *addr, const void *data, int size
/* /*
Function: net_udp_recv Function: net_udp_recv
Recives a packet over an UDP socket. Receives a packet over an UDP socket.
Parameters: Parameters:
sock - Socket to use. sock - Socket to use.
addr - Pointer to an NETADDR that will recive the address. addr - Pointer to an NETADDR that will receive the address.
data - Pointer to a buffer that will recive the data. data - Pointer to a buffer that will receive the data.
maxsize - Maximum size to recive. maxsize - Maximum size to receive.
Returns: Returns:
On success it returns the number of bytes received. Returns -1 On success it returns the number of bytes received. Returns -1
@ -928,7 +928,7 @@ void str_append(char *dst, const char *src, int dst_size);
Copies a string to another. Copies a string to another.
Parameters: Parameters:
dst - Pointer to a buffer that shall recive the string. dst - Pointer to a buffer that shall receive the string.
src - String to be copied. src - String to be copied.
dst_size - Size of the buffer dst. dst_size - Size of the buffer dst.
@ -952,19 +952,19 @@ int str_length(const char *str);
/* /*
Function: str_format Function: str_format
Performs printf formating into a buffer. Performs printf formatting into a buffer.
Parameters: Parameters:
buffer - Pointer to the buffer to recive the formatted string. buffer - Pointer to the buffer to receive the formatted string.
buffer_size - Size of the buffer. buffer_size - Size of the buffer.
format - printf formating string. format - printf formatting string.
... - Parameters for the formating. ... - Parameters for the formatting.
Returns: Returns:
Length of written string Length of written string
Remarks: Remarks:
- See the C manual for syntax for the printf formating string. - See the C manual for syntax for the printf formatting string.
- The strings are treated as zero-termineted strings. - The strings are treated as zero-termineted strings.
- Guarantees that dst string will contain zero-termination. - Guarantees that dst string will contain zero-termination.
*/ */
@ -1266,7 +1266,7 @@ const char *str_find(const char *haystack, const char *needle);
data - Size of the data data - Size of the data
Remarks: Remarks:
- The desination buffer will be zero-terminated - The destination buffer will be zero-terminated
*/ */
void str_hex(char *dst, int dst_size, const void *data, int data_size); void str_hex(char *dst, int dst_size, const void *data, int data_size);

View file

@ -268,7 +268,7 @@ public:
/* /*
Function: optimize Function: optimize
Removes unnessasary data, returns how many bytes was earned. Removes unnecessary data, returns how many bytes was earned.
Remarks: Remarks:
- Invalidates ranges - Invalidates ranges

View file

@ -56,7 +56,7 @@ public:
STATE_LOADING - The client has connected to a server and is loading resources. STATE_LOADING - The client has connected to a server and is loading resources.
STATE_ONLINE - The client is connected to a server and running the game. STATE_ONLINE - The client is connected to a server and running the game.
STATE_DEMOPLAYBACK - The client is playing a demo STATE_DEMOPLAYBACK - The client is playing a demo
STATE_QUITING - The client is quiting. STATE_QUITING - The client is quitting.
*/ */
enum enum

View file

@ -1226,7 +1226,7 @@ void CCommandProcessorFragment_OpenGL3_3::UploadStreamBufferData(unsigned int Pr
glBufferData(GL_ARRAY_BUFFER, sizeof(CCommandBuffer::SVertex) * Count, (const void*)pVertices, GL_STREAM_DRAW); glBufferData(GL_ARRAY_BUFFER, sizeof(CCommandBuffer::SVertex) * Count, (const void*)pVertices, GL_STREAM_DRAW);
else else
{ {
// This is better for some iGPUs. Probably due to not initializing a new buffer in the system memory again and again...(driver dependend) // This is better for some iGPUs. Probably due to not initializing a new buffer in the system memory again and again...(driver dependent)
void *pData = glMapBufferRange(GL_ARRAY_BUFFER, 0, sizeof(CCommandBuffer::SVertex) * Count, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT); void *pData = glMapBufferRange(GL_ARRAY_BUFFER, 0, sizeof(CCommandBuffer::SVertex) * Count, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
mem_copy(pData, pVertices, sizeof(CCommandBuffer::SVertex) * Count); mem_copy(pData, pVertices, sizeof(CCommandBuffer::SVertex) * Count);
@ -2207,7 +2207,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
SDL_ClearError(); SDL_ClearError();
const char *pErr = NULL; const char *pErr = NULL;
//query default values, since they are platform dependend //query default values, since they are platform dependent
static bool s_InitDefaultParams = false; static bool s_InitDefaultParams = false;
static int s_SDLGLContextProfileMask, s_SDLGLContextMajorVersion, s_SDLGLContextMinorVersion; static int s_SDLGLContextProfileMask, s_SDLGLContextMajorVersion, s_SDLGLContextMinorVersion;
m_UseOpenGL3_3 = false; m_UseOpenGL3_3 = false;

View file

@ -37,7 +37,7 @@
class CGraphicsBackend_Threaded : public IGraphicsBackend class CGraphicsBackend_Threaded : public IGraphicsBackend
{ {
public: public:
// constructed on the main thread, the rest of the functions is runned on the render thread // constructed on the main thread, the rest of the functions is run on the render thread
class ICommandProcessor class ICommandProcessor
{ {
public: public:

View file

@ -1216,7 +1216,7 @@ bool CServerBrowser::DDNetFiltered(char *pFilter, const char *pName)
p = strtok(NULL, ","); p = strtok(NULL, ",");
} }
return false; // contry not excluded return false; // country not excluded
} }
void CServerBrowser::DDNetCountryFilterClean() void CServerBrowser::DDNetCountryFilterClean()

View file

@ -392,7 +392,7 @@ void CSound::RateConvert(int SampleID)
for(int i = 0; i < NumFrames; i++) for(int i = 0; i < NumFrames; i++)
{ {
// resample TODO: this should be done better, like linear atleast // resample TODO: this should be done better, like linear at least
float a = i/(float)NumFrames; float a = i/(float)NumFrames;
int f = (int)(a*pSample->m_NumFrames); int f = (int)(a*pSample->m_NumFrames);
if(f >= pSample->m_NumFrames) if(f >= pSample->m_NumFrames)

View file

@ -1205,7 +1205,7 @@ public:
break; break;
} }
// don't add text that isnt drawn, the color overwrite is used for that // don't add text that isn't drawn, the color overwrite is used for that
if(m_TextA != 0.f) if(m_TextA != 0.f)
{ {
TextContainer.m_StringInfo.m_CharacterQuads.push_back(STextCharQuad()); TextContainer.m_StringInfo.m_CharacterQuads.push_back(STextCharQuad());

View file

@ -2,7 +2,7 @@ Title: Prediction
The engine calls <modc_predict> when reprediction is required. This happens usually when new data has arrived from the server. <modc_predict> should to prediction from the current snapshot and current snapshot tick (<client_tick> + 1) up to and including the tick returned by <client_predtick>. The engine calls <modc_predict> when reprediction is required. This happens usually when new data has arrived from the server. <modc_predict> should to prediction from the current snapshot and current snapshot tick (<client_tick> + 1) up to and including the tick returned by <client_predtick>.
Predicted input sent to the server can be retrived by calling <client_get_input> with the corresponding tick that you want the input for. Here is a simple example of how it might look. Predicted input sent to the server can be retrieved by calling <client_get_input> with the corresponding tick that you want the input for. Here is a simple example of how it might look.
> void modc_predict() > void modc_predict()
> { > {

View file

@ -4,7 +4,7 @@ Section: Overview
Topic: Definitions Topic: Definitions
- *Snapshot*. A is a serialized game state from which a client can render the game from. They are sent from the server at a regular interval and is created specificly for each client in order to reduce bandwidth. - *Snapshot*. A is a serialized game state from which a client can render the game from. They are sent from the server at a regular interval and is created specifically for each client in order to reduce bandwidth.
- *Delta Snapshot*. A set of data that can be applied to a snapshot in order to create a new snapshot with the updated game state. - *Delta Snapshot*. A set of data that can be applied to a snapshot in order to create a new snapshot with the updated game state.
Topic: Structure Topic: Structure
@ -48,10 +48,10 @@ After a snapshot have been created, compression is applyed to reduce the bandwid
Topic: Interval Topic: Interval
The interval for how often a client recives a snapshot changes during the course of the connection. There are three different snapshot rates. The interval for how often a client receives a snapshot changes during the course of the connection. There are three different snapshot rates.
- *Init*. 5 snapshots per second. Used when a client is connecting and used until the client has acknowlaged a snapshot. This mechanism is used because the first snapshot because no delta compression can be done. - *Init*. 5 snapshots per second. Used when a client is connecting and used until the client has acknowlaged a snapshot. This mechanism is used because the first snapshot because no delta compression can be done.
- *Full*. Snapshot for every tick or every even tick depending on server configuration. This is used during normal gameplay and everything is running smooth. - *Full*. Snapshot for every tick or every even tick depending on server configuration. This is used during normal gameplay and everything is running smooth.
- *Recovery*. 1 snapshot each second. A client enters recovery rate when it havn't acknowlaged a snapshot over 1 second. This is to let the client to beable to recover if it has a slow connection. - *Recovery*. 1 snapshot each second. A client enters recovery rate when it haven't acknowlaged a snapshot over 1 second. This is to let the client to beable to recover if it has a slow connection.

View file

@ -1,5 +1,5 @@
The source code under this directory are external libraries The source code under this directory are external libraries
with their own licences. The source you find here is stripped with their own licences. The source you find here is stripped
of unnessesary information. Please visit their websites for of unnecessary information. Please visit their websites for
more information and official releases. more information and official releases.

View file

@ -44,7 +44,7 @@ public:
static IKernel *Create(); static IKernel *Create();
virtual ~IKernel() {} virtual ~IKernel() {}
// templated access to handle pointer convertions and interface names // templated access to handle pointer conversions and interface names
template<class TINTERFACE> template<class TINTERFACE>
bool RegisterInterface(TINTERFACE *pInterface, bool Destroy = true) bool RegisterInterface(TINTERFACE *pInterface, bool Destroy = true)
{ {

View file

@ -115,7 +115,7 @@ void CSnapIDPool::FreeID(int ID)
{ {
if(ID < 0) if(ID < 0)
return; return;
dbg_assert(m_aIDs[ID].m_State == 1, "id is not alloced"); dbg_assert(m_aIDs[ID].m_State == 1, "id is not allocated");
m_InUsage--; m_InUsage--;
m_aIDs[ID].m_State = 2; m_aIDs[ID].m_State = 2;
@ -634,7 +634,7 @@ void CServer::DoSnapshot()
// create snapshots for all clients // create snapshots for all clients
for(int i = 0; i < MAX_CLIENTS; i++) for(int i = 0; i < MAX_CLIENTS; i++)
{ {
// client must be ingame to recive snapshots // client must be ingame to receive snapshots
if(m_aClients[i].m_State != CClient::STATE_INGAME) if(m_aClients[i].m_State != CClient::STATE_INGAME)
continue; continue;
@ -685,7 +685,7 @@ void CServer::DoSnapshot()
// save it the snapshot // save it the snapshot
m_aClients[i].m_Snapshots.Add(m_CurrentGameTick, time_get(), SnapshotSize, pData, 0); m_aClients[i].m_Snapshots.Add(m_CurrentGameTick, time_get(), SnapshotSize, pData, 0);
// find snapshot that we can preform delta against // find snapshot that we can perform delta against
EmptySnap.Clear(); EmptySnap.Clear();
{ {

View file

@ -42,7 +42,7 @@ class CSnapIDPool
{ {
public: public:
short m_Next; short m_Next;
short m_State; // 0 = free, 1 = alloced, 2 = timed short m_State; // 0 = free, 1 = allocated, 2 = timed
int m_Timeout; int m_Timeout;
}; };

View file

@ -151,7 +151,7 @@ MACRO_CONFIG_INT(SvTeeHistorian, sv_tee_historian, 0, 0, 1, CFGFLAG_SERVER, "Act
MACRO_CONFIG_INT(SvVanillaAntiSpoof, sv_vanilla_antispoof, 1, 0, 1, CFGFLAG_SERVER, "Enable vanilla Antispoof") MACRO_CONFIG_INT(SvVanillaAntiSpoof, sv_vanilla_antispoof, 1, 0, 1, CFGFLAG_SERVER, "Enable vanilla Antispoof")
MACRO_CONFIG_INT(SvDnsbl, sv_dnsbl, 0, 0, 1, CFGFLAG_SERVER, "Enable DNSBL (DNS-based Blackhole List)") MACRO_CONFIG_INT(SvDnsbl, sv_dnsbl, 0, 0, 1, CFGFLAG_SERVER, "Enable DNSBL (DNS-based Blackhole List)")
MACRO_CONFIG_STR(SvDnsblHost, sv_dnsbl_host, 128, "", CFGFLAG_SERVER, "Hostname of DNSBL provider to use for IP Verification") MACRO_CONFIG_STR(SvDnsblHost, sv_dnsbl_host, 128, "", CFGFLAG_SERVER, "Hostname of DNSBL provider to use for IP Verification")
MACRO_CONFIG_STR(SvDnsblKey, sv_dnsbl_key, 128, "", CFGFLAG_SERVER|CFGFLAG_NONTEEHISTORIC, "Optional Authentification Key for the specified DNSBL provider") MACRO_CONFIG_STR(SvDnsblKey, sv_dnsbl_key, 128, "", CFGFLAG_SERVER|CFGFLAG_NONTEEHISTORIC, "Optional Authentication Key for the specified DNSBL provider")
MACRO_CONFIG_INT(SvDnsblVote, sv_dnsbl_vote, 0, 0, 1, CFGFLAG_SERVER, "Block votes by blacklisted addresses") MACRO_CONFIG_INT(SvDnsblVote, sv_dnsbl_vote, 0, 0, 1, CFGFLAG_SERVER, "Block votes by blacklisted addresses")
MACRO_CONFIG_INT(SvDnsblBan, sv_dnsbl_ban, 0, 0, 1, CFGFLAG_SERVER, "Automatically ban blacklisted addresses") MACRO_CONFIG_INT(SvDnsblBan, sv_dnsbl_ban, 0, 0, 1, CFGFLAG_SERVER, "Automatically ban blacklisted addresses")
MACRO_CONFIG_INT(SvRconVote, sv_rcon_vote, 0, 0, 1, CFGFLAG_SERVER, "Only allow authed clients to call votes") MACRO_CONFIG_INT(SvRconVote, sv_rcon_vote, 0, 0, 1, CFGFLAG_SERVER, "Only allow authed clients to call votes")
@ -166,7 +166,7 @@ MACRO_CONFIG_STR(EcBindaddr, ec_bindaddr, 128, "localhost", CFGFLAG_ECON, "Addre
MACRO_CONFIG_INT(EcPort, ec_port, 0, 0, 0, CFGFLAG_ECON, "Port to use for the external console") MACRO_CONFIG_INT(EcPort, ec_port, 0, 0, 0, CFGFLAG_ECON, "Port to use for the external console")
MACRO_CONFIG_STR(EcPassword, ec_password, 32, "", CFGFLAG_ECON, "External console password") MACRO_CONFIG_STR(EcPassword, ec_password, 32, "", CFGFLAG_ECON, "External console password")
MACRO_CONFIG_INT(EcBantime, ec_bantime, 0, 0, 1440, CFGFLAG_ECON, "The time a client gets banned if econ authentication fails. 0 just closes the connection") MACRO_CONFIG_INT(EcBantime, ec_bantime, 0, 0, 1440, CFGFLAG_ECON, "The time a client gets banned if econ authentication fails. 0 just closes the connection")
MACRO_CONFIG_INT(EcAuthTimeout, ec_auth_timeout, 30, 1, 120, CFGFLAG_ECON, "Time in seconds before the the econ authentification times out") MACRO_CONFIG_INT(EcAuthTimeout, ec_auth_timeout, 30, 1, 120, CFGFLAG_ECON, "Time in seconds before the the econ authentication times out")
MACRO_CONFIG_INT(EcOutputLevel, ec_output_level, 1, 0, 2, CFGFLAG_ECON, "Adjusts the amount of information in the external console") MACRO_CONFIG_INT(EcOutputLevel, ec_output_level, 1, 0, 2, CFGFLAG_ECON, "Adjusts the amount of information in the external console")
MACRO_CONFIG_INT(Debug, debug, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Debug mode") MACRO_CONFIG_INT(Debug, debug, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Debug mode")
@ -183,7 +183,7 @@ MACRO_CONFIG_STR(DbgStressServer, dbg_stress_server, 32, "localhost", CFGFLAG_CL
MACRO_CONFIG_STR(SvWelcome, sv_welcome, 64, "", CFGFLAG_SERVER, "Message that will be displayed to players who join the server") MACRO_CONFIG_STR(SvWelcome, sv_welcome, 64, "", CFGFLAG_SERVER, "Message that will be displayed to players who join the server")
MACRO_CONFIG_INT(SvReservedSlots, sv_reserved_slots, 0, 0, 16, CFGFLAG_SERVER, "The number of slots that are reserved for special players") MACRO_CONFIG_INT(SvReservedSlots, sv_reserved_slots, 0, 0, 16, CFGFLAG_SERVER, "The number of slots that are reserved for special players")
MACRO_CONFIG_STR(SvReservedSlotsPass, sv_reserved_slots_pass, 32, "", CFGFLAG_SERVER, "The password that is required to use a reserved slot") MACRO_CONFIG_STR(SvReservedSlotsPass, sv_reserved_slots_pass, 32, "", CFGFLAG_SERVER, "The password that is required to use a reserved slot")
MACRO_CONFIG_INT(SvHit, sv_hit, 1, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Whether players can hammer/grenade/laser eachother or not") MACRO_CONFIG_INT(SvHit, sv_hit, 1, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Whether players can hammer/grenade/laser each other or not")
MACRO_CONFIG_INT(SvEndlessDrag, sv_endless_drag, 0, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Turns endless hooking on/off") MACRO_CONFIG_INT(SvEndlessDrag, sv_endless_drag, 0, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Turns endless hooking on/off")
MACRO_CONFIG_INT(SvTestingCommands, sv_test_cmds, 0, 0, 1, CFGFLAG_SERVER, "Turns testing commands aka cheats on/off") MACRO_CONFIG_INT(SvTestingCommands, sv_test_cmds, 0, 0, 1, CFGFLAG_SERVER, "Turns testing commands aka cheats on/off")
MACRO_CONFIG_INT(SvFreezeDelay, sv_freeze_delay, 3, 1, 30, CFGFLAG_SERVER|CFGFLAG_GAME, "How many seconds the players will remain frozen (applies to all except delayed freeze in switch layer & deepfreeze)") MACRO_CONFIG_INT(SvFreezeDelay, sv_freeze_delay, 3, 1, 30, CFGFLAG_SERVER|CFGFLAG_GAME, "How many seconds the players will remain frozen (applies to all except delayed freeze in switch layer & deepfreeze)")
@ -229,7 +229,7 @@ MACRO_CONFIG_STR(SvScoreFolder, sv_score_folder, 32, "records", CFGFLAG_SERVER,
#if defined(CONF_SQL) #if defined(CONF_SQL)
MACRO_CONFIG_INT(SvUseSQL, sv_use_sql, 0, 0, 1, CFGFLAG_SERVER, "Enables SQL DB instead of record file") MACRO_CONFIG_INT(SvUseSQL, sv_use_sql, 0, 0, 1, CFGFLAG_SERVER, "Enables SQL DB instead of record file")
MACRO_CONFIG_STR(SvSqlServerName, sv_sql_servername, 5, "UNK", CFGFLAG_SERVER, "SQL Server name that is inserted into record table") MACRO_CONFIG_STR(SvSqlServerName, sv_sql_servername, 5, "UNK", CFGFLAG_SERVER, "SQL Server name that is inserted into record table")
MACRO_CONFIG_STR(SvSqlValidServerNames, sv_sql_valid_servernames, 64, "UNK", CFGFLAG_SERVER, "Comma seperated list of valid server names for saving a game to ([A-Z][A-Z][A-Z].?") MACRO_CONFIG_STR(SvSqlValidServerNames, sv_sql_valid_servernames, 64, "UNK", CFGFLAG_SERVER, "Comma separated list of valid server names for saving a game to ([A-Z][A-Z][A-Z].?")
MACRO_CONFIG_INT(SvSaveGames, sv_savegames, 1, 0, 1, CFGFLAG_SERVER, "Enables savegames (/save and /load)") MACRO_CONFIG_INT(SvSaveGames, sv_savegames, 1, 0, 1, CFGFLAG_SERVER, "Enables savegames (/save and /load)")
MACRO_CONFIG_INT(SvSaveGamesDelay, sv_savegames_delay, 60, 0, 10000, CFGFLAG_SERVER, "Delay in seconds for loading a savegame") MACRO_CONFIG_INT(SvSaveGamesDelay, sv_savegames_delay, 60, 0, 10000, CFGFLAG_SERVER, "Delay in seconds for loading a savegame")

View file

@ -727,7 +727,7 @@ int CDemoPlayer::Load(class IStorage *pStorage, class IConsole *pConsole, const
free(pMapData); free(pMapData);
} }
// store map inforation // store map information
m_MapInfo.m_Crc = Crc; m_MapInfo.m_Crc = Crc;
m_MapInfo.m_Size = MapSize; m_MapInfo.m_Size = MapSize;
str_copy(m_MapInfo.m_aName, m_Info.m_Header.m_aMapName, sizeof(m_MapInfo.m_aName)); str_copy(m_MapInfo.m_aName, m_Info.m_Header.m_aMapName, sizeof(m_MapInfo.m_aName));
@ -747,7 +747,7 @@ int CDemoPlayer::Load(class IStorage *pStorage, class IConsole *pConsole, const
} }
} }
// scan the file for interessting points // scan the file for interesting points
ScanFile(); ScanFile();
// reset slice markers // reset slice markers

View file

@ -418,7 +418,7 @@ bool CNetBan::IsBanned(const NETADDR *pOrigAddr, char *pBuf, unsigned BufferSize
CNetHash aHash[17]; CNetHash aHash[17];
int Length = CNetHash::MakeHashArray(pAddr, aHash); int Length = CNetHash::MakeHashArray(pAddr, aHash);
// check ban adresses // check ban addresses
CBanAddr *pBan = m_BanAddrPool.Find(pAddr, &aHash[Length]); CBanAddr *pBan = m_BanAddrPool.Find(pAddr, &aHash[Length]);
if(pBan) if(pBan)
{ {

View file

@ -18,7 +18,7 @@ CURRENT:
unsigned char ack; // 8 bit ack unsigned char ack; // 8 bit ack
unsigned char num_chunks; // 8 bit chunks unsigned char num_chunks; // 8 bit chunks
(unsigned char padding[3]) // 24 bit extra incase it's a connection less packet (unsigned char padding[3]) // 24 bit extra in case it's a connection less packet
// this is to make sure that it's compatible with the // this is to make sure that it's compatible with the
// old protocol // old protocol

View file

@ -437,7 +437,7 @@ int CNetConnection::Update()
} }
else else
{ {
// resend packet if we havn't got it acked in 1 second // resend packet if we haven't got it acked in 1 second
if(Now-pResend->m_LastSendTime > time_freq()) if(Now-pResend->m_LastSendTime > time_freq())
ResendChunk(pResend); ResendChunk(pResend);
} }

View file

@ -378,7 +378,7 @@ void CNetServer::OnPreConnMsg(NETADDR &Addr, CNetPacketConstruct &Packet)
// Before we can send NETMSG_SNAPEMPTY, the client needs // Before we can send NETMSG_SNAPEMPTY, the client needs
// to load a map, otherwise it might crash. The map // to load a map, otherwise it might crash. The map
// should be as small as is possible and directly available // should be as small as is possible and directly available
// to the client. Therefor a dummy map is sent in the same // to the client. Therefore a dummy map is sent in the same
// packet. To reduce the traffic we'll fallback to a default // packet. To reduce the traffic we'll fallback to a default
// map if there are too many connection attempts at once. // map if there are too many connection attempts at once.
@ -435,7 +435,7 @@ void CNetServer::OnPreConnMsg(NETADDR &Addr, CNetPacketConstruct &Packet)
} }
else else
{ {
// accept client directy // accept client directly
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, NULL, 0, NET_SECURITY_TOKEN_UNSUPPORTED); SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, NULL, 0, NET_SECURITY_TOKEN_UNSUPPORTED);
TryAcceptClient(Addr, NET_SECURITY_TOKEN_UNSUPPORTED); TryAcceptClient(Addr, NET_SECURITY_TOKEN_UNSUPPORTED);

View file

@ -6,7 +6,7 @@
#include <base/system.h> #include <base/system.h>
/* /*
Connection diagram - How the initilization works. Connection diagram - How the initialization works.
Client -> INFO -> Server Client -> INFO -> Server
Contains version info, name, and some other info. Contains version info, name, and some other info.
@ -20,7 +20,7 @@
modc_connected is called on the client and modc_connected is called on the client and
mods_connected is called on the server. mods_connected is called on the server.
The client should call client_entergame when the The client should call client_entergame when the
mod has done it's initilization. mod has done it's initialization.
Client -> ENTERGAME -> Server Client -> ENTERGAME -> Server
Tells the server to start sending snapshots. Tells the server to start sending snapshots.

View file

@ -145,7 +145,7 @@ int CRingBufferBase::PopFirst()
m_pConsume = NextBlock(m_pConsume); m_pConsume = NextBlock(m_pConsume);
} }
// in the case that we have catched up with the produce pointer // in the case that we have caught up with the produce pointer
// we might stand on a free block so merge em // we might stand on a free block so merge em
MergeBack(m_pConsume); MergeBack(m_pConsume);
return 1; return 1;

View file

@ -6,7 +6,7 @@
bool CBinds::CBindsSpecial::OnInput(IInput::CEvent Event) bool CBinds::CBindsSpecial::OnInput(IInput::CEvent Event)
{ {
// don't handle invalid events and keys that arn't set to anything // don't handle invalid events and keys that aren't set to anything
if(((Event.m_Key >= KEY_F1 && Event.m_Key <= KEY_F12) || (Event.m_Key >= KEY_F13 && Event.m_Key <= KEY_F24)) && m_pBinds->m_apKeyBindings[Event.m_Key]) if(((Event.m_Key >= KEY_F1 && Event.m_Key <= KEY_F12) || (Event.m_Key >= KEY_F13 && Event.m_Key <= KEY_F24)) && m_pBinds->m_apKeyBindings[Event.m_Key])
{ {
int Stroke = 0; int Stroke = 0;
@ -64,7 +64,7 @@ void CBinds::Bind(int KeyID, const char *pStr, bool FreeOnly)
bool CBinds::OnInput(IInput::CEvent e) bool CBinds::OnInput(IInput::CEvent e)
{ {
// don't handle invalid events and keys that arn't set to anything // don't handle invalid events and keys that aren't set to anything
if(e.m_Key <= 0 || e.m_Key >= KEY_LAST || !m_apKeyBindings[e.m_Key]) if(e.m_Key <= 0 || e.m_Key >= KEY_LAST || !m_apKeyBindings[e.m_Key])
return false; return false;

View file

@ -352,7 +352,7 @@ bool CChat::OnInput(IInput::CEvent Event)
// add the name // add the name
str_append(aBuf, pCompletionString, sizeof(aBuf)); str_append(aBuf, pCompletionString, sizeof(aBuf));
// add seperator // add separator
const char *pSeparator = ""; const char *pSeparator = "";
if(*(m_Input.GetString()+m_PlaceholderOffset+m_PlaceholderLength) != ' ') if(*(m_Input.GetString()+m_PlaceholderOffset+m_PlaceholderLength) != ' ')
pSeparator = m_PlaceholderOffset == 0 ? ": " : " "; pSeparator = m_PlaceholderOffset == 0 ? ": " : " ";
@ -506,7 +506,7 @@ void CChat::AddLine(int ClientID, int Team, const char *pLine)
{ {
Highlighted = false; Highlighted = false;
pLine = p; pLine = p;
// find line seperator and strip multiline // find line separator and strip multiline
while(*p) while(*p)
{ {
if(*p++ == '\n') if(*p++ == '\n')

View file

@ -67,7 +67,7 @@ void CItems::RenderProjectile(const CNetObj_Projectile *pCurrent, int ItemID)
float Ct = (PrevTick-pCurrent->m_StartTick)/(float)SERVER_TICK_SPEED + s_LastGameTickTime; float Ct = (PrevTick-pCurrent->m_StartTick)/(float)SERVER_TICK_SPEED + s_LastGameTickTime;
if(Ct < 0) if(Ct < 0)
return; // projectile havn't been shot yet return; // projectile haven't been shot yet
vec2 StartPos; vec2 StartPos;
vec2 StartVel; vec2 StartVel;

View file

@ -21,7 +21,7 @@ CMapImages::CMapImages()
void CMapImages::OnInit() void CMapImages::OnInit()
{ {
//TODO: improve this a bit -- with better fron sizes etc. //TODO: improve this a bit -- with better from sizes etc.
if(m_OverlayBottomTexture == -1) if(m_OverlayBottomTexture == -1)
{ {
void *pMem = calloc(1024 * 1024, 1); void *pMem = calloc(1024 * 1024, 1);

View file

@ -915,7 +915,7 @@ void CMapLayers::OnMapLoad()
QuadIDX = 2; QuadIDX = 2;
if(!Textured) if(!Textured)
{ {
// ignore the convertion for the position coordinates // ignore the conversion for the position coordinates
tmpQuads[i].m_aVertices[j].m_X = (q->m_aPoints[QuadIDX].x); tmpQuads[i].m_aVertices[j].m_X = (q->m_aPoints[QuadIDX].x);
tmpQuads[i].m_aVertices[j].m_Y = (q->m_aPoints[QuadIDX].y); tmpQuads[i].m_aVertices[j].m_Y = (q->m_aPoints[QuadIDX].y);
tmpQuads[i].m_aVertices[j].m_CenterX = (q->m_aPoints[4].x); tmpQuads[i].m_aVertices[j].m_CenterX = (q->m_aPoints[4].x);
@ -927,7 +927,7 @@ void CMapLayers::OnMapLoad()
} }
else else
{ {
// ignore the convertion for the position coordinates // ignore the conversion for the position coordinates
tmpQuadsTextured[i].m_aVertices[j].m_X = (q->m_aPoints[QuadIDX].x); tmpQuadsTextured[i].m_aVertices[j].m_X = (q->m_aPoints[QuadIDX].x);
tmpQuadsTextured[i].m_aVertices[j].m_Y = (q->m_aPoints[QuadIDX].y); tmpQuadsTextured[i].m_aVertices[j].m_Y = (q->m_aPoints[QuadIDX].y);
tmpQuadsTextured[i].m_aVertices[j].m_CenterX = (q->m_aPoints[4].x); tmpQuadsTextured[i].m_aVertices[j].m_CenterX = (q->m_aPoints[4].x);

View file

@ -780,7 +780,7 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
} }
else if(Button == 3) else if(Button == 3)
{ {
// middle click to reset (reenable all) // middle click to reset (re-enable all)
g_Config.m_BrFilterExcludeTypes[0] = '\0'; g_Config.m_BrFilterExcludeTypes[0] = '\0';
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET); ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
} }
@ -861,7 +861,7 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
} }
else if(Button == 3) else if(Button == 3)
{ {
// middle click to reset (reenable all) // middle click to reset (re-enable all)
g_Config.m_BrFilterExcludeCountries[0] = '\0'; g_Config.m_BrFilterExcludeCountries[0] = '\0';
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET); ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
} }

View file

@ -112,7 +112,7 @@ void CSounds::OnRender()
return; return;
} }
// set listner pos // set listener pos
Sound()->SetListenerPos(m_pClient->m_pCamera->m_Center.x, m_pClient->m_pCamera->m_Center.y); Sound()->SetListenerPos(m_pClient->m_pCamera->m_Center.x, m_pClient->m_pCamera->m_Center.y);
// update volume // update volume

View file

@ -66,7 +66,7 @@
CGameClient g_GameClient; CGameClient g_GameClient;
// instanciate all systems // instantiate all systems
static CKillMessages gs_KillMessages; static CKillMessages gs_KillMessages;
static CCamera gs_Camera; static CCamera gs_Camera;
static CChat gs_Chat; static CChat gs_Chat;

View file

@ -1043,7 +1043,7 @@ void CEditor::DoToolbar(CUIRect ToolBar)
// tile info button // tile info button
TB_Top.VSplitLeft(40.0f, &Button, &TB_Top); TB_Top.VSplitLeft(40.0f, &Button, &TB_Top);
static int s_TileInfoButton = 0; static int s_TileInfoButton = 0;
if(DoButton_Editor(&s_TileInfoButton, "Info", m_ShowTileInfo, &Button, 0, "[ctrl+i] Show tile informations") || if(DoButton_Editor(&s_TileInfoButton, "Info", m_ShowTileInfo, &Button, 0, "[ctrl+i] Show tile information") ||
(Input()->KeyPress(KEY_I) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL)))) (Input()->KeyPress(KEY_I) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL))))
{ {
m_ShowTileInfo = !m_ShowTileInfo; m_ShowTileInfo = !m_ShowTileInfo;

View file

@ -810,7 +810,7 @@ void CGameContext::ConInviteTeam(IConsole::IResult *pResult, void *pUserData)
if(!g_Config.m_SvInvite) if(!g_Config.m_SvInvite)
{ {
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Admin has diabled invites"); pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Admin has disabled invites");
return; return;
} }

View file

@ -88,7 +88,7 @@ public:
/* /*
Function: destroy Function: destroy
Destorys the entity. Destroys the entity.
*/ */
virtual void Destroy() { delete this; } virtual void Destroy() { delete this; }

View file

@ -2054,7 +2054,7 @@ void CGameContext::ConTuneResetZone(IConsole::IResult *pResult, void *pUserData)
{ {
pSelf->TuningList()[List] = TuningParams; pSelf->TuningList()[List] = TuningParams;
char aBuf[256]; char aBuf[256];
str_format(aBuf, sizeof(aBuf), "Tunezone %d resetted", List); str_format(aBuf, sizeof(aBuf), "Tunezone %d reset", List);
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tuning", aBuf); pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tuning", aBuf);
pSelf->SendTuningParams(-1, List); pSelf->SendTuningParams(-1, List);
} }
@ -2066,7 +2066,7 @@ void CGameContext::ConTuneResetZone(IConsole::IResult *pResult, void *pUserData)
*(pSelf->TuningList()+i) = TuningParams; *(pSelf->TuningList()+i) = TuningParams;
pSelf->SendTuningParams(-1, i); pSelf->SendTuningParams(-1, i);
} }
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tuning", "All Tunezones resetted"); pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tuning", "All Tunezones reset");
} }
} }

View file

@ -741,7 +741,7 @@ bool CSqlScore::ShowRankThread(CSqlServer* pSqlServer, const CSqlData *pGameData
try try
{ {
// check sort methode // check sort method
char aBuf[600]; char aBuf[600];
pSqlServer->executeSql("SET @prev := NULL;"); pSqlServer->executeSql("SET @prev := NULL;");
@ -811,7 +811,7 @@ bool CSqlScore::ShowTeamRankThread(CSqlServer* pSqlServer, const CSqlData *pGame
try try
{ {
// check sort methode // check sort method
char aBuf[2400]; char aBuf[2400];
char aNames[2300]; char aNames[2300];
aNames[0] = '\0'; aNames[0] = '\0';
@ -900,7 +900,7 @@ bool CSqlScore::ShowTop5Thread(CSqlServer* pSqlServer, const CSqlData *pGameData
try try
{ {
// check sort methode // check sort method
char aBuf[512]; char aBuf[512];
pSqlServer->executeSql("SET @prev := NULL;"); pSqlServer->executeSql("SET @prev := NULL;");
pSqlServer->executeSql("SET @rank := 1;"); pSqlServer->executeSql("SET @rank := 1;");
@ -961,7 +961,7 @@ bool CSqlScore::ShowTeamTop5Thread(CSqlServer* pSqlServer, const CSqlData *pGame
try try
{ {
// check sort methode // check sort method
char aBuf[2400]; char aBuf[2400];
pSqlServer->executeSql("SET @prev := NULL;"); pSqlServer->executeSql("SET @prev := NULL;");