1015: Fix typo r=heinrich5991 a=yangfl
This commit is contained in:
bors[bot] 2018-02-07 16:22:48 +00:00
commit 6283ad2012
39 changed files with 83 additions and 83 deletions

View file

@ -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)

View file

@ -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

View file

@ -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"),

View file

@ -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 -

View file

@ -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):

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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();

View file

@ -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)

View file

@ -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;

View file

@ -1,6 +1,6 @@
Title: Prediction
The engine calls <modc_predict> when reprediction is required. This happens usally when new data has arrived from the server. <modc_predict> should to prediction from the current snapshot and current snapshot tick (<client_tick> + 1) upto 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.

View file

@ -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;

View file

@ -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")

View file

@ -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);

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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)
{

View file

@ -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);
}
}

View file

@ -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)))

View file

@ -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
{

View file

@ -15,7 +15,7 @@ template<typename T>
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)
{

View file

@ -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;

View file

@ -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;

View file

@ -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();

View file

@ -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;

View file

@ -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];

View file

@ -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);
}

View file

@ -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);

View file

@ -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

View file

@ -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