mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Merge #5984
5984: Fix misspellings r=def- a=rffontenelle <!-- What is the motivation for the changes of this pull request? --> Fix misspellings ("typos") reported by [codespell](https://github.com/codespell-project/codespell). <!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
This commit is contained in:
commit
48ac4c41a7
|
@ -347,8 +347,8 @@ if(NOT MSVC AND NOT HAIKU)
|
|||
add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wthread-safety-negative)
|
||||
add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wsuggest-override)
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -Wno-alloc-size-larger-than) # save.cpp with LTO
|
||||
# add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wdouble-promotion) # Many occurences
|
||||
# add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wnull-dereference) # Many occurences
|
||||
# add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wdouble-promotion) # Many occurrences
|
||||
# add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wnull-dereference) # Many occurrences
|
||||
# add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wuseless-cast) # TODO: Enable for C++ code except gtest
|
||||
endif()
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ On Windows you need to install the Vulkan SDK and set the `VULKAN_SDK` environme
|
|||
Default value is ON for Windows x86\_64 and Linux, and OFF for Windows x86 and macOS.
|
||||
|
||||
* **-GNinja** <br>
|
||||
Use the Ninja build system instead of Make. This automatically parallizes the build and is generally faster. Compile with `ninja` instead of `make`. Install Ninja with `sudo apt install ninja-build` on Debian, `sudo pacman -S --needed ninja` on Arch Linux.
|
||||
Use the Ninja build system instead of Make. This automatically parallelizes the build and is generally faster. Compile with `ninja` instead of `make`. Install Ninja with `sudo apt install ninja-build` on Debian, `sudo pacman -S --needed ninja` on Arch Linux.
|
||||
|
||||
* **-DCMAKE_CXX_LINK_FLAGS=[FLAGS]** <br>
|
||||
Custom flags to set for compiler when linking. With clang++ as the compiler this can be [used to link](https://github.com/rui314/mold#how-to-use) with [mold](https://github.com/rui314/mold), speeds up linking by a factor of ~10:
|
||||
|
|
|
@ -9,7 +9,7 @@ set(WASM_ENGINE_FLAGS "${WASM_ENGINE_FLAGS} --preload-file data")
|
|||
set(WASM_ENGINE_FLAGS "${WASM_ENGINE_FLAGS} --allow-multiple-definition -Wl,--shared-memory,--no-check-features")
|
||||
# TODO
|
||||
#set(WASM_ENGINE_FLAGS "${WASM_ENGINE_FLAGS} -lwebsocket.js -s PROXY_POSIX_SOCKETS=1")
|
||||
# use Web Assmebly & a WebGL2 comptatible GLES3 implementation
|
||||
# use Web Assembly & a WebGL2 compatible GLES3 implementation
|
||||
set(WASM_ENGINE_FLAGS "${WASM_ENGINE_FLAGS} -s WASM=1")
|
||||
set(WASM_ENGINE_FLAGS "${WASM_ENGINE_FLAGS} -s USE_WEBGL2=1")
|
||||
set(WASM_ENGINE_FLAGS "${WASM_ENGINE_FLAGS} -s FULL_ES3=1")
|
||||
|
|
|
@ -17,7 +17,7 @@ void main()
|
|||
float OutlineBlend = (1.0 - textColor.a);
|
||||
|
||||
// since the outline is always black, or even if it has decent colors, it can be just added to the actual color
|
||||
// without loosing any or too much color
|
||||
// without losing any or too much color
|
||||
|
||||
// lerp isn't commutative, so add the color the fragment looses by lerping
|
||||
// this reduces the chance of false color calculation if the text is transparent
|
||||
|
|
|
@ -23,7 +23,7 @@ void main()
|
|||
float OutlineBlend = (1.0 - textColor.a);
|
||||
|
||||
// since the outline is always black, or even if it has decent colors, it can be just added to the actual color
|
||||
// without loosing any or too much color
|
||||
// without losing any or too much color
|
||||
|
||||
// lerp isn't commutative, so add the color the fragment looses by lerping
|
||||
// this reduces the chance of false color calculation if the text is transparent
|
||||
|
|
|
@ -582,7 +582,7 @@ weapon.visual_size.Set(64)
|
|||
weapon.offsetx.Set(32)
|
||||
weapon.offsety.Set(4)
|
||||
# the number after the plus sign is the sprite scale, which is calculated for all sprites ( w / sqrt(w² * h²) ) of the additionally added x offset, which is added now,
|
||||
# since the muzzle image is 32 pixels bigger, devided by 2, because a sprite's position is always at the center of the sprite image itself
|
||||
# since the muzzle image is 32 pixels bigger, divided by 2, because a sprite's position is always at the center of the sprite image itself
|
||||
# => the offset added, bcs the sprite is bigger now, but should not be shifted to the left
|
||||
# => 96 / sqrt(64×64+96×96) (the original sprite scale)
|
||||
# => 64 × original sprite scale (the actual size of the sprite ingame see weapon.visual_size above)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas class="game" id="canvas" widht="100%" height="100%" oncontextmenu="event.preventDefault()"></canvas>
|
||||
<canvas class="game" id="canvas" width="100%" height="100%" oncontextmenu="event.preventDefault()"></canvas>
|
||||
<p id="output"></p>
|
||||
<script>
|
||||
var Module = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Requirements for building:
|
||||
==========================
|
||||
- Android NDK (tested with NDK 23), must be in the same location in which Android studio would unpack it (~/Android/Sdk/ndk/)
|
||||
atleast version 23
|
||||
at least version 23
|
||||
- Android SDK build tools
|
||||
version 30.0.3
|
||||
- ddnet-libs with Android libs
|
||||
|
|
|
@ -22,7 +22,7 @@ function make_opusfile() {
|
|||
(
|
||||
cd "$1" || exit 1
|
||||
if [[ "$_EXISTS_PROJECT" == 0 ]]; then
|
||||
#not nice but doesnt matter
|
||||
#not nice but doesn't matter
|
||||
cp -R ../../ogg/include .
|
||||
cp -R ../../opus/include .
|
||||
cp -R ../../ogg/"$2"/include/ogg/* include/ogg/
|
||||
|
|
|
@ -7,9 +7,9 @@ about how to use the scripts.
|
|||
You can start by analyzing the current languages using analyze.py
|
||||
$ ./analyze.py
|
||||
|
||||
analyze.py outputs serveral columns. The column 'total' is the number of
|
||||
analyze.py outputs several columns. The column 'total' is the number of
|
||||
translations in the file. 'empty' is the number of untranslated phrases in the
|
||||
file. The 2nd and 3rd columns are calculated by looking into the source. The scirpt
|
||||
file. The 2nd and 3rd columns are calculated by looking into the source. The script
|
||||
searches through the source for all phrases. 'missing' is the number of phrases in
|
||||
the source but not in the file. 'unused' is the number of phrases in the file but
|
||||
not in the source.
|
||||
|
|
|
@ -84,7 +84,7 @@ def main():
|
|||
print("You can use the following commands to import the entries to MySQL (using https://github.com/techouse/sqlite3-to-mysql/):")
|
||||
print()
|
||||
print(f"sqlite3mysql --sqlite-file {os.path.abspath(args.to)} --ignore-duplicate-keys --mysql-insert-method IGNORE --sqlite-tables record_race record_teamrace record_saves --mysql-password 'PW2' --mysql-host 'host' --mysql-database teeworlds --mysql-user teeworlds")
|
||||
print(f"When the ranks are transfered successfully to mysql, {os.path.abspath(args.to)} can be removed")
|
||||
print(f"When the ranks are transferred successfully to mysql, {os.path.abspath(args.to)} can be removed")
|
||||
print()
|
||||
print("Log of the transfer:")
|
||||
print()
|
||||
|
|
|
@ -580,7 +580,7 @@ void thread_detach(void *thread);
|
|||
* @param user Pointer to pass to the thread.
|
||||
* @param name Name describing the use of the thread
|
||||
*
|
||||
* @return The thread if no error occured, 0 on error.
|
||||
* @return The thread if no error occurred, 0 on error.
|
||||
*/
|
||||
void *thread_init_and_detach(void (*threadfunc)(void *), void *user, const char *name);
|
||||
|
||||
|
@ -1201,7 +1201,7 @@ void str_utf8_truncate(char *dst, int dst_size, const char *src, int truncation_
|
|||
* counting the zero termination).
|
||||
*
|
||||
* @remark The strings are treated as zero-terminated strings.
|
||||
* @remark Garantees that dst string will contain zero-termination.
|
||||
* @remark Guarantees that dst string will contain zero-termination.
|
||||
*/
|
||||
void str_truncate(char *dst, int dst_size, const char *src, int truncation_len);
|
||||
|
||||
|
@ -1588,7 +1588,7 @@ const char *str_find_nocase(const char *haystack, const char *needle);
|
|||
const char *str_find(const char *haystack, const char *needle);
|
||||
|
||||
/**
|
||||
* Finds the last occurance of a character
|
||||
* Finds the last occurrence of a character
|
||||
*
|
||||
* @ingroup Strings
|
||||
*
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
class CSemaphore
|
||||
{
|
||||
SEMAPHORE m_Sem;
|
||||
// implement the counter seperatly, because the `sem_getvalue`-API is
|
||||
// implement the counter separately, because the `sem_getvalue`-API is
|
||||
// deprecated on macOS: https://stackoverflow.com/a/16655541
|
||||
std::atomic_int m_Count{0};
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ void CGLSLCompiler::ParseLine(std::string &Line, const char *pReadLine, EGLSLSha
|
|||
Line.append(pBuff);
|
||||
return;
|
||||
}
|
||||
// since GLES doesnt support texture LOD bias as global state, use the shader function instead(since GLES 3.0 uses shaders only anyway)
|
||||
// since GLES doesn't support texture LOD bias as global state, use the shader function instead(since GLES 3.0 uses shaders only anyway)
|
||||
else if(str_comp(aTmpStr, "texture") == 0)
|
||||
{
|
||||
Line.append("texture");
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#else
|
||||
#include <GLES3/gl3.h>
|
||||
#define GL_TEXTURE_2D_ARRAY_EXT GL_TEXTURE_2D_ARRAY
|
||||
// GLES doesnt support GL_QUADS, but the code is also never executed
|
||||
// GLES doesn't support GL_QUADS, but the code is also never executed
|
||||
#define GL_QUADS GL_TRIANGLES
|
||||
#ifndef CONF_BACKEND_OPENGL_ES3
|
||||
#include <GLES/gl.h>
|
||||
|
|
|
@ -1062,7 +1062,7 @@ private:
|
|||
// must be calculated when the buffer gets filled
|
||||
size_t m_EstimatedRenderCallCount = 0;
|
||||
|
||||
// usefull data
|
||||
// useful data
|
||||
VkBuffer m_Buffer;
|
||||
size_t m_BufferOff;
|
||||
std::array<SDeviceDescriptorSet, 2> m_aDescriptors;
|
||||
|
@ -1095,7 +1095,7 @@ private:
|
|||
|
||||
protected:
|
||||
/************************
|
||||
* ERROR MANAGMENT
|
||||
* ERROR MANAGEMENT
|
||||
************************/
|
||||
|
||||
char m_aError[1024];
|
||||
|
@ -1149,7 +1149,7 @@ protected:
|
|||
dbg_msg("vulkan", "surface lost");
|
||||
break;
|
||||
/*case VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT:
|
||||
dbg_msg("vulkan", "fullscreen exlusive mode lost");
|
||||
dbg_msg("vulkan", "fullscreen exclusive mode lost");
|
||||
break;*/
|
||||
case VK_ERROR_INCOMPATIBLE_DRIVER:
|
||||
pCriticalError = "no compatible driver found. Vulkan 1.1 is required.";
|
||||
|
@ -1496,7 +1496,7 @@ protected:
|
|||
}
|
||||
|
||||
/************************
|
||||
* MEMORY MANAGMENT
|
||||
* MEMORY MANAGEMENT
|
||||
************************/
|
||||
|
||||
bool AllocateVulkanMemory(const VkMemoryAllocateInfo *pAllocateInfo, VkDeviceMemory *pMemory)
|
||||
|
@ -3711,14 +3711,14 @@ public:
|
|||
uint32_t DevPropCount = 0;
|
||||
if(vkEnumerateDeviceExtensionProperties(m_VKGPU, NULL, &DevPropCount, NULL) != VK_SUCCESS)
|
||||
{
|
||||
SetError("Querying logical device extension propterties failed.");
|
||||
SetError("Querying logical device extension properties failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<VkExtensionProperties> vDevPropList(DevPropCount);
|
||||
if(vkEnumerateDeviceExtensionProperties(m_VKGPU, NULL, &DevPropCount, vDevPropList.data()) != VK_SUCCESS)
|
||||
{
|
||||
SetError("Querying logical device extension propterties failed.");
|
||||
SetError("Querying logical device extension properties failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5442,7 +5442,7 @@ public:
|
|||
}
|
||||
|
||||
/************************
|
||||
* MEMORY MANAGMENT
|
||||
* MEMORY MANAGEMENT
|
||||
************************/
|
||||
|
||||
uint32_t FindMemoryType(VkPhysicalDevice PhyDevice, uint32_t TypeFilter, VkMemoryPropertyFlags Properties)
|
||||
|
|
|
@ -333,7 +333,7 @@ static bool BackendInitGlew(EBackendType BackendType, int &GlewMajor, int &GlewM
|
|||
return true;
|
||||
}
|
||||
#endif
|
||||
// Don't allow GL 3.3, if the driver doesn't support atleast OpenGL 4.5
|
||||
// Don't allow GL 3.3, if the driver doesn't support at least OpenGL 4.5
|
||||
#ifndef CONF_FAMILY_WINDOWS
|
||||
if(GLEW_VERSION_4_4)
|
||||
{
|
||||
|
@ -622,7 +622,7 @@ void CGraphicsBackend_SDL_GL::ClampDriverVersion(EBackendType BackendType)
|
|||
g_Config.m_GfxGLMinor = 0;
|
||||
g_Config.m_GfxGLPatch = 0;
|
||||
|
||||
// GLES also doesnt know GL_QUAD
|
||||
// GLES also doesn't know GL_QUAD
|
||||
g_Config.m_GfxQuadAsTriangle = 1;
|
||||
}
|
||||
#else
|
||||
|
@ -1425,7 +1425,7 @@ bool CGraphicsBackend_SDL_GL::ResizeWindow(int w, int h, int RefreshRate)
|
|||
SetMode.refresh_rate = RefreshRate;
|
||||
SDL_SetWindowDisplayMode(m_pWindow, SDL_GetClosestDisplayMode(g_Config.m_GfxScreen, &SetMode, &ClosestMode));
|
||||
#ifdef CONF_FAMILY_WINDOWS
|
||||
// now change it back to fullscreen, this will restore the above set state, bcs SDL saves fullscreen modes appart from other video modes (as of SDL 2.0.16)
|
||||
// now change it back to fullscreen, this will restore the above set state, bcs SDL saves fullscreen modes apart from other video modes (as of SDL 2.0.16)
|
||||
// see implementation of SDL_SetWindowDisplayMode
|
||||
SetWindowParams(1, false, true);
|
||||
#endif
|
||||
|
|
|
@ -149,7 +149,7 @@ public:
|
|||
bool RunCommand(const CCommandBuffer::SCommand *pBaseCommand);
|
||||
};
|
||||
|
||||
// command processor impelementation, uses the fragments to combine into one processor
|
||||
// command processor implementation, uses the fragments to combine into one processor
|
||||
class CCommandProcessor_SDL_GL : public CGraphicsBackend_Threaded::ICommandProcessor
|
||||
{
|
||||
class CCommandProcessorFragment_GLBase *m_pGLBackend;
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
|
||||
enum ECommandBufferCMD
|
||||
{
|
||||
// commadn groups
|
||||
// command groups
|
||||
CMDGROUP_CORE = 0, // commands that everyone has to implement
|
||||
CMDGROUP_PLATFORM_GL = 10000, // commands specific to a platform
|
||||
CMDGROUP_PLATFORM_SDL = 20000,
|
||||
|
@ -364,7 +364,7 @@ public:
|
|||
SCommand_RenderTileLayer() :
|
||||
SCommand(CMD_RENDER_TILE_LAYER) {}
|
||||
SState m_State;
|
||||
SColorf m_Color; // the color of the whole tilelayer -- already envelopped
|
||||
SColorf m_Color; // the color of the whole tilelayer -- already enveloped
|
||||
|
||||
// the char offset of all indices that should be rendered, and the amount of renders
|
||||
char **m_pIndicesOffsets;
|
||||
|
@ -379,7 +379,7 @@ public:
|
|||
SCommand_RenderBorderTile() :
|
||||
SCommand(CMD_RENDER_BORDER_TILE) {}
|
||||
SState m_State;
|
||||
SColorf m_Color; // the color of the whole tilelayer -- already envelopped
|
||||
SColorf m_Color; // the color of the whole tilelayer -- already enveloped
|
||||
char *m_pIndicesOffset; // you should use the command buffer data to allocate vertices for this command
|
||||
unsigned int m_DrawNum;
|
||||
int m_BufferContainerIndex;
|
||||
|
@ -394,7 +394,7 @@ public:
|
|||
SCommand_RenderBorderTileLine() :
|
||||
SCommand(CMD_RENDER_BORDER_TILE_LINE) {}
|
||||
SState m_State;
|
||||
SColorf m_Color; // the color of the whole tilelayer -- already envelopped
|
||||
SColorf m_Color; // the color of the whole tilelayer -- already enveloped
|
||||
char *m_pIndicesOffset; // you should use the command buffer data to allocate vertices for this command
|
||||
unsigned int m_IndexDrawNum;
|
||||
unsigned int m_DrawNum;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
//print >>f, "int inp_key_code(const char *key_name) { int i; if (!strcmp(key_name, \"-?-\")) return -1; else for (i = 0; i < 512; i++) if (!strcmp(key_strings[i], key_name)) return i; return -1; }"
|
||||
|
||||
// this header is protected so you don't include it from anywere
|
||||
// this header is protected so you don't include it from anywhere
|
||||
#define KEYS_INCLUDE
|
||||
#include "keynames.h"
|
||||
#undef KEYS_INCLUDE
|
||||
|
|
|
@ -1368,7 +1368,7 @@ public:
|
|||
CheckSelectionStart(true, pCursor->m_ReleaseMouseX, pCursor->m_ReleaseMouseY, SelectionEndChar, SelectionUsedRelease, std::numeric_limits<float>::lowest(), 0, CharX, CharWidth, TmpY);
|
||||
}
|
||||
|
||||
// if selection didn't start and the mouse pos is atleast on 50% of the right side of the character start
|
||||
// if selection didn't start and the mouse pos is at least on 50% of the right side of the character start
|
||||
CheckSelectionStart(false, pCursor->m_PressMouseX, pCursor->m_PressMouseY, SelectionStartChar, SelectionUsedPress, LastCharX, LastCharWidth, CharX, CharWidth, TmpY);
|
||||
CheckSelectionStart(false, pCursor->m_ReleaseMouseX, pCursor->m_ReleaseMouseY, SelectionEndChar, SelectionUsedRelease, LastCharX, LastCharWidth, CharX, CharWidth, TmpY);
|
||||
CheckSelectionEnd(false, pCursor->m_ReleaseMouseX, pCursor->m_ReleaseMouseY, SelectionEndChar, SelectionUsedRelease, CharX, CharWidth, TmpY);
|
||||
|
|
|
@ -33,7 +33,7 @@ static void Dilate(int w, int h, int BPP, unsigned char *pSrc, unsigned char *pD
|
|||
{
|
||||
for(int p = 0; p < BPP - 1; ++p)
|
||||
// Seems safe for BPP = 3, 4 which we use. clang-analyzer seems to
|
||||
// asssume being called with larger value. TODO: Can make this
|
||||
// assume being called with larger value. TODO: Can make this
|
||||
// safer anyway.
|
||||
aSumOfOpaque[p] += pSrc[k + p]; // NOLINT(clang-analyzer-core.uninitialized.Assign)
|
||||
++Counter;
|
||||
|
|
|
@ -30,7 +30,7 @@ public: \
|
|||
\
|
||||
private:
|
||||
|
||||
// This kernel thingie makes the structure very flat and basiclly singletons.
|
||||
// This kernel thingie makes the structure very flat and basically singletons.
|
||||
// I'm not sure if this is a good idea but it works for now.
|
||||
class IKernel
|
||||
{
|
||||
|
|
|
@ -645,7 +645,7 @@ void CMysqlConnection::GetString(int Col, char *pBuffer, int BufferSize)
|
|||
}
|
||||
if(Error)
|
||||
{
|
||||
dbg_assert(0, "error getting string: truncation occured");
|
||||
dbg_assert(0, "error getting string: truncation occurred");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -677,7 +677,7 @@ int CMysqlConnection::GetBlob(int Col, unsigned char *pBuffer, int BufferSize)
|
|||
}
|
||||
if(Error)
|
||||
{
|
||||
dbg_assert(0, "error getting blob: truncation occured");
|
||||
dbg_assert(0, "error getting blob: truncation occurred");
|
||||
}
|
||||
return Length;
|
||||
}
|
||||
|
|
|
@ -656,7 +656,7 @@ bool CRegister::OnPacket(const CNetChunk *pPacket)
|
|||
const char *pToken = Unpacker.GetString(0);
|
||||
if(Unpacker.Error())
|
||||
{
|
||||
log_error("register", "got errorneous challenge packet from master");
|
||||
log_error("register", "got erroneous challenge packet from master");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1544,7 +1544,7 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
|||
}
|
||||
else
|
||||
{
|
||||
CMsgPacker Msgp(4, true, true); //NETMSG_SERVERINFO //TODO: Import the shared protocol from 7 aswell
|
||||
CMsgPacker Msgp(4, true, true); //NETMSG_SERVERINFO //TODO: Import the shared protocol from 7 as well
|
||||
GetServerInfoSixup(&Msgp, -1, false);
|
||||
SendMsg(&Msgp, MSGFLAG_VITAL | MSGFLAG_FLUSH, ClientID);
|
||||
}
|
||||
|
@ -2286,7 +2286,7 @@ void CServer::UpdateServerInfo(bool Resend)
|
|||
SendServerInfo(m_NetServer.ClientAddr(i), -1, SERVERINFO_INGAME, false);
|
||||
else
|
||||
{
|
||||
CMsgPacker Msg(4, true, true); //NETMSG_SERVERINFO //TODO: Import the shared protocol from 7 aswell
|
||||
CMsgPacker Msg(4, true, true); //NETMSG_SERVERINFO //TODO: Import the shared protocol from 7 as well
|
||||
GetServerInfoSixup(&Msg, -1, false);
|
||||
SendMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_FLUSH, i);
|
||||
}
|
||||
|
|
|
@ -523,7 +523,7 @@ public:
|
|||
CONNECTIVITY GetConnectivity(int NetType, NETADDR *pGlobalAddr);
|
||||
};
|
||||
|
||||
// TODO: both, fix these. This feels like a junk class for stuff that doesn't fit anywere
|
||||
// TODO: both, fix these. This feels like a junk class for stuff that doesn't fit anywhere
|
||||
class CNetBase
|
||||
{
|
||||
static IOHANDLE ms_DataLogSent;
|
||||
|
|
|
@ -97,7 +97,7 @@ void CItems::RenderProjectile(const CProjectileData *pCurrent, int ItemID)
|
|||
vec2 Vel = Pos - PrevPos;
|
||||
|
||||
// add particle for this projectile
|
||||
// don't check for validity of the projectile for the current weapon here, so particle effects are rendered for mod compability
|
||||
// don't check for validity of the projectile for the current weapon here, so particle effects are rendered for mod compatibility
|
||||
if(CurWeapon == WEAPON_GRENADE)
|
||||
{
|
||||
m_pClient->m_Effects.SmokeTrail(Pos, Vel * -1, Alpha);
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
unsigned int m_HSVColor;
|
||||
};
|
||||
|
||||
// compnent to fetch keypresses, override all other input
|
||||
// component to fetch keypresses, override all other input
|
||||
class CMenusKeyBinder : public CComponent
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -81,7 +81,7 @@ void CParticles::Update(float TimePassed)
|
|||
static float FrictionFraction = 0;
|
||||
FrictionFraction += TimePassed;
|
||||
|
||||
if(FrictionFraction > 2.0f) // safety messure
|
||||
if(FrictionFraction > 2.0f) // safety measure
|
||||
FrictionFraction = 0;
|
||||
|
||||
int FrictionCount = 0;
|
||||
|
|
|
@ -150,7 +150,7 @@ void CGameClient::OnConsoleInit()
|
|||
m_vpInput.insert(m_vpInput.end(), {&CMenus::m_Binder, // this will take over all input when we want to bind a key
|
||||
&m_Binds.m_SpecialBinds,
|
||||
&m_GameConsole,
|
||||
&m_Chat, // chat has higher prio due to tha you can quit it by pressing esc
|
||||
&m_Chat, // chat has higher prio, due to that you can quit it by pressing esc
|
||||
&m_Motd, // for pressing esc to remove it
|
||||
&m_Menus,
|
||||
&m_Spectator,
|
||||
|
@ -354,8 +354,8 @@ void CGameClient::OnInit()
|
|||
|
||||
m_MapImages.SetTextureScale(g_Config.m_ClTextEntitiesSize);
|
||||
|
||||
// Agressively try to grab window again since some Windows users report
|
||||
// window not being focussed after starting client.
|
||||
// Aggressively try to grab window again since some Windows users report
|
||||
// window not being focused after starting client.
|
||||
Graphics()->SetWindowGrab(true);
|
||||
|
||||
CChecksumData *pChecksum = Client()->ChecksumData();
|
||||
|
@ -1192,7 +1192,7 @@ void CGameClient::OnNewSnapshot()
|
|||
Client.m_SpecCharPresent = false;
|
||||
}
|
||||
|
||||
// go trough all the items in the snapshot and gather the info we want
|
||||
// go through all the items in the snapshot and gather the info we want
|
||||
{
|
||||
m_Snap.m_aTeamSize[TEAM_RED] = m_Snap.m_aTeamSize[TEAM_BLUE] = 0;
|
||||
|
||||
|
|
|
@ -504,7 +504,7 @@ void CCharacter::OnPredictedInput(CNetObj_PlayerInput *pNewInput)
|
|||
// skip the input if chat is active
|
||||
if(!GameWorld()->m_WorldConfig.m_BugDDRaceInput && pNewInput->m_PlayerFlags & PLAYERFLAG_CHATTING)
|
||||
{
|
||||
// save reseted input
|
||||
// save the reset input
|
||||
mem_copy(&m_SavedInput, &m_Input, sizeof(m_SavedInput));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ void CRenderTools::GetRenderTeeOffsetToRenderedTee(CAnimState *pAnim, CTeeRender
|
|||
float MinY = -32.0f * AssumedScale;
|
||||
// the body pos shifts the body away from center
|
||||
MinY += BodyPos.y;
|
||||
// the actual body is smaller tho, bcs it doesnt use the full skin image in most cases
|
||||
// the actual body is smaller though, because it doesn't use the full skin image in most cases
|
||||
MinY += BodyOffset.y;
|
||||
|
||||
vec2 FeetOffset;
|
||||
|
@ -255,13 +255,13 @@ void CRenderTools::GetRenderTeeOffsetToRenderedTee(CAnimState *pAnim, CTeeRender
|
|||
// MaxY builds up from the MinY
|
||||
float MaxY = MinY + BodyHeight;
|
||||
// if the body is smaller than the total feet offset, use feet
|
||||
// since feets are smaller in height, respect the assumed relative position
|
||||
// since feet are smaller in height, respect the assumed relative position
|
||||
MaxY = maximum(MaxY, (-16.0f * AssumedScale + FeetPos.y) + FeetOffset.y + FeetHeight);
|
||||
|
||||
// now we got the full rendered size
|
||||
float FullHeight = (MaxY - MinY);
|
||||
|
||||
// next step is to calculate the offset that was created compared to the assumed relative positon
|
||||
// next step is to calculate the offset that was created compared to the assumed relative position
|
||||
float MidOfRendered = MinY + FullHeight / 2.0f;
|
||||
|
||||
// TODO: x coordinate is ignored for now, bcs it's not really used yet anyway
|
||||
|
|
|
@ -2484,7 +2484,7 @@ void CEditor::DoMapEditor(CUIRect View)
|
|||
}
|
||||
else
|
||||
{
|
||||
// pick a type of layers to edit, prefering Tiles layers.
|
||||
// pick a type of layers to edit, preferring Tiles layers.
|
||||
int EditingType = -1;
|
||||
for(size_t i = 0; i < m_vSelectedLayers.size(); i++)
|
||||
{
|
||||
|
|
|
@ -1028,7 +1028,7 @@ int CEditor::Append(const char *pFileName, int StorageType)
|
|||
if(!Err)
|
||||
return Err;
|
||||
|
||||
// modify indecies
|
||||
// modify indices
|
||||
gs_ModifyAddAmount = m_Map.m_vpImages.size();
|
||||
NewMap.ModifyImageIndex(ModifyAdd);
|
||||
|
||||
|
|
|
@ -1209,7 +1209,7 @@ void CCharacter::Snap(int SnappingClient)
|
|||
pDDNetCharacter->m_TeleCheckpoint = m_TeleCheckpoint;
|
||||
pDDNetCharacter->m_StrongWeakID = m_StrongWeakID;
|
||||
|
||||
// Display Informations
|
||||
// Display Information
|
||||
pDDNetCharacter->m_JumpedTotal = m_Core.m_JumpedTotal;
|
||||
pDDNetCharacter->m_NinjaActivationTick = m_Core.m_Ninja.m_ActivationTick;
|
||||
pDDNetCharacter->m_FreezeStart = m_Core.m_FreezeStart;
|
||||
|
|
|
@ -379,7 +379,7 @@ bool CProjectile::FillExtraInfo(CNetObj_DDNetProjectile *pProj)
|
|||
//If the modified data would be too large to fit in an integer, send normal data instead
|
||||
return false;
|
||||
}
|
||||
//Send additional/modified info, by modifiying the fields of the netobj
|
||||
//Send additional/modified info, by modifying the fields of the netobj
|
||||
float Angle = -atan2f(m_Direction.x, m_Direction.y);
|
||||
|
||||
int Data = 0;
|
||||
|
|
|
@ -135,7 +135,7 @@ public:
|
|||
void Load(int Team, bool KeepCurrentWeakStrong);
|
||||
CSaveTee *m_pSavedTees;
|
||||
|
||||
// returns true if an error occured
|
||||
// returns true if an error occurred
|
||||
static bool HandleSaveError(int Result, int ClientID, CGameContext *pGameContext);
|
||||
|
||||
private:
|
||||
|
|
|
@ -156,7 +156,7 @@ MACRO_CONFIG_INT(ClDummyResetOnSwitch, cl_dummy_resetonswitch, 0, 0, 2, CFGFLAG_
|
|||
MACRO_CONFIG_INT(ClDummyRestoreWeapon, cl_dummy_restore_weapon, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE | CFGFLAG_INSENSITIVE, "Whether dummy should switch to last weapon after hammerfly")
|
||||
MACRO_CONFIG_INT(ClDummyCopyMoves, cl_dummy_copy_moves, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_INSENSITIVE, "Whether dummy should copy your moves")
|
||||
|
||||
// more controlable dummy command
|
||||
// more controllable dummy command
|
||||
MACRO_CONFIG_INT(ClDummyControl, cl_dummy_control, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_INSENSITIVE, "Whether can you control dummy at the same time (cl_dummy_jump, cl_dummy_fire, cl_dummy_hook)")
|
||||
MACRO_CONFIG_INT(ClDummyJump, cl_dummy_jump, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_INSENSITIVE, "Whether dummy is jumping (requires cl_dummy_control 1)")
|
||||
MACRO_CONFIG_INT(ClDummyFire, cl_dummy_fire, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_INSENSITIVE, "Whether dummy is firing (requires cl_dummy_control 1)")
|
||||
|
|
|
@ -91,7 +91,7 @@ bool CreatePixelArt(const char aFilenames[3][64], const int aLayerID[2], const i
|
|||
SaveOutputMap(InputMap, OutputMap, pQuadLayer, ItemNumber, pQuads, ((int)sizeof(CQuad)) * (pQuadLayer->m_NumQuads + 1));
|
||||
delete[] pQuads;
|
||||
|
||||
dbg_msg("map_create_pixelart", "INFO: sucessfully added %d new pixelart quads.", QuadsCounter);
|
||||
dbg_msg("map_create_pixelart", "INFO: successfully added %d new pixelart quads.", QuadsCounter);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -280,12 +280,12 @@ CMapItemLayerQuads *GetQuadLayer(CDataFileReader &InputMap, const int aLayerID[2
|
|||
return (CMapItemLayerQuads *)pLayerItem;
|
||||
}
|
||||
|
||||
CQuad CreateNewQuad(const float PosX, const float PosY, const int Width, const int Heigth, const uint8_t aColor[4], const int aForcedPivot[2] = 0x0)
|
||||
CQuad CreateNewQuad(const float PosX, const float PosY, const int Width, const int Height, const uint8_t aColor[4], const int aForcedPivot[2] = 0x0)
|
||||
{
|
||||
CQuad Quad;
|
||||
Quad.m_PosEnv = Quad.m_ColorEnv = -1;
|
||||
Quad.m_PosEnvOffset = Quad.m_ColorEnvOffset = 0;
|
||||
float x = f2fx(PosX), y = f2fx(PosY), w = f2fx(Width / 2.f), h = f2fx(Heigth / 2.f);
|
||||
float x = f2fx(PosX), y = f2fx(PosY), w = f2fx(Width / 2.f), h = f2fx(Height / 2.f);
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue