From 1620fc9b0f4463c3743de6e79eed2838ea5944a5 Mon Sep 17 00:00:00 2001 From: yangfl Date: Sun, 4 Feb 2018 23:00:47 +0800 Subject: [PATCH] Fix typo --- autoexec_server.cfg | 4 ++-- cmake/FindSDL2.cmake | 2 +- datasrc/network.py | 6 ++--- scripts/AndroidAppSettings.cfg | 2 +- scripts/refactor_count.py | 2 +- src/base/system.h | 28 +++++++++++------------ src/engine/client/backend_sdl.cpp | 12 +++++----- src/engine/client/client.cpp | 2 +- src/engine/client/client.h | 2 +- src/engine/client/graphics_threaded.cpp | 6 ++--- src/engine/client/graphics_threaded.h | 4 ++-- src/engine/client/serverbrowser.cpp | 2 +- src/engine/client/sound.cpp | 2 +- src/engine/docs/prediction.txt | 2 +- src/engine/graphics.h | 2 +- src/engine/shared/config_variables.h | 4 ++-- src/engine/shared/datafile.cpp | 4 ++-- src/engine/shared/memheap.cpp | 2 +- src/engine/shared/network_conn.cpp | 4 ++-- src/engine/shared/protocol.h | 2 +- src/game/client/components/maplayers.cpp | 26 ++++++++++----------- src/game/client/components/nameplates.cpp | 2 +- src/game/client/components/particles.cpp | 2 +- src/game/client/components/players.cpp | 2 +- src/game/client/components/scoreboard.cpp | 4 ++-- src/game/client/gameclient.cpp | 4 ++-- src/game/client/render_map.cpp | 2 +- src/game/editor/editor.cpp | 4 ++-- src/game/editor/editor.h | 2 +- src/game/editor/io.cpp | 2 +- src/game/editor/layer_tiles.cpp | 4 ++-- src/game/editor/popups.cpp | 4 ++-- src/game/server/entities/character.cpp | 2 +- src/game/server/gamecontroller.cpp | 2 +- src/game/server/gamecontroller.h | 2 +- src/game/server/player.cpp | 2 +- src/game/server/teams.h | 2 +- src/game/variables.h | 2 +- src/tools/crapnet.cpp | 2 +- 39 files changed, 83 insertions(+), 83 deletions(-) diff --git a/autoexec_server.cfg b/autoexec_server.cfg index fac34990c..2f9a51e3b 100644 --- a/autoexec_server.cfg +++ b/autoexec_server.cfg @@ -67,7 +67,7 @@ sv_pauseable 0 # Allow /rescue (also /r) command so players can teleport themselves out of freeze sv_rescue 1 -# Number of seconds inbetween two rescues +# Number of seconds between two rescues sv_rescue_delay 5 # Enable ranks after rcon cheats have been used @@ -87,7 +87,7 @@ sv_announcement_filename "announcement.txt" # Number of minutes before next announcement will be displayed (from the announcement file) sv_announcement_interval 120 -# Whether announcements will be displayed in their order or choosen randomly +# Whether announcements will be displayed in their order or chosen randomly sv_announcement_random 1 # Message of the day to display when joining the server (use "\n" to create new line) diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake index 3b7a2b28f..6c5bf0880 100644 --- a/cmake/FindSDL2.cmake +++ b/cmake/FindSDL2.cmake @@ -12,7 +12,7 @@ find_library(SDL2_LIBRARY ) set(CMAKE_FIND_FRAMEWORK FIRST) set_extra_dirs_include(SDL2 sdl "${SDL2_LIBRARY}") -# Looking for 'SDL.h' directly might accidently find a SDL instead of SDL 2 +# Looking for 'SDL.h' directly might accidentally find a SDL instead of SDL 2 # installation. Look for a header file only present in SDL 2 instead. find_path(SDL2_INCLUDEDIR SDL_assert.h PATH_SUFFIXES SDL2 diff --git a/datasrc/network.py b/datasrc/network.py index 0bb46bc7b..95906c468 100644 --- a/datasrc/network.py +++ b/datasrc/network.py @@ -165,16 +165,16 @@ Objects = [ ]), NetObject("ClientInfo", [ - # 4*4 = 16 charachters + # 4*4 = 16 characters NetIntAny("m_Name0"), NetIntAny("m_Name1"), NetIntAny("m_Name2"), NetIntAny("m_Name3"), - # 4*3 = 12 charachters + # 4*3 = 12 characters NetIntAny("m_Clan0"), NetIntAny("m_Clan1"), NetIntAny("m_Clan2"), NetIntAny("m_Country"), - # 4*6 = 24 charachters + # 4*6 = 24 characters NetIntAny("m_Skin0"), NetIntAny("m_Skin1"), NetIntAny("m_Skin2"), NetIntAny("m_Skin3"), NetIntAny("m_Skin4"), NetIntAny("m_Skin5"), diff --git a/scripts/AndroidAppSettings.cfg b/scripts/AndroidAppSettings.cfg index 1c3b34cbc..b62fa3c04 100644 --- a/scripts/AndroidAppSettings.cfg +++ b/scripts/AndroidAppSettings.cfg @@ -82,7 +82,7 @@ CompatibilityHacksPreventAudioChopping=n # Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n) CompatibilityHacksAppIgnoresAudioBufferSize=n -# Hack for VCMI: preload additional shared libraries before aplication start +# Hack for VCMI: preload additional shared libraries before application start CompatibilityHacksAdditionalPreloadedSharedLibraries="" # Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue - diff --git a/scripts/refactor_count.py b/scripts/refactor_count.py index 8fdec46e9..41dc7c2a6 100644 --- a/scripts/refactor_count.py +++ b/scripts/refactor_count.py @@ -62,7 +62,7 @@ class FilenameExtentionChecker(Checker): def CheckStart(self, checker, filename): ext = os.path.splitext(filename)[1] if not ext in self.allowed: - checker.Error("file extention '%s' is not allowed" % ext) + checker.Error("file extension '%s' is not allowed" % ext) class IncludeChecker(Checker): def __init__(self): diff --git a/src/base/system.h b/src/base/system.h index ad3cbf360..18fef446e 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -300,7 +300,7 @@ int io_seek(IOHANDLE io, int offset, int origin); io - Handle to the file. Returns: - Returns the current position. -1L if an error occured. + Returns the current position. -1L if an error occurred. */ long int io_tell(IOHANDLE io); @@ -312,7 +312,7 @@ long int io_tell(IOHANDLE io); io - Handle to the file. Returns: - Returns the total size. -1L if an error occured. + Returns the total size. -1L if an error occurred. */ long int io_length(IOHANDLE io); @@ -342,7 +342,7 @@ int io_flush(IOHANDLE io); /* Function: io_error - Checks whether an error occured during I/O with the file. + Checks whether an error occurred during I/O with the file. Parameters: io - Handle to the file. @@ -454,7 +454,7 @@ void aio_write_newline_unlocked(ASYNCIO *aio); /* Function: aio_error - Checks whether errors have occured during the asynchronous + Checks whether errors have occurred during the asynchronous writing. Call this function regularly to see if there are errors. Call @@ -465,7 +465,7 @@ void aio_write_newline_unlocked(ASYNCIO *aio); aio - Handle to the file. Returns: - Returns 0 if no error occured, and nonzero on error. + Returns 0 if no error occurred, and nonzero on error. */ int aio_error(ASYNCIO *aio); @@ -669,7 +669,7 @@ int net_init(); /* Function: net_host_lookup Does a hostname lookup by name and fills out the passed - NETADDR struct with the recieved details. + NETADDR struct with the received details. Returns: 0 on success. @@ -693,7 +693,7 @@ int net_addr_comp(const NETADDR *a, const NETADDR *b); /* Function: net_addr_str - Turns a network address into a representive string. + Turns a network address into a representative string. Parameters: addr - Address to turn into a string. @@ -762,7 +762,7 @@ int net_udp_send(NETSOCKET sock, const NETADDR *addr, const void *data, int size maxsize - Maximum size to recive. Returns: - On success it returns the number of bytes recived. Returns -1 + On success it returns the number of bytes received. Returns -1 on error. */ int net_udp_recv(NETSOCKET sock, NETADDR *addr, void *data, int maxsize); @@ -800,7 +800,7 @@ NETSOCKET net_tcp_create(NETADDR bindaddr); Parameters: sock - Socket to start listen to. - backlog - Size of the queue of incomming connections to keep. + backlog - Size of the queue of incoming connections to keep. Returns: Returns 0 on success. @@ -938,7 +938,7 @@ void net_unix_close(UNIXSOCKET sock); Remarks: - The strings are treated as zero-termineted strings. - - Garantees that dst string will contain zero-termination. + - Guarantees that dst string will contain zero-termination. */ void str_append(char *dst, const char *src, int dst_size); @@ -953,7 +953,7 @@ void str_append(char *dst, const char *src, int dst_size); Remarks: - The strings are treated as zero-termineted strings. - - Garantees that dst string will contain zero-termination. + - Guarantees that dst string will contain zero-termination. */ void str_copy(char *dst, const char *src, int dst_size); @@ -974,7 +974,7 @@ int str_length(const char *str); Performs printf formating into a buffer. Parameters: - buffer - Pointer to the buffer to recive the formated string. + buffer - Pointer to the buffer to recive the formatted string. buffer_size - Size of the buffer. format - printf formating string. ... - Parameters for the formating. @@ -985,7 +985,7 @@ int str_length(const char *str); Remarks: - See the C manual for syntax for the printf formating string. - The strings are treated as zero-termineted strings. - - Garantees that dst string will contain zero-termination. + - Guarantees that dst string will contain zero-termination. */ int str_format(char *buffer, int buffer_size, const char *format, ...) GNUC_ATTRIBUTE((format(printf, 3, 4))); @@ -1568,7 +1568,7 @@ int str_utf8_forward(const char *str, int cursor); Remarks: - This function will also move the pointer forward. - - You may call this function again after an error occured. + - You may call this function again after an error occurred. */ int str_utf8_decode(const char **ptr); diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 2812d31d5..779072be0 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -486,7 +486,7 @@ void CCommandProcessorFragment_OpenGL3_3::SetState(const CCommandBuffer::SState switch(State.m_BlendMode) { case CCommandBuffer::BLEND_NONE: - //we don't really need this anymore + // We don't really need this anymore //glDisable(GL_BLEND); break; case CCommandBuffer::BLEND_ALPHA: @@ -513,7 +513,7 @@ void CCommandProcessorFragment_OpenGL3_3::SetState(const CCommandBuffer::SState } else if(m_LastClipEnable) { - //dont disable it always + // Don't disable it always glDisable(GL_SCISSOR_TEST); m_LastClipEnable = false; } @@ -901,7 +901,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Create(const CCommandBuffe switch(StoreOglformat) { case GL_RGB: StoreOglformat = GL_COMPRESSED_RGB; break; - //this needs further checks. it seems on some gpus COMPRESSED_ALPHA isnt in the core profile + // This needs further checks. it seems on some gpus COMPRESSED_ALPHA isn't in the core profile case GL_RED: StoreOglformat = GL_COMPRESSED_RGBA; break; case GL_RGBA: StoreOglformat = GL_COMPRESSED_RGBA; break; default: StoreOglformat = GL_COMPRESSED_RGBA; @@ -952,7 +952,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Create(const CCommandBuffe glGenerateMipmap(GL_TEXTURE_2D); } - //this is the initial value for the wrap modes + // This is the initial value for the wrap modes m_aTextures[pCommand->m_Slot].m_LastWrapMode = CCommandBuffer::WRAP_REPEAT; // calculate memory usage @@ -1002,7 +1002,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Render(const CCommandBuffer::SComm glBufferData(GL_ARRAY_BUFFER, sizeof(CCommandBuffer::SVertex) * Count, (char*)pCommand->m_pVertices, GL_STREAM_DRAW); 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 dependend) void *pData = glMapBufferRange(GL_ARRAY_BUFFER, 0, sizeof(CCommandBuffer::SVertex) * Count, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT); mem_copy(pData, pCommand->m_pVertices, sizeof(CCommandBuffer::SVertex) * Count); @@ -1014,7 +1014,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Render(const CCommandBuffer::SComm switch(pCommand->m_PrimType) { - //we dont support GL_QUADS due to core profile + // We don't support GL_QUADS due to core profile case CCommandBuffer::PRIMTYPE_LINES: glDrawArrays(GL_LINES, 0, pCommand->m_PrimCount*2); break; diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 039df5347..cc45af6b2 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -530,7 +530,7 @@ const char *CClient::LatestVersion() return m_aVersionStr; } -// TODO: OPT: do this alot smarter! +// TODO: OPT: do this a lot smarter! int *CClient::GetInput(int Tick) { int Best = -1; diff --git a/src/engine/client/client.h b/src/engine/client/client.h index 4ed9cfc30..35ed7782c 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -239,7 +239,7 @@ public: void DirectInput(int *pInput, int Size); void SendInput(); - // TODO: OPT: do this alot smarter! + // TODO: OPT: do this a lot smarter! virtual int *GetInput(int Tick); virtual bool InputExists(int Tick); diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp index 8013119ad..4ffd5cfde 100644 --- a/src/engine/client/graphics_threaded.cpp +++ b/src/engine/client/graphics_threaded.cpp @@ -937,7 +937,7 @@ void CGraphics_Threaded::DrawVisualObject(int VisualObjectIDX, float *pColor, ch void CGraphics_Threaded::DrawBorderTile(int VisualObjectIDX, float *pColor, char *pOffset, float *Offset, float *Dir, int JumpIndex, unsigned int DrawNum) { if(DrawNum == 0) return; - //draw a border tile alot of times + // Draw a border tile a lot of times CCommandBuffer::SCommand_RenderBorderTile Cmd; Cmd.m_State = m_State; Cmd.m_DrawNum = DrawNum; @@ -977,7 +977,7 @@ void CGraphics_Threaded::DrawBorderTile(int VisualObjectIDX, float *pColor, char void CGraphics_Threaded::DrawBorderTileLine(int VisualObjectIDX, float *pColor, char *pOffset, float *Dir, unsigned int IndexDrawNum, unsigned int RedrawNum) { if(IndexDrawNum == 0 || RedrawNum == 0) return; - //draw a border tile alot of times + // Draw a border tile a lot of times CCommandBuffer::SCommand_RenderBorderTileLine Cmd; Cmd.m_State = m_State; Cmd.m_IndexDrawNum = IndexDrawNum; @@ -1446,7 +1446,7 @@ bool CGraphics_Threaded::SetVSync(bool State) return RetOk; } -// syncronization +// synchronization void CGraphics_Threaded::InsertSignal(semaphore *pSemaphore) { CCommandBuffer::SCommand_Signal Cmd; diff --git a/src/engine/client/graphics_threaded.h b/src/engine/client/graphics_threaded.h index 7d05a31d5..4272d23ba 100644 --- a/src/engine/client/graphics_threaded.h +++ b/src/engine/client/graphics_threaded.h @@ -70,7 +70,7 @@ public: // CMD_RUNBUFFER, - // syncronization + // synchronization CMD_SIGNAL, // texture commands @@ -598,7 +598,7 @@ public: virtual int GetDesktopScreenWidth() { return m_DesktopScreenWidth; } virtual int GetDesktopScreenHeight() { return m_DesktopScreenHeight; } - // syncronization + // synchronization virtual void InsertSignal(semaphore *pSemaphore); virtual bool IsIdle(); virtual void WaitForIdle(); diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp index 22e30a4c5..7fcc2e646 100644 --- a/src/engine/client/serverbrowser.cpp +++ b/src/engine/client/serverbrowser.cpp @@ -416,7 +416,7 @@ void CServerBrowser::SetInfo(CServerEntry *pEntry, const CServerInfo &Info) pEntry->m_Info.m_Favorite = Fav; pEntry->m_Info.m_NetAddr = pEntry->m_Addr; - // all these are just for nice compability + // all these are just for nice compatibility if(pEntry->m_Info.m_aGameType[0] == '0' && pEntry->m_Info.m_aGameType[1] == 0) str_copy(pEntry->m_Info.m_aGameType, "DM", sizeof(pEntry->m_Info.m_aGameType)); else if(pEntry->m_Info.m_aGameType[0] == '1' && pEntry->m_Info.m_aGameType[1] == 0) diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp index cc5b9dd97..307d1c46e 100644 --- a/src/engine/client/sound.cpp +++ b/src/engine/client/sound.cpp @@ -106,7 +106,7 @@ static void Mix(short *pFinalOut, unsigned Frames) mem_zero(m_pMixBuffer, m_MaxFrames*2*sizeof(int)); Frames = min(Frames, m_MaxFrames); - // aquire lock while we are mixing + // acquire lock while we are mixing lock_wait(m_SoundLock); MasterVol = m_SoundVolume; diff --git a/src/engine/docs/prediction.txt b/src/engine/docs/prediction.txt index e740b1e8f..e84db7328 100644 --- a/src/engine/docs/prediction.txt +++ b/src/engine/docs/prediction.txt @@ -1,6 +1,6 @@ Title: Prediction -The engine calls when reprediction is required. This happens usally when new data has arrived from the server. should to prediction from the current snapshot and current snapshot tick ( + 1) upto and including the tick returned by . +The engine calls when reprediction is required. This happens usually when new data has arrived from the server. should to prediction from the current snapshot and current snapshot tick ( + 1) up to and including the tick returned by . Predicted input sent to the server can be retrived by calling with the corresponding tick that you want the input for. Here is a simple example of how it might look. diff --git a/src/engine/graphics.h b/src/engine/graphics.h index 539855cf2..0724a85ec 100644 --- a/src/engine/graphics.h +++ b/src/engine/graphics.h @@ -157,7 +157,7 @@ public: virtual void Swap() = 0; virtual int GetNumScreens() const = 0; - // syncronization + // synchronization virtual void InsertSignal(class semaphore *pSemaphore) = 0; virtual bool IsIdle() = 0; virtual void WaitForIdle() = 0; diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index 0f360002c..08c45b4dd 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -358,8 +358,8 @@ MACRO_CONFIG_INT(SvSpamMuteDuration, sv_spam_mute_duration, 60, 0, 3600 , CFGFLA MACRO_CONFIG_INT(SvEvents, sv_events, 1, 0, 1, CFGFLAG_SERVER, "Enable triggering of server events, like the happy eyeemotes on some holidays.") MACRO_CONFIG_INT(SvRankCheats, sv_rank_cheats, 0, 0, 1, CFGFLAG_SERVER, "Enable ranks after cheats have been used (file based server only)") -MACRO_CONFIG_INT(SvShutdownWhenEmpty, sv_shutdown_when_empty, 0, 0, 1, CFGFLAG_SERVER, "Shutdown server as soon as noone is on it anymore") -MACRO_CONFIG_INT(SvReloadWhenEmpty, sv_reload_when_empty, 0, 0, 2, CFGFLAG_SERVER, "Reload map when server is empty (1 = reload once, 2 = reload everytime server gets empty)") +MACRO_CONFIG_INT(SvShutdownWhenEmpty, sv_shutdown_when_empty, 0, 0, 1, CFGFLAG_SERVER, "Shutdown server as soon as no one is on it anymore") +MACRO_CONFIG_INT(SvReloadWhenEmpty, sv_reload_when_empty, 0, 0, 2, CFGFLAG_SERVER, "Reload map when server is empty (1 = reload once, 2 = reload every time server gets empty)") MACRO_CONFIG_INT(SvKillProtection, sv_kill_protection, 20, 0, 9999, CFGFLAG_SERVER, "0 - Disable, 1-9999 minutes") MACRO_CONFIG_INT(SvSoloServer, sv_solo_server, 0, 0, 1, CFGFLAG_SERVER|CFGFLAG_GAME, "Set server to solo mode (no player interactions, has to be set before loading the map)") MACRO_CONFIG_STR(SvClientSuggestion, sv_client_suggestion, 128, "Get DDNet client from DDNet.tw to use all features on DDNet!", CFGFLAG_SERVER, "Broadcast to display to players without DDNet client") diff --git a/src/engine/shared/datafile.cpp b/src/engine/shared/datafile.cpp index b4659a10e..0ab388163 100644 --- a/src/engine/shared/datafile.cpp +++ b/src/engine/shared/datafile.cpp @@ -130,7 +130,7 @@ bool CDataFileReader::Open(class IStorage *pStorage, const char *pFilename, int Size += Header.m_NumItemTypes*sizeof(CDatafileItemType); Size += (Header.m_NumItems+Header.m_NumRawData)*sizeof(int); if(Header.m_Version == 4) - Size += Header.m_NumRawData*sizeof(int); // v4 has uncompressed data sizes aswell + Size += Header.m_NumRawData*sizeof(int); // v4 has uncompressed data sizes as well Size += Header.m_ItemSize; unsigned AllocSize = Size; @@ -369,7 +369,7 @@ void *CDataFileReader::GetItem(int Index, int *pType, int *pID) CDatafileItem *i = (CDatafileItem *)(m_pDataFile->m_Info.m_pItemStart+m_pDataFile->m_Info.m_pItemOffsets[Index]); if(pType) - *pType = (i->m_TypeAndID>>16)&0xffff; // remove sign extention + *pType = (i->m_TypeAndID>>16)&0xffff; // remove sign extension if(pID) *pID = i->m_TypeAndID&0xffff; return (void *)(i+1); diff --git a/src/engine/shared/memheap.cpp b/src/engine/shared/memheap.cpp index dd5598440..2e34490c8 100644 --- a/src/engine/shared/memheap.cpp +++ b/src/engine/shared/memheap.cpp @@ -14,7 +14,7 @@ void CHeap::NewChunk() if(!pMem) return; - // the chunk structure is located in the begining of the chunk + // the chunk structure is located in the beginning of the chunk // init it and return the chunk pChunk = (CChunk*)pMem; pChunk->m_pMemory = (char*)(pChunk+1); diff --git a/src/engine/shared/network_conn.cpp b/src/engine/shared/network_conn.cpp index ae9b90700..780982295 100644 --- a/src/engine/shared/network_conn.cpp +++ b/src/engine/shared/network_conn.cpp @@ -128,7 +128,7 @@ int CNetConnection::QueueChunkEx(int Flags, int DataSize, const void *pData, int m_Construct.m_NumChunks++; m_Construct.m_DataSize = (int)(pChunkData-m_Construct.m_aChunkData); - // set packet flags aswell + // set packet flags as well if(Flags&NET_CHUNKFLAG_VITAL && !(Flags&NET_CHUNKFLAG_RESEND)) { @@ -443,7 +443,7 @@ int CNetConnection::Update() } } - // send keep alives if nothing has happend for 250ms + // send keep alives if nothing has happened for 250ms if(State() == NET_CONNSTATE_ONLINE) { if(time_get()-m_LastSendTime > time_freq()/2) // flush connection after 500ms if needed diff --git a/src/engine/shared/protocol.h b/src/engine/shared/protocol.h index 5841d6e7f..71057f6bc 100644 --- a/src/engine/shared/protocol.h +++ b/src/engine/shared/protocol.h @@ -16,7 +16,7 @@ Client -> READY -> Server The client has loaded the map and is ready to go, - but the mod needs to send it's information aswell. + but the mod needs to send it's information as well. modc_connected is called on the client and mods_connected is called on the server. The client should call client_entergame when the diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index 31b3cabb2..7d74419d0 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -527,7 +527,7 @@ void CMapLayers::OnMapLoad() int CurOverlay = 0; while(CurOverlay < OverlayCount + 1) { - //we can later just count the tile layers to get the idx in the vector + // We can later just count the tile layers to get the idx in the vector m_TileLayerVisuals.push_back(new STileLayerVisuals()); STileLayerVisuals& Visuals = *m_TileLayerVisuals.back(); Visuals.Init(pTMap->m_Width, pTMap->m_Height); @@ -888,7 +888,7 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem if(BorderX0 < 0) { - //draw corners on left side + // Draw corners on left side if(BorderY0 < 0) { if(Visuals.m_BorderTopLeft.DoDraw()) @@ -900,7 +900,7 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem Dir.x = 32.f; Dir.y = 32.f; - int Count = (absolute(BorderX0)+1) * (absolute(BorderY0)+1) - 1;//dont draw the corner again + int Count = (absolute(BorderX0)+1) * (absolute(BorderY0)+1) - 1; // Don't draw the corner again Graphics()->DrawBorderTile(Visuals.m_VisualObjectsIndex, (float*)pColor, (offset_ptr_size)Visuals.m_BorderTopLeft.IndexBufferByteOffset(), (float*)&Offset, (float*)&Dir, absolute(BorderX0)+1, Count); } @@ -916,12 +916,12 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem Dir.x = 32.f; Dir.y = -32.f; - int Count = (absolute(BorderX0)+1) * ((BorderY1-pTileLayer->m_Height)+1) - 1;//dont draw the corner again + int Count = (absolute(BorderX0)+1) * ((BorderY1-pTileLayer->m_Height)+1) - 1; // Don't draw the corner again Graphics()->DrawBorderTile(Visuals.m_VisualObjectsIndex, (float*)pColor, (offset_ptr_size)Visuals.m_BorderBottomLeft.IndexBufferByteOffset(), (float*)&Offset, (float*)&Dir, absolute(BorderX0)+1, Count); } } - //draw left border + // Draw left border if(Y0 < pTileLayer->m_Height - 1 && Y1 > 0) { unsigned int DrawNum = ((Visuals.m_BorderLeft[Y1-1].IndexBufferByteOffset() - Visuals.m_BorderLeft[Y0-1].IndexBufferByteOffset()) / sizeof(unsigned int)) + (Visuals.m_BorderLeft[Y1-1].DoDraw() ? 6lu : 0lu); @@ -935,7 +935,7 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem if(BorderX1 >= pTileLayer->m_Width) { - //draw corners on right side + // Draw corners on right side if(BorderY0 < 0) { if(Visuals.m_BorderTopRight.DoDraw()) @@ -947,7 +947,7 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem Dir.x = -32.f; Dir.y = 32.f; - int Count = (BorderX1-pTileLayer->m_Width+1) * (absolute(BorderY0)+1) - 1;//dont draw the corner again + int Count = (BorderX1-pTileLayer->m_Width+1) * (absolute(BorderY0)+1) - 1; // Don't draw the corner again Graphics()->DrawBorderTile(Visuals.m_VisualObjectsIndex, (float*)pColor, (offset_ptr_size)Visuals.m_BorderTopRight.IndexBufferByteOffset(), (float*)&Offset, (float*)&Dir, (BorderX1-pTileLayer->m_Width)+1, Count); } @@ -963,12 +963,12 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem Dir.x = -32.f; Dir.y = -32.f; - int Count = (BorderX1-pTileLayer->m_Width+1) * ((BorderY1-pTileLayer->m_Height)+1) - 1;//dont draw the corner again + int Count = (BorderX1-pTileLayer->m_Width+1) * ((BorderY1-pTileLayer->m_Height)+1) - 1; // Don't draw the corner again Graphics()->DrawBorderTile(Visuals.m_VisualObjectsIndex, (float*)pColor, (offset_ptr_size)Visuals.m_BorderBottomRight.IndexBufferByteOffset(), (float*)&Offset, (float*)&Dir, (BorderX1-pTileLayer->m_Width)+1, Count); } } - //draw right border + // Draw right border if(Y0 < pTileLayer->m_Height - 1 && Y1 > 0) { unsigned int DrawNum = ((Visuals.m_BorderRight[Y1-1].IndexBufferByteOffset() - Visuals.m_BorderRight[Y0-1].IndexBufferByteOffset()) / sizeof(unsigned int)) + (Visuals.m_BorderRight[Y1-1].DoDraw() ? 6lu : 0lu);; @@ -981,7 +981,7 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem } if(BorderY0 < 0) { - //draw top border + // Draw top border if(X0 < pTileLayer->m_Width - 1 && X1 > 0) { unsigned int DrawNum = ((Visuals.m_BorderTop[X1-1].IndexBufferByteOffset() - Visuals.m_BorderTop[X0-1].IndexBufferByteOffset()) / sizeof(unsigned int)) + (Visuals.m_BorderTop[X1-1].DoDraw() ? 6lu : 0lu);; @@ -994,7 +994,7 @@ void CMapLayers::DrawTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerTilem } if(BorderY1 >= pTileLayer->m_Height) { - //draw bottom border + // Draw bottom border if(X0 < pTileLayer->m_Width - 1 && X1 > 0) { unsigned int DrawNum = ((Visuals.m_BorderBottom[X1-1].IndexBufferByteOffset() - Visuals.m_BorderBottom[X0-1].IndexBufferByteOffset()) / sizeof(unsigned int)) + (Visuals.m_BorderBottom[X1-1].DoDraw() ? 6lu : 0lu);; @@ -1041,7 +1041,7 @@ void CMapLayers::DrawKillTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerT if(BorderX0 >= pTileLayer->m_Width + 300) BorderX0 = pTileLayer->m_Width + 299; if(BorderY0 >= pTileLayer->m_Height + 300) BorderY0 = pTileLayer->m_Height + 299; - //draw left kill tile border + // Draw left kill tile border if(BorderX0 < -201) { vec2 Offset; @@ -1055,7 +1055,7 @@ void CMapLayers::DrawKillTileBorder(int LayerIndex, vec4* pColor, CMapItemLayerT Graphics()->DrawBorderTile(Visuals.m_VisualObjectsIndex, (float*)pColor, (offset_ptr_size)Visuals.m_BorderKillTile.IndexBufferByteOffset(), (float*)&Offset, (float*)&Dir, (absolute(BorderX0) - 201), Count); } - //draw top kill tile border + // Draw top kill tile border if(BorderY0 < -201) { vec2 Offset; diff --git a/src/game/client/components/nameplates.cpp b/src/game/client/components/nameplates.cpp index d41bd9f27..d76d36924 100644 --- a/src/game/client/components/nameplates.cpp +++ b/src/game/client/components/nameplates.cpp @@ -72,7 +72,7 @@ void CNamePlates::RenderNameplate( TextRender()->Text(0, Position.x-tw_clan/2.0f, Position.y-FontSize-FontSizeClan-38.0f, FontSizeClan, pClan, -1); } - if(g_Config.m_Debug) // render client id when in debug aswell + if(g_Config.m_Debug) // render client id when in debug as well { char aBuf[128]; str_format(aBuf, sizeof(aBuf),"%d", pPlayerInfo->m_ClientID); diff --git a/src/game/client/components/particles.cpp b/src/game/client/components/particles.cpp index 3d5611941..ee493f3fe 100644 --- a/src/game/client/components/particles.cpp +++ b/src/game/client/components/particles.cpp @@ -77,7 +77,7 @@ void CParticles::Update(float TimePassed) static float FrictionFraction = 0; FrictionFraction += TimePassed; - if(FrictionFraction > 2.0f) // safty messure + if(FrictionFraction > 2.0f) // safety messure FrictionFraction = 0; int FrictionCount = 0; diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index 7e61d58c5..b030d08e0 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -944,7 +944,7 @@ void CPlayers::RenderPlayer( TextRender()->Text(0, Position.x-tw_clan/2.0f, Position.y-FontSize-FontSizeClan-38.0f, FontSizeClan, pClan, -1); } - if(g_Config.m_Debug) // render client id when in debug aswell + if(g_Config.m_Debug) // render client id when in debug as well { char aBuf[128]; str_format(aBuf, sizeof(aBuf),"%d", ClientID); diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp index 6a19488e4..dbdbf8312 100644 --- a/src/game/client/components/scoreboard.cpp +++ b/src/game/client/components/scoreboard.cpp @@ -549,7 +549,7 @@ void CScoreboard::OnRender() if(!Active()) return; - // if the score board is active, then we should clear the motd message aswell + // if the score board is active, then we should clear the motd message as well if(m_pClient->m_pMotd->IsActive()) m_pClient->m_pMotd->Clear(); @@ -623,7 +623,7 @@ void CScoreboard::OnRender() bool CScoreboard::Active() { - // if statboard is active dont show scoreboard + // if statboard is active don't show scoreboard if(m_pClient->m_pStatboard->IsActive()) return false; diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index ddcf2ee2a..44093c593 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -481,7 +481,7 @@ void CGameClient::OnConnected() m_ServerMode = SERVERMODE_PURE; - // send the inital info + // send the initial info SendInfo(true); // we should keep this in for now, because otherwise you can't spectate // people at start as the other info 64 packet is only sent after the first @@ -1271,7 +1271,7 @@ void CGameClient::OnNewSnapshot() // } //} - // sort player infos by DDRace Team (and score inbetween) + // sort player infos by DDRace Team (and score between) Index = 0; for(int Team = 0; Team <= MAX_CLIENTS; ++Team) { diff --git a/src/game/client/render_map.cpp b/src/game/client/render_map.cpp index 6a2af81b3..e0b7984bc 100644 --- a/src/game/client/render_map.cpp +++ b/src/game/client/render_map.cpp @@ -611,7 +611,7 @@ void CRenderTools::RenderTuneOverlay(CTuneTile *pTune, int w, int h, float Scale char aBuf[16]; str_format(aBuf, sizeof(aBuf), "%d", Index); UI()->TextRender()->TextColor(1.0f, 1.0f, 1.0f, Alpha); - UI()->TextRender()->Text(0, mx*Scale+11.f, my*Scale+6.f, Scale/1.5f-5.f, aBuf, -1); // numbers shouldnt be too big and in the center of the tile + UI()->TextRender()->Text(0, mx*Scale+11.f, my*Scale+6.f, Scale/1.5f-5.f, aBuf, -1); // numbers shouldn't be too big and in the center of the tile UI()->TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); } } diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 7ab80b82f..fb8ba386b 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -4138,7 +4138,7 @@ void CEditor::RenderModebar(CUIRect View) else if(m_Mode == MODE_SOUNDS) pButName = "Sounds"; - int MouseButton = DoButton_Tab(&s_Button, pButName, 0, &Button, 0, "Switch between images, sounds and layers managment."); + int MouseButton = DoButton_Tab(&s_Button, pButName, 0, &Button, 0, "Switch between images, sounds and layers management."); if(MouseButton == 2) { if (m_Mode == MODE_LAYERS) @@ -4726,7 +4726,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) m_ShowEnvelopePreview = 1; ColorMod = 100.0f; Graphics()->SetColor(1,0.75f,0.75f,1); - m_pTooltip = "Left mouse to drag. Hold ctrl to be more precise. Hold shift to alter time point aswell. Right click to delete."; + m_pTooltip = "Left mouse to drag. Hold ctrl to be more precise. Hold shift to alter time point as well. Right click to delete."; } if(pID == s_pID && (Input()->KeyIsPressed(KEY_RETURN) || Input()->KeyIsPressed(KEY_KP_ENTER))) diff --git a/src/game/editor/editor.h b/src/game/editor/editor.h index f8a384077..a5041a2b1 100644 --- a/src/game/editor/editor.h +++ b/src/game/editor/editor.h @@ -213,7 +213,7 @@ public: return m_lLayers.size() == 0; // stupid function, since its bad for Fillselection: TODO add a function for Fillselection that returns whether a specific tile is used in the given layer } - /*bool IsUsedInThisLayer(int Layer, int Index) // <--------- this is what i meant but cause i dont know which Indexes belongs to which layers i cant finish yet + /*bool IsUsedInThisLayer(int Layer, int Index) // <--------- this is what i meant but cause i don't know which Indexes belongs to which layers i can't finish yet { switch Layer { diff --git a/src/game/editor/io.cpp b/src/game/editor/io.cpp index d302e8f59..419c03912 100644 --- a/src/game/editor/io.cpp +++ b/src/game/editor/io.cpp @@ -15,7 +15,7 @@ template static int MakeVersion(int i, const T &v) { return (i<<16)+sizeof(T); } -// backwards compatiblity +// backwards compatibility /* void editor_load_old(DATAFILE *df, MAP *map) { diff --git a/src/game/editor/layer_tiles.cpp b/src/game/editor/layer_tiles.cpp index c0609a3cf..a10668d01 100644 --- a/src/game/editor/layer_tiles.cpp +++ b/src/game/editor/layer_tiles.cpp @@ -1266,7 +1266,7 @@ void CLayerSpeedup::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) if(fx < 0 || fx >= m_Width || fy < 0 || fy >= m_Height) continue; - if(Empty || (pLt->m_pTiles[(y*pLt->m_Width + x%pLt->m_Width) % (pLt->m_Width*pLt->m_Height)]).m_Index != TILE_BOOST) // no speed up tile choosen: reset + if(Empty || (pLt->m_pTiles[(y*pLt->m_Width + x%pLt->m_Width) % (pLt->m_Width*pLt->m_Height)]).m_Index != TILE_BOOST) // no speed up tile chosen: reset { m_pTiles[fy*m_Width+fx].m_Index = 0; m_pSpeedupTile[fy*m_Width+fx].m_Force = 0; @@ -1543,7 +1543,7 @@ void CLayerSwitch::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) if(fx < 0 || fx >= m_Width || fy < 0 || fy >= m_Height) continue; - if(Empty || !(pLt->m_pTiles[(y*pLt->m_Width + x%pLt->m_Width) % (pLt->m_Width*pLt->m_Height)]).m_Index) // at least reset the tile if air is choosen + if(Empty || !(pLt->m_pTiles[(y*pLt->m_Width + x%pLt->m_Width) % (pLt->m_Width*pLt->m_Height)]).m_Index) // at least reset the tile if air is chosen { m_pTiles[fy*m_Width+fx].m_Index = 0; m_pSwitchTile[fy*m_Width+fx].m_Type = 0; diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index 9f6122b7b..45c7f6a0e 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -415,8 +415,8 @@ int CEditor::PopupLayer(CEditor *pEditor, CUIRect View) {0}, }; - // if(pEditor->m_Map.m_pGameLayer == pEditor->GetSelectedLayer(0)) // dont use Group and Detail from the selection if this is the game layer - if(pEditor->m_Map.m_pGameLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pTeleLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pSpeedupLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pFrontLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pSwitchLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pTuneLayer == pEditor->GetSelectedLayer(0)) // dont use Group and Detail from the selection if this is the game layer + // if(pEditor->m_Map.m_pGameLayer == pEditor->GetSelectedLayer(0)) // don't use Group and Detail from the selection if this is the game layer + if(pEditor->m_Map.m_pGameLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pTeleLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pSpeedupLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pFrontLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pSwitchLayer == pEditor->GetSelectedLayer(0) || pEditor->m_Map.m_pTuneLayer == pEditor->GetSelectedLayer(0)) // don't use Group and Detail from the selection if this is the game layer { aProps[0].m_Type = PROPTYPE_NULL; aProps[2].m_Type = PROPTYPE_NULL; diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index f3f354a8d..8a9a928db 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -1970,7 +1970,7 @@ void CCharacter::HandleTuneLayer() else m_Core.m_pWorld->m_Tuning[g_Config.m_ClDummy] = *GameServer()->Tuning(); - if (m_TuneZone != m_TuneZoneOld) // dont send tunigs all the time + if (m_TuneZone != m_TuneZoneOld) // don't send tunigs all the time { // send zone msgs SendZoneMsgs(); diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp index 685657ab1..a9e6d2c54 100644 --- a/src/game/server/gamecontroller.cpp +++ b/src/game/server/gamecontroller.cpp @@ -792,7 +792,7 @@ void IGameController::Snap(int SnappingClient) int IGameController::GetAutoTeam(int NotThisID) { - // this will force the auto balancer to work overtime aswell + // this will force the auto balancer to work overtime as well #ifdef CONF_DEBUG if(g_Config.m_DbgStress) return 0; diff --git a/src/game/server/gamecontroller.h b/src/game/server/gamecontroller.h index 74abc99c9..91712d930 100644 --- a/src/game/server/gamecontroller.h +++ b/src/game/server/gamecontroller.h @@ -22,7 +22,7 @@ typedef unsigned __int64 uint64_t; */ class IGameController { - friend class CSaveTeam; // need acces to GameServer() and Server() + friend class CSaveTeam; // need access to GameServer() and Server() vec2 m_aaSpawnPoints[3][64]; int m_aNumSpawnPoints[3]; diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 188a091b2..5f0bd0fe2 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -226,7 +226,7 @@ void CPlayer::Tick() int CurrentIndex = GameServer()->Collision()->GetMapIndex(m_ViewPos); m_TuneZone = GameServer()->Collision()->IsTune(CurrentIndex); - if (m_TuneZone != m_TuneZoneOld) // dont send tunigs all the time + if (m_TuneZone != m_TuneZoneOld) // don't send tunigs all the time { GameServer()->SendTuningParams(m_ClientID, m_TuneZone); } diff --git a/src/game/server/teams.h b/src/game/server/teams.h index 1af58a684..b12f085b0 100644 --- a/src/game/server/teams.h +++ b/src/game/server/teams.h @@ -62,7 +62,7 @@ public: int Count(int Team) const; - //need to be very carefull using this method + //need to be very careful using this method void SetForceCharacterTeam(int id, int Team); void ForceLeaveTeam(int id); diff --git a/src/game/variables.h b/src/game/variables.h index ed2cbf5aa..5df90fabc 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -161,7 +161,7 @@ MACRO_CONFIG_STR(SvServerType, sv_server_type, 64, "none", CFGFLAG_SERVER, "Type MACRO_CONFIG_INT(SvSendVotesPerTick, sv_send_votes_per_tick, 5, 1, 15, CFGFLAG_SERVER, "Number of vote options being send per tick") MACRO_CONFIG_INT(SvRescue, sv_rescue, 0, 0, 1, CFGFLAG_SERVER, "Allow /rescue command so players can teleport themselves out of freeze") -MACRO_CONFIG_INT(SvRescueDelay, sv_rescue_delay, 5, 0, 1000, CFGFLAG_SERVER, "Number of seconds inbetween two rescues") +MACRO_CONFIG_INT(SvRescueDelay, sv_rescue_delay, 5, 0, 1000, CFGFLAG_SERVER, "Number of seconds between two rescues") // debug #ifdef CONF_DEBUG // this one can crash the server if not used correctly diff --git a/src/tools/crapnet.cpp b/src/tools/crapnet.cpp index 2f2f8e2fc..6df5e660f 100644 --- a/src/tools/crapnet.cpp +++ b/src/tools/crapnet.cpp @@ -61,7 +61,7 @@ void Run(unsigned short Port, NETADDR Dest) dbg_msg("crapnet", "cfg = %d", n); Lastcfg = n; - // handle incomming packets + // handle incoming packets while(1) { // fetch data