Fix spelling errors

Overall spelling improvements and cleanup..
This commit is contained in:
Kawe Mazidjatari 2022-09-09 19:47:31 +02:00
parent a9613347c6
commit 34a06147d7
75 changed files with 208 additions and 215 deletions

View File

@ -36,7 +36,7 @@ public:
int m_nFailedAttempts; // Num failed authentication attempts.
int m_nIgnoredMessage; // Count how many times client ignored the no-auth message.
bool m_bValidated; // Revalidates netconsole if false.
bool m_bAuthorized; // Set to true after successfull netconsole auth.
bool m_bAuthorized; // Set to true after successful netconsole auth.
bool m_bInputOnly; // If set, don't send spew to this net console.
std::vector<uint8_t> m_RecvBuffer;

View File

@ -45,13 +45,13 @@ void CNetMessages_Attach()
{
auto SVCPrint = &SVC_Print::ProcessImpl;
auto SVCUserMessage = &SVC_UserMessage::ProcessImpl;
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_Print_VTable, (LPVOID&)SVCPrint, 3, (LPVOID*)&SVC_Print_Process);
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_UserMessage_VTable, (LPVOID&)SVCUserMessage, 3, (LPVOID*)&SVC_UserMessage_Process);
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_Print_VFTable, (LPVOID&)SVCPrint, 3, (LPVOID*)&SVC_Print_Process);
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_UserMessage_VFTable, (LPVOID&)SVCUserMessage, 3, (LPVOID*)&SVC_UserMessage_Process);
}
void CNetMessages_Detach()
{
void* hkRestore = nullptr;
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_Print_VTable, (LPVOID)SVC_Print_Process, 3, (LPVOID*)&hkRestore);
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_UserMessage_VTable, (LPVOID)SVC_UserMessage_Process, 3, (LPVOID*)&hkRestore);
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_Print_VFTable, (LPVOID)SVC_Print_Process, 3, (LPVOID*)&hkRestore);
CMemory::HookVirtualMethod((uintptr_t)g_pSVC_UserMessage_VFTable, (LPVOID)SVC_UserMessage_Process, 3, (LPVOID*)&hkRestore);
}

View File

@ -96,13 +96,13 @@ inline CMemory MM_Heartbeat__ToString; // server HeartBeat? (baseserver.cpp).
// SVC_Print
//-------------------------------------------------------------------------
inline auto SVC_Print_Process = CMemory().RCast<bool(*)(SVC_Print* thisptr)>();
inline void* g_pSVC_Print_VTable = nullptr;
inline void* g_pSVC_Print_VFTable = nullptr;
//-------------------------------------------------------------------------
// SVC_UserMessage
//-------------------------------------------------------------------------
inline auto SVC_UserMessage_Process = CMemory().RCast<bool(*)(SVC_UserMessage* thisptr)>();
inline void* g_pSVC_UserMessage_VTable = nullptr;
inline void* g_pSVC_UserMessage_VFTable = nullptr;
void CNetMessages_Attach();
void CNetMessages_Detach();
@ -113,8 +113,8 @@ class HMM_Heartbeat : public IDetour
virtual void GetAdr(void) const
{
spdlog::debug("| FUN: MM_Heartbeat::ToString : {:#18x} |\n", MM_Heartbeat__ToString.GetPtr());
spdlog::debug("| CON: SVC_Print (VFTable) : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pSVC_Print_VTable));
spdlog::debug("| CON: SVC_UserMessage (VFTable) : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pSVC_UserMessage_VTable));
spdlog::debug("| CON: SVC_Print (VFTable) : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pSVC_Print_VFTable));
spdlog::debug("| CON: SVC_UserMessage (VFTable) : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pSVC_UserMessage_VFTable));
spdlog::debug("+----------------------------------------------------------------+\n");
}
virtual void GetFun(void) const
@ -125,9 +125,9 @@ class HMM_Heartbeat : public IDetour
virtual void GetVar(void) const { }
virtual void GetCon(void) const
{
// We get the actual address of the vtable here, not the class instance.
g_pSVC_Print_VTable = g_GameDll.GetVirtualMethodTable(".?AVSVC_Print@@");
g_pSVC_UserMessage_VTable = g_GameDll.GetVirtualMethodTable(".?AVSVC_UserMessage@@");
// We get the actual address of the vftable here, not the class instance.
g_pSVC_Print_VFTable = g_GameDll.GetVirtualMethodTable(".?AVSVC_Print@@");
g_pSVC_UserMessage_VFTable = g_GameDll.GetVirtualMethodTable(".?AVSVC_UserMessage@@");
}
virtual void Attach(void) const { }
virtual void Detach(void) const { }

View File

@ -44,8 +44,8 @@ void Dedicated_Init()
// CGAME
//-------------------------------------------------------------------------
{
p_CVideoMode_Common__CreateGameWindow.Offset(0x2C).Patch({ 0xE9, 0x9A, 0x00, 0x00, 0x00 }); // PUS --> XOR | Prevent ShowWindow and CreateGameWindow from being initialized (STGS RPak datatype is registered here).
p_CVideoMode_Common__CreateWindowClass.Offset(0x0).Patch({ 0xB8, 0x01, 0x00, 0x00, 0x00, 0xC3 }); // FUN --> RET | Prevent CreateWindowClass from being initialized (returned true to satisy condition that checks window handle).
p_CVideoMode_Common__CreateGameWindow.Offset(0x2C).Patch({ 0xE9, 0x9A, 0x00, 0x00, 0x00 }); // PUS --> XOR | Prevent ShowWindow and CreateGameWindow from being initialized (STGS RPak data type is registered here).
p_CVideoMode_Common__CreateWindowClass.Offset(0x0).Patch({ 0xB8, 0x01, 0x00, 0x00, 0x00, 0xC3 }); // FUN --> RET | Prevent CreateWindowClass from being initialized (returned true to satisfy condition that checks window handle).
}
//-------------------------------------------------------------------------
@ -113,7 +113,7 @@ void Dedicated_Init()
//-------------------------------------------------------------------------
{
// Note: The registers here seems to contains pointers to material data and 'CMaterial' class methods when the shader system is initialized.
CStudioRenderContext__LoadModel.Offset(0x17D).Patch({ 0x90, 0x90, 0x90, 0x90 }); // MOV --> NOP | RAX + RCX are both nullptrs.
CStudioRenderContext__LoadModel.Offset(0x17D).Patch({ 0x90, 0x90, 0x90, 0x90 }); // MOV --> NOP | RAX + RCX are both nullptr.
CStudioRenderContext__LoadModel.Offset(0x181).Patch({ 0x90, 0x90, 0x90 }); // MOV --> NOP | RCX is nullptr when trying to dereference.
CStudioRenderContext__LoadModel.Offset(0x184).Patch({ 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); // CAL --> NOP | RAX is nullptr during virtual call resulting in exception 'C0000005'.
CStudioRenderContext__LoadMaterials.Offset(0x28).Patch({ 0xE9, 0x80, 0x04, 0x00, 0x00 }); // FUN --> RET | 'CStudioRenderContext::LoadMaterials' is called virtually by the 'RMDL' streaming job.

View File

@ -211,7 +211,7 @@ template<class T> bool saturated_mul(T count, T elsize)
#include <stddef.h> // for size_t
// memcpy() with determined behavoir: it always copies
// memcpy() with determined behavior: it always copies
// from the start to the end of the buffer
// note: it copies byte by byte, so it is not equivalent to, for example, rep movsd
inline void *qmemcpy(void *dst, const void *src, size_t cnt)

View File

@ -227,7 +227,7 @@ void CClient::VClear(CClient* pBaseClient)
// *a5 -
// *szMessage -
// nMessageSize -
// Output : true if connection was successfull, false otherwise
// Output : true if connection was successful, false otherwise
//---------------------------------------------------------------------------------
bool CClient::Connect(const char* szName, void* pNetChannel, bool bFakePlayer, void* a5, char* szMessage, int nMessageSize)
{
@ -243,7 +243,7 @@ bool CClient::Connect(const char* szName, void* pNetChannel, bool bFakePlayer, v
// *a5 -
// *szMessage -
// nMessageSize -
// Output : true if connection was successfull, false otherwise
// Output : true if connection was successful, false otherwise
//---------------------------------------------------------------------------------
bool CClient::VConnect(CClient* pClient, const char* szName, void* pNetChannel, bool bFakePlayer, void* a5, char* szMessage, int nMessageSize)
{

View File

@ -8,7 +8,7 @@ struct __declspec(align(4)) CClockDriftMgr
enum
{
// This controls how much it smoothes out the samples from the server.
// This controls how much it smooths out the samples from the server.
NUM_CLOCKDRIFT_SAMPLES = 24
};

View File

@ -28,7 +28,7 @@ bool OverlayBase_t::IsDead() const
{
if (r_debug_overlay_nodecay->GetBool())
{
// Keep rendering the overlay if nodecay is set.
// Keep rendering the overlay if no-decay is set.
return false;
}

View File

@ -4,4 +4,4 @@
///////////////////////////////////////////////////////////////////////////////
EngineParms_t* g_pEngineParms = nullptr;
// TODO: this file is for when dedicated is stable, to move hardcoded patches in Host_Init for a more dynamic solution.
// TODO: this file is for when dedicated is stable, to move hard coded patches in Host_Init for a more dynamic solution.

View File

@ -39,7 +39,7 @@ public:
class CNetworkStringTableContainer : public INetworkStringTable
{
public:
bool m_bAllowCreation; // creat guard Guard
bool m_bAllowCreation; // create guard
int m_nTickCount; // current tick
bool m_bLocked; // currently locked?
bool m_bEnableRollback; // enables rollback feature

View File

@ -68,7 +68,7 @@ bool CServer::AuthClient(user_creds_s* pChallenge)
if (sv_showconnecting->GetBool())
DevMsg(eDLL_T::SERVER, "Processing connectionless challenge for '%s' ('%llu')\n", svIpAddress.c_str(), pChallenge->m_nNucleusID);
if (g_pBanSystem->IsBanListValid()) // Is the banlist vector valid?
if (g_pBanSystem->IsBanListValid()) // Is the banned list vector valid?
{
if (g_pBanSystem->IsBanned(svIpAddress, pChallenge->m_nNucleusID)) // Is the client trying to connect banned?
{

View File

@ -490,7 +490,7 @@ void CRConServer::ProcessMessage(const cl_rcon::request& cl_request)
}
case cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND:
{
if (pData->m_bAuthorized) // Only execute if auth was successfull.
if (pData->m_bAuthorized) // Only execute if auth was successful.
{
this->Execute(cl_request, false);
}

View File

@ -7,7 +7,7 @@
constexpr char s_pszNoAuthMessage[] = "This server is password protected for console access. Authenticate with 'PASS <password>' command.\n";
constexpr char s_pszWrongPwMessage[] = "Admin password incorrect.\n";
constexpr char s_pszBannedMessage[] = "Go away.\n";
constexpr char s_pszAuthMessage[] = "Authentication successfull.\n";
constexpr char s_pszAuthMessage[] = "Authentication successful.\n";
class CRConServer
{

View File

@ -87,7 +87,7 @@ void CAI_NetworkBuilder::SaveNetworkGraph(CAI_Network* pNetwork)
FileSystem()->Write(&nNavMeshHash, sizeof(uint32_t), pAIGraph);
// Path nodes.
DevMsg(eDLL_T::SERVER, " |-- Nodecount: '%d'\n", pNetwork->m_iNumNodes);
DevMsg(eDLL_T::SERVER, " |-- Node count: '%d'\n", pNetwork->m_iNumNodes);
FileSystem()->Write(&pNetwork->m_iNumNodes, sizeof(int), pAIGraph);
timer.End();
@ -135,15 +135,15 @@ void CAI_NetworkBuilder::SaveNetworkGraph(CAI_Network* pNetwork)
timer.Start();
DevMsg(eDLL_T::SERVER, "+- Writing links...\n");
DevMsg(eDLL_T::SERVER, " |-- Cached linkcount: '%d'\n", pNetwork->m_iNumLinks);
DevMsg(eDLL_T::SERVER, " |-- Calculated linkcount: '%d'\n", nCalculatedLinkcount);
DevMsg(eDLL_T::SERVER, " |-- Cached link count: '%d'\n", pNetwork->m_iNumLinks);
DevMsg(eDLL_T::SERVER, " |-- Calculated link count: '%d'\n", nCalculatedLinkcount);
nCalculatedLinkcount /= 2;
if (ai_ainDumpOnLoad->GetBool())
{
if (pNetwork->m_iNumLinks != nCalculatedLinkcount)
{
Warning(eDLL_T::SERVER, "%s - Calculated linkcount '%d' doesn't match cached linkcount '%d' (expected on build!)\n", __FUNCTION__, nCalculatedLinkcount, pNetwork->m_iNumLinks);
Warning(eDLL_T::SERVER, "%s - Calculated link count '%d' doesn't match cached link count '%d' (expected on build!)\n", __FUNCTION__, nCalculatedLinkcount, pNetwork->m_iNumLinks);
}
}

View File

@ -433,7 +433,7 @@ void CBrowser::HostPanel(void)
ImGui::Spacing();
ImGui::SameLine();
ImGui::Text("Server Visiblity");
ImGui::Text("Server Visibility");
if (ImGui::SameLine(); ImGui::RadioButton("Offline", g_pServerListManager->m_ServerVisibility == EServerVisibility_t::OFFLINE))
{
@ -537,7 +537,7 @@ void CBrowser::HostPanel(void)
}
//-----------------------------------------------------------------------------
// Purpose: updates the hoster's status
// Purpose: updates the host status
//-----------------------------------------------------------------------------
void CBrowser::UpdateHostingStatus(void)
{

View File

@ -7,8 +7,8 @@ Purpose: Implements the in-game console front-end
-------------------------------------------------------------------------------
History:
- 15:06:2021 | 14:56 : Created by Kawe Mazidjatari
- 07:08:2021 | 15:22 : Multithread 'CommandExecute' operations to prevent deadlock in render thread
- 07:08:2021 | 15:25 : Fix a race condition that occured when detaching the 'CommandExecute' thread
- 07:08:2021 | 15:22 : Multi-thread 'CommandExecute' operations to prevent deadlock in render thread
- 07:08:2021 | 15:25 : Fix a race condition that occurred when detaching the 'CommandExecute' thread
******************************************************************************/

View File

@ -38,7 +38,7 @@ int LauncherMain(HINSTANCE hInstance)
// Remove all but the last -game parameter.
// This is for mods based off something other than Half-Life 2 (like HL2MP mods).
// The Steam UI does 'steam -applaunch 320 -game c:\steam\steamapps\sourcemods\modname', but applaunch inserts
// its own -game parameter, which would supercede the one we really want if we didn't intercede here.
// its own -game parameter, which would supersede the one we really want if we didn't intercede here.
void RemoveSpuriousGameParameters()
{
AppendSDKParametersPreInit();

View File

@ -22,7 +22,7 @@ Before an IceKey can be used to encrypt data, its key schedule must be set with
The length of the key required is determined by the level, as described above.
The member functions encrypt() and decrypt() encrypt and decrypt respectively data
in blocks of eight chracters, using the specified key.
in blocks of eight characters, using the specified key.
Two functions keySize() and blockSize() are provided
which return the key and block size respectively, measured in bytes.

View File

@ -125,7 +125,7 @@ ice_perm32 (
/*
* Initialise the ICE S-boxes.
* Initialize the ICE S-boxes.
* This only has to be done once.
*/

View File

@ -67,7 +67,7 @@ bool AlmostEqual(float a, float b, int maxUlps)
// After adjusting floats so their representations are lexicographically
// ordered as twos-complement integers a very small positive number
// will compare as 'close' to a very small negative number. If this is
// not desireable, and if you are on a platform that supports
// not desirable, and if you are on a platform that supports
// subnormals (which is the only place the problem can show up) then
// you need this check.
// The check for a == b is because zero and negative zero have different

View File

@ -1,6 +1,6 @@
//===== Copyright 1996-2010, Valve Corporation, All rights reserved. ======//
//
// Purpose: - defines the type fltx4 - Avoid cyclic includion.
// Purpose: - defines the type fltx4 - Avoid cyclic inclusion.
//
//===========================================================================//

View File

@ -2008,7 +2008,7 @@ FORCEINLINE float LinearToVertexLight(float f)
// assume 0..4 range
int i = RoundFloatToInt(f * 1024.f);
// Presumably the comman case will be not to clamp, so check that first:
// Presumably the common case will be not to clamp, so check that first:
if ((unsigned)i > 4095)
{
if (i < 0)
@ -2028,7 +2028,7 @@ FORCEINLINE unsigned char LinearToLightmap(float f)
// Gotta clamp before the multiply; could overflow...
int i = RoundFloatToInt(f * 1024.f); // assume 0..4 range
// Presumably the comman case will be not to clamp, so check that first:
// Presumably the common case will be not to clamp, so check that first:
if ((unsigned)i > 4095)
{
if (i < 0)
@ -2322,7 +2322,7 @@ void CalcClosestPointOnLineSegment(const Vector3D& P, const Vector3D& vLineA, c
float CalcDistanceToLineSegment(const Vector3D& P, const Vector3D& vLineA, const Vector3D& vLineB, float* t = 0);
float CalcDistanceSqrToLineSegment(const Vector3D& P, const Vector3D& vLineA, const Vector3D& vLineB, float* t = 0);
// A function to compute the closes line segment connnection two lines (or false if the lines are parallel, etc.)
// A function to compute the closes line segment connection two lines (or false if the lines are parallel, etc.)
bool CalcLineToLineIntersectionSegment(
const Vector3D& p1, const Vector3D& p2, const Vector3D& p3, const Vector3D& p4, Vector3D* s1, Vector3D* s2,
float* t1, float* t2);

View File

@ -1776,7 +1776,7 @@ void QuaternionIdentityBlend(const Quaternion& p, float t, Quaternion& qt)
}
//-----------------------------------------------------------------------------
// Quaternion sphereical linear interpolation
// Quaternion spherical linear interpolation
//-----------------------------------------------------------------------------
void QuaternionSlerp(const Quaternion& p, const Quaternion& q, float t, Quaternion& qt)
@ -2200,7 +2200,7 @@ void QuaternionMatrix(const Quaternion& q, matrix3x4_t& matrix)
#endif
// Original code
// This should produce the same code as below with optimization, but looking at the assmebly,
// This should produce the same code as below with optimization, but looking at the assembly,
// it doesn't. There are 7 extra multiplies in the release build of this, go figure.
#if 1
matrix[0][0] = 1.0 - 2.0 * q.y * q.y - 2.0 * q.z * q.z;
@ -3647,7 +3647,7 @@ void TransformAABB(const matrix3x4_t& transform, const Vector3D& vecMinsIn, cons
VectorSubtract(worldCenter, worldExtents, vecMinsOut);
VectorAdd(worldCenter, worldExtents, vecMaxsOut);
// sanity chec
// sanity check
Assert(vecMinsOut.LengthSqr() + vecMaxsOut.LengthSqr() < 1e+12);
}

View File

@ -1,6 +1,6 @@
//========= Copyright <20> 1996-2006, Valve Corporation, All rights reserved. ============//
//
// Purpose: generates 4 randum numbers in the range 0..1 quickly, using SIMD
// Purpose: generates 4 random numbers in the range 0..1 quickly, using SIMD
//
//=====================================================================================//

View File

@ -273,7 +273,7 @@ void FourVectors::RotateManyBy(FourVectors* RESTRICT pVectors, unsigned int numV
// loop should be unrolled to 8 FourVectors per iteration; because each FourVectors is
// 48 bytes long, 48 * 8 = 384, its least common multiple with the 128-byte cache line.
// That way you can fetch the next 3 cache lines while you work on these three.
// If you do go this route, be sure to dissassemble and make sure it doesn't spill
// If you do go this route, be sure to disassemble and make sure it doesn't spill
// registers to stack as you do this; the cost of that will be excessive. Unroll the loop
// a little and just live with the fact that you'll be doing a couple of redundant dbcts
// (they don't cost you anything). Be aware that all three cores share L2 and it can only
@ -434,7 +434,7 @@ void FourVectors::RotateManyBy(FourVectors* RESTRICT pVectors, unsigned int numV
// loop should be unrolled to 8 FourVectors per iteration; because each FourVectors is
// 48 bytes long, 48 * 8 = 384, its least common multiple with the 128-byte cache line.
// That way you can fetch the next 3 cache lines while you work on these three.
// If you do go this route, be sure to dissassemble and make sure it doesn't spill
// If you do go this route, be sure to disassemble and make sure it doesn't spill
// registers to stack as you do this; the cost of that will be excessive. Unroll the loop
// a little and just live with the fact that you'll be doing a couple of redundant dbcts
// (they don't cost you anything). Be aware that all three cores share L2 and it can only

View File

@ -41,7 +41,7 @@ typedef vec_float4 FLTX4;
typedef const fltx4& FLTX4;
#endif
// A 16-byte aligned int32 datastructure
// A 16-byte aligned int32 data structure
// (for use when writing out fltx4's as SIGNED
// ints).
struct ALIGN16 intx4
@ -953,7 +953,7 @@ FORCEINLINE void StoreFourUnalignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4
// into the four consecutive Vectors:
// pDestination , pDestination + 1, pDestination + 2, pDestination + 3
// The Vectors are assumed to start on an ALIGNED address, that is,
// pDestination is 16-byte aligned (thhough obviously pDestination+1 is not).
// pDestination is 16-byte aligned (though obviously pDestination+1 is not).
FORCEINLINE void StoreFourAlignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4 d, // first three passed by copy (deliberate)
Vector* const pDestination)
{
@ -1987,7 +1987,7 @@ FORCEINLINE void StoreFourUnalignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4
// into the four consecutive Vectors:
// pDestination , pDestination + 1, pDestination + 2, pDestination + 3
// The Vectors are assumed to start on an ALIGNED address, that is,
// pDestination is 16-byte aligned (thhough obviously pDestination+1 is not).
// pDestination is 16-byte aligned (though obviously pDestination+1 is not).
FORCEINLINE void StoreFourAlignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4 d, // first three passed by copy (deliberate)
Vector* const pDestination)
{
@ -3052,7 +3052,7 @@ FORCEINLINE void StoreFourUnalignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4
// into the four consecutive Vectors:
// pDestination , pDestination + 1, pDestination + 2, pDestination + 3
// The Vectors are assumed to start on an ALIGNED address, that is,
// pDestination is 16-byte aligned (thhough obviously pDestination+1 is not).
// pDestination is 16-byte aligned (though obviously pDestination+1 is not).
FORCEINLINE void StoreFourAlignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4 d, // first three passed by copy (deliberate)
Vector* const pDestination)
{
@ -3556,7 +3556,7 @@ FORCEINLINE void StoreFourUnalignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4
// into the four consecutive Vectors:
// pDestination , pDestination + 1, pDestination + 2, pDestination + 3
// The Vectors are assumed to start on an ALIGNED address, that is,
// pDestination is 16-byte aligned (thhough obviously pDestination+1 is not).
// pDestination is 16-byte aligned (though obviously pDestination+1 is not).
FORCEINLINE void StoreFourAlignedVector3SIMD(fltx4 a, fltx4 b, fltx4 c, FLTX4 d, // first three passed by copy (deliberate)
Vector3D* const pDestination)
{
@ -5484,7 +5484,7 @@ inline fltx4 fnegate(const fltx4& x)
fltx4 Pow_FixedPoint_Exponent_SIMD(const fltx4& x, int exponent);
// PowSIMD - raise a SIMD register to a power. This is analogous to the C pow() function, with some
// restictions: fractional exponents are only handled with 2 bits of precision. Basically,
// restrictions: fractional exponents are only handled with 2 bits of precision. Basically,
// fractions of 0,.25,.5, and .75 are handled. PowSIMD(x,.30) will be the same as PowSIMD(x,.25).
// negative and fractional powers are handled by the SIMD reciprocal and square root approximation
// instructions and so are not especially accurate ----Note that this routine does not raise
@ -5945,8 +5945,8 @@ inline const fltx4 Normalized3SIMD(const fltx4 vec)
// Some convenience operator overloads, which are just aliasing the functions above.
// Unneccessary on 360, as you already have them from xboxmath.h
// Componentwise add
// Unnecessary on 360, as you already have them from xboxmath.h
// Component wise add
#ifndef COMPILER_GCC
FORCEINLINE fltx4 operator+=(fltx4& a, FLTX4 b)

View File

@ -75,7 +75,7 @@ fltx4 NoiseSIMD(const fltx4& x, const fltx4& y, const fltx4& z)
DOPASS(3);
// now, we have 8 lattice values for each of four points as m128s, and interpolant values for
// each axis in m128 form in [xyz]frac. Perfom the trilinear interpolation as SIMD ops
// each axis in m128 form in [xyz]frac. Perform the trilinear interpolation as SIMD ops
// first, do x interpolation
fltx4 l2d00 = AddSIMD(lattice000, MulSIMD(xfrac, SubSIMD(lattice100, lattice000)));
@ -154,7 +154,7 @@ FourVectors DNoiseSIMD(const fltx4& x, const fltx4& y, const fltx4& z)
DODPASS(3);
// now, we have 8 lattice values for each of four points as m128s, and interpolant values for
// each axis in m128 form in [xyz]frac. Perfom the trilinear interpolation as SIMD ops
// each axis in m128 form in [xyz]frac. Perform the trilinear interpolation as SIMD ops
// first, do x interpolation
fltx4 xl2d00 = AddSIMD(xlattice000, MulSIMD(xfrac, SubSIMD(xlattice100, xlattice000)));

View File

@ -22,7 +22,7 @@
// we don't as of Sept 1, 2007). So, it's best not to allow these
// functions to exist at all. It's not good enough to simply replace
// the contents of the functions with scalar math, because each call
// to LoadAligned and StoreAligned will result in an unnecssary copy
// to LoadAligned and StoreAligned will result in an unnecessary copy
// of the quaternion, and several moves to and from the XMM registers.
//
// Basically, the problem you run into is that for efficient SIMD code,
@ -380,7 +380,7 @@ FORCEINLINE fltx4 QuaternionScaleSIMD(const fltx4& p, float t)
//-----------------------------------------------------------------------------
// Quaternion sphereical linear interpolation
// Quaternion spherical linear interpolation
//-----------------------------------------------------------------------------
#ifndef _X360
@ -1070,7 +1070,7 @@ FORCEINLINE FourQuaternions FourQuaternions::Slerp(const FourQuaternions& origin
// yet if we need to realign, so compute them both -- there's plenty of
// space in the bubbles. They're roomy, those bubbles.
fltx4 cosineOmega;
#if 0 // Maybe I don't need to do alignment seperately, using the xb360 technique...
#if 0 // Maybe I don't need to do alignment separately, using the xb360 technique...
FourQuaternions to;
{
fltx4 diffs[4], sums[4], originalToNeg[4];

View File

@ -1297,7 +1297,7 @@ FORCEINLINE void VectorMultiply(const Vector3D& a, const Vector3D& b, Vector3D&
c.z = a.z * b.z;
}
// for backwards compatability
// for backwards compatibility
inline void VectorScale(const Vector3D& in, vec_t scale, Vector3D& result)
{
VectorMultiply(in, scale, result);
@ -1325,7 +1325,7 @@ FORCEINLINE void VectorDivide(const Vector3D& a, const Vector3D& b, Vector3D& c)
}
// FIXME: Remove
// For backwards compatability
// For backwards compatibility
inline void Vector3D::MulAdd(const Vector3D& a, const Vector3D& b, float scalar)
{
CHECK_VALID(a);
@ -1387,7 +1387,7 @@ FORCEINLINE vec_t DotProduct(const Vector3D& a, const Vector3D& b)
return(a.x * b.x + a.y * b.y + a.z * b.z);
}
// for backwards compatability
// for backwards compatibility
inline vec_t Vector3D::Dot(const Vector3D& vOther) const
{
CHECK_VALID(vOther);
@ -1502,7 +1502,7 @@ inline vec_t VectorNormalize( Vector& v )
else
{
// FIXME:
// Just copying the existing implemenation; shouldn't res.z == 0?
// Just copying the existing implementation; shouldn't res.z == 0?
v.x = v.y = 0.0f; v.z = 1.0f;
}
return l;
@ -1827,7 +1827,7 @@ inline const Vector3D VectorPerpendicularToVector(const Vector3D& in)
//-----------------------------------------------------------------------------
// AngularImpulse
//-----------------------------------------------------------------------------
// AngularImpulse are exponetial maps (an axis scaled by a "twist" angle in degrees)
// AngularImpulse are exponential maps (an axis scaled by a "twist" angle in degrees)
typedef Vector3D AngularImpulse;
#ifndef VECTOR_NO_SLOW_OPERATIONS
@ -1967,7 +1967,7 @@ void Quaternion::Print() const
//-----------------------------------------------------------------------------
// Binaray operators
// Binary operators
//-----------------------------------------------------------------------------
inline Quaternion operator+(const Quaternion& q1, const Quaternion& q2)
{

View File

@ -472,7 +472,7 @@ inline void Vector2DMA(const Vector2D& start, float s, const Vector2D& dir, Vect
}
// FIXME: Remove
// For backwards compatability
// For backwards compatibility
inline void Vector2D::MulAdd(const Vector2D& a, const Vector2D& b, float scalar)
{
x = a.x + b.x * scalar;
@ -494,7 +494,7 @@ inline vec_t DotProduct2D(const Vector2D& a, const Vector2D& b)
return(a.x * b.x + a.y * b.y);
}
// for backwards compatability
// for backwards compatibility
inline vec_t Vector2D::Dot(const Vector2D& vOther) const
{
return DotProduct2D(*this, vOther);

View File

@ -563,7 +563,7 @@ inline void Vector4DMA(Vector4D const& start, float s, Vector4D const& dir, Vect
}
// FIXME: Remove
// For backwards compatability
// For backwards compatibility
inline void Vector4D::MulAdd(Vector4D const& a, Vector4D const& b, float scalar)
{
x = a.x + b.x * scalar;
@ -590,7 +590,7 @@ inline vec_t DotProduct4D(const Vector4D& a, const Vector4D& b)
return(a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w);
}
// for backwards compatability
// for backwards compatibility
inline vec_t Vector4D::Dot(Vector4D const& vOther) const
{
return DotProduct4D(*this, vOther);

View File

@ -207,7 +207,7 @@ bool PlaneIntersection(const VPlane& vp1, const VPlane& vp2, const VPlane& vp3,
vOut = vRet * (1.0 / flDenom);
return true;
}
#else // old slow innaccurate code
#else // old slow inaccurate code
bool PlaneIntersection(const VPlane& vp1, const VPlane& vp2, const VPlane& vp3, Vector& vOut)
{
VMatrix mMat, mInverse;

View File

@ -592,7 +592,7 @@ inline void VMatrix::SetTranslation(const Vector3D& vTrans)
//-----------------------------------------------------------------------------
// appply translation to this matrix in the input space
// apply translation to this matrix in the input space
//-----------------------------------------------------------------------------
inline void VMatrix::PreTranslate(const Vector3D& vTrans)
{
@ -605,7 +605,7 @@ inline void VMatrix::PreTranslate(const Vector3D& vTrans)
//-----------------------------------------------------------------------------
// appply translation to this matrix in the output space
// apply translation to this matrix in the output space
//-----------------------------------------------------------------------------
inline void VMatrix::PostTranslate(const Vector3D& vTrans)
{

View File

@ -69,7 +69,7 @@ void CBanSystem::Load(void)
}
//-----------------------------------------------------------------------------
// Purpose: saves the banlist
// Purpose: saves the banned list
//-----------------------------------------------------------------------------
void CBanSystem::Save(void) const
{
@ -103,7 +103,7 @@ void CBanSystem::Save(void) const
}
//-----------------------------------------------------------------------------
// Purpose: adds a banned player entry to the banlist
// Purpose: adds a banned player entry to the banned list
// Input : &svIpAddress -
// nNucleusID -
//-----------------------------------------------------------------------------
@ -130,7 +130,7 @@ bool CBanSystem::AddEntry(const string& svIpAddress, const uint64_t nNucleusID)
}
//-----------------------------------------------------------------------------
// Purpose: deletes an entry in the banlist
// Purpose: deletes an entry in the banned list
// Input : &svIpAddress -
// nNucleusID -
//-----------------------------------------------------------------------------
@ -157,7 +157,7 @@ bool CBanSystem::DeleteEntry(const string& svIpAddress, const uint64_t nNucleusI
}
//-----------------------------------------------------------------------------
// Purpose: adds a connect refuse entry to the refuselist
// Purpose: adds a connect refuse entry to the refused list
// Input : &svError -
// nNucleusID -
//-----------------------------------------------------------------------------
@ -184,7 +184,7 @@ bool CBanSystem::AddConnectionRefuse(const string& svError, const uint64_t nNucl
}
//-----------------------------------------------------------------------------
// Purpose: deletes an entry in the refuselist
// Purpose: deletes an entry in the refused list
// Input : nNucleusID -
//-----------------------------------------------------------------------------
bool CBanSystem::DeleteConnectionRefuse(const uint64_t nNucleusID)
@ -238,7 +238,7 @@ void CBanSystem::BanListCheck(void)
}
if (bSave)
Save(); // Save banlist to file.
Save(); // Save banned list to file.
}
}

View File

@ -73,7 +73,7 @@ void CServerListManager::LaunchServer(void) const
DevMsg(eDLL_T::ENGINE, "Starting server with name: \"%s\" map: \"%s\" playlist: \"%s\"\n", m_Server.m_svHostName.c_str(), m_Server.m_svHostMap.c_str(), m_Server.m_svPlaylist.c_str());
/*
* Playlist gets parsed in two instances, first in KeyValues::ParsePlaylists with all the neccessary values.
* Playlist gets parsed in two instances, first in KeyValues::ParsePlaylists with all the necessary values.
* Then when you would normally call launchplaylist which calls StartPlaylist it would cmd call mp_gamemode which parses the gamemode specific part of the playlist..
*/
KeyValues::ParsePlaylists(m_Server.m_svPlaylist.c_str());

View File

@ -63,7 +63,7 @@ vector<NetGameServer_t> CPylon::GetServerList(string& svOutMessage) const
obj.value("maxPlayers", ""),
obj.value("timeStamp", 0),
obj.value("publicRef", ""),
obj.value("cachedID", ""),
obj.value("cachedId", ""),
}
);
}
@ -169,7 +169,7 @@ bool CPylon::GetServerByToken(NetGameServer_t& slOutServer, string& svOutMessage
jsResultBody["server"].value("maxPlayers", ""),
jsResultBody["server"].value("timeStamp", 0),
jsResultBody["server"].value("publicRef", ""),
jsResultBody["server"].value("cachedID", ""),
jsResultBody["server"].value("cachedId", ""),
};
return true;
}
@ -250,7 +250,7 @@ bool CPylon::PostServerHost(string& svOutMessage, string& svOutToken, const NetG
jsRequestBody["maxPlayers"] = slServerListing.m_svMaxPlayers;
jsRequestBody["timeStamp"] = slServerListing.m_nTimeStamp;
jsRequestBody["publicRef"] = slServerListing.m_svPublicRef;
jsRequestBody["cachedID"] = slServerListing.m_svCachedID;
jsRequestBody["cachedId"] = slServerListing.m_svCachedId;
string svRequestBody = jsRequestBody.dump(4);
if (pylon_showdebuginfo->GetBool())

View File

@ -1,8 +1,6 @@
#pragma once
#include "serverlisting.h"
bool KeepAliveToPylon(const NetGameServer_t& netGameServer);
class CPylon
{
public:

View File

@ -32,7 +32,7 @@ struct NetGameServer_t
int64_t m_nTimeStamp = -1;
string m_svPublicRef;
string m_svCachedID;
string m_svCachedId;
//vector<NetGameMod_t> m_vMods;
};

View File

@ -28,7 +28,7 @@ enum NetworkMessageGroup_t
};
//=============================================================================
// Networksystem internal messages for use during valid connection
// NetworkSystem internal messages for use during valid connection
enum SystemNetworkMessageType_t
{
net_nop = 0, // nop command used for padding

View File

@ -31,7 +31,7 @@ public:
string m_svPluginFullPath;
string m_svDescription;
bool m_bIsLoaded; // [ PIXIE ]: I don't like this and it's bad.
// I will make a module manager later which will grab all modules from the processand adds each module / removes module that passes through DLLMain.
// I will make a module manager later which will grab all modules from the process and adds each module / removes module that passes through DLLMain.
};
void PluginSystem_Init();

View File

@ -5,7 +5,7 @@
#include <tier0/threadtools.h>
#include <appframework/iappsystem.h>
#include <vpc/keyvalues.h>
#include "vpc/interfaces.h"
#include <vpc/interfaces.h>
#include <vpklib/packedstore.h>
typedef void* FileHandle_t;
@ -328,7 +328,7 @@ public:
virtual __int64 __fastcall sub_14038C380(__int64 a1) = 0;
virtual __int64 __fastcall sub_14038C400(__int64 a1, __int64 a2) = 0;
// Returns the file system statistics retreived by the implementation. Returns NULL if not supported.
// Returns the file system statistics retrieved by the implementation. Returns NULL if not supported.
virtual const FileSystemStatistics* GetFilesystemStatistics() = 0;
//--------------------------------------------------------

View File

@ -28,7 +28,7 @@ public:
virtual void SetNetChannel(INetChannel * netchan) = 0; // netchannel this message is from/for
virtual void SetReliable( bool state ) = 0; // set to true if it's a reliable message
virtual bool Process( void ) = 0; // calles the recently set handler to process this message
virtual bool Process( void ) = 0; // calls the recently set handler to process this message
virtual bool ReadFromBuffer( bf_read &buffer ) = 0; // returns true if parsing was OK
virtual bool WriteToBuffer( bf_write &buffer ) = 0; // returns true if writing was OK

View File

@ -27,7 +27,7 @@ CIOStream::~CIOStream()
//-----------------------------------------------------------------------------
// Purpose: opens the file in specified mode
// Input : fileFullPath - mode
// Output : true if operation is successfull
// Output : true if operation is successful
//-----------------------------------------------------------------------------
bool CIOStream::Open(const fs::path& fsFilePath, Mode_t eMode)
{
@ -99,7 +99,7 @@ void CIOStream::Flush()
}
//-----------------------------------------------------------------------------
// Purpose: gets the possition of the current character in the stream
// Purpose: gets the position of the current character in the stream
//-----------------------------------------------------------------------------
size_t CIOStream::GetPosition()
{
@ -117,7 +117,7 @@ size_t CIOStream::GetPosition()
}
//-----------------------------------------------------------------------------
// Purpose: sets the possition of the current character in the stream
// Purpose: sets the position of the current character in the stream
// Input : nOffset -
//-----------------------------------------------------------------------------
void CIOStream::SetPosition(int64_t nOffset)

View File

@ -76,16 +76,16 @@ void CMemory::PatchString(const string& svString) const
// Input : *szPattern -
// searchDirect -
// opCodesToScan -
// occurence -
// occurrence -
// Output : CMemory
//-----------------------------------------------------------------------------
CMemory CMemory::FindPattern(const string& svPattern, const Direction searchDirect, const int opCodesToScan, const ptrdiff_t occurence) const
CMemory CMemory::FindPattern(const string& svPattern, const Direction searchDirect, const int opCodesToScan, const ptrdiff_t occurrence) const
{
uint8_t* pScanBytes = reinterpret_cast<uint8_t*>(ptr); // Get the base of the module.
const vector<int> PatternBytes = PatternToBytes(svPattern); // Convert our pattern to a byte array.
const pair bytesInfo = std::make_pair(PatternBytes.size(), PatternBytes.data()); // Get the size and data of our bytes.
ptrdiff_t occurences = 0;
ptrdiff_t occurrences = 0;
for (long i = 01; i < opCodesToScan + bytesInfo.first; i++)
{
@ -107,8 +107,8 @@ CMemory CMemory::FindPattern(const string& svPattern, const Direction searchDire
if (bFound)
{
occurences++;
if (occurence == occurences)
occurrences++;
if (occurrence == occurrences)
{
return CMemory(&*(pScanBytes + nMemOffset));
}
@ -123,16 +123,16 @@ CMemory CMemory::FindPattern(const string& svPattern, const Direction searchDire
// Input : *szPattern -
// searchDirect -
// opCodesToScan -
// occurence -
// occurrence -
// Output : CMemory
//-----------------------------------------------------------------------------
CMemory CMemory::FindPatternSelf(const string& svPattern, const Direction searchDirect, const int opCodesToScan, const ptrdiff_t occurence)
CMemory CMemory::FindPatternSelf(const string& svPattern, const Direction searchDirect, const int opCodesToScan, const ptrdiff_t occurrence)
{
uint8_t* pScanBytes = reinterpret_cast<uint8_t*>(ptr); // Get the base of the module.
const vector<int> PatternBytes = PatternToBytes(svPattern); // Convert our pattern to a byte array.
const pair bytesInfo = std::make_pair(PatternBytes.size(), PatternBytes.data()); // Get the size and data of our bytes.
ptrdiff_t occurences = 0;
ptrdiff_t occurrences = 0;
for (long i = 01; i < opCodesToScan + bytesInfo.first; i++)
{
@ -154,8 +154,8 @@ CMemory CMemory::FindPatternSelf(const string& svPattern, const Direction search
if (bFound)
{
occurences++;
if (occurence == occurences)
occurrences++;
if (occurrence == occurrences)
{
ptr = uintptr_t(&*(pScanBytes + nMemOffset));
return *this;

View File

@ -118,8 +118,8 @@ public:
bool CheckOpCodes(const vector<uint8_t> vOpcodeArray) const;
void Patch(const vector<uint8_t> vOpcodeArray) const;
void PatchString(const string& svString) const;
CMemory FindPattern(const string& svPattern, const Direction searchDirect = Direction::DOWN, const int opCodesToScan = 512, const ptrdiff_t occurence = 1) const;
CMemory FindPatternSelf(const string& svPattern, const Direction searchDirect = Direction::DOWN, const int opCodesToScan = 512, const ptrdiff_t occurence = 1);
CMemory FindPattern(const string& svPattern, const Direction searchDirect = Direction::DOWN, const int opCodesToScan = 512, const ptrdiff_t occurrence = 1) const;
CMemory FindPatternSelf(const string& svPattern, const Direction searchDirect = Direction::DOWN, const int opCodesToScan = 512, const ptrdiff_t occurrence = 1);
CMemory FollowNearCall(const ptrdiff_t opcodeOffset = 0x1, const ptrdiff_t nextInstructionOffset = 0x5) const;
CMemory FollowNearCallSelf(const ptrdiff_t opcodeOffset = 0x1, const ptrdiff_t nextInstructionOffset = 0x5);
CMemory ResolveRelativeAddress(const ptrdiff_t registerOffset = 0x0, const ptrdiff_t nextInstructionOffset = 0x4) const;

View File

@ -41,7 +41,7 @@ CModule::CModule(const string& svModuleName) : m_svModuleName(svModuleName)
// *szMask -
// Output : CMemory
//-----------------------------------------------------------------------------
CMemory CModule::FindPatternSIMD(const uint8_t* szPattern, const char* szMask, const ModuleSections_t& moduleSection, const uint32_t nOccurence) const
CMemory CModule::FindPatternSIMD(const uint8_t* szPattern, const char* szMask, const ModuleSections_t& moduleSection, const uint32_t nOccurrence) const
{
if (!m_ExecutableCode.IsSectionValid())
return CMemory();
@ -58,7 +58,7 @@ CMemory CModule::FindPatternSIMD(const uint8_t* szPattern, const char* szMask, c
const uint8_t* pData = reinterpret_cast<uint8_t*>(nBase);
const uint8_t* pEnd = pData + static_cast<uint32_t>(nSize) - strlen(szMask);
int nOccurenceCount = 0;
int nOccurrenceCount = 0;
int nMasks[64]; // 64*16 = enough masks for 1024 bytes.
const int iNumMasks = static_cast<int>(ceil(static_cast<float>(strlen(szMask)) / 16.f));
@ -92,11 +92,11 @@ CMemory CModule::FindPatternSIMD(const uint8_t* szPattern, const char* szMask, c
{
if ((i + 1) == iNumMasks)
{
if (nOccurenceCount == nOccurence)
if (nOccurrenceCount == nOccurrence)
{
return static_cast<CMemory>(const_cast<uint8_t*>(pData));
}
nOccurenceCount++;
nOccurrenceCount++;
}
}
else
@ -104,11 +104,11 @@ CMemory CModule::FindPatternSIMD(const uint8_t* szPattern, const char* szMask, c
goto cont;
}
}
if (nOccurenceCount == nOccurence)
if (nOccurrenceCount == nOccurrence)
{
return static_cast<CMemory>((&*(const_cast<uint8_t*>(pData))));
}
nOccurenceCount++;
nOccurrenceCount++;
}
}cont:;
}
@ -173,7 +173,7 @@ CMemory CModule::FindStringReadOnly(const string& svString, bool bNullTerminator
// bNullTerminator -
// Output : CMemory
//-----------------------------------------------------------------------------
CMemory CModule::FindString(const string& svString, const ptrdiff_t nOccurence, bool bNullTerminator) const
CMemory CModule::FindString(const string& svString, const ptrdiff_t nOccurrence, bool bNullTerminator) const
{
if (!m_ExecutableCode.IsSectionValid())
return CMemory();
@ -183,9 +183,9 @@ CMemory CModule::FindString(const string& svString, const ptrdiff_t nOccurence,
if (!stringAddress)
return CMemory();
uint8_t* pLatestOccurence = nullptr;
uint8_t* pLatestOccurrence = nullptr;
uint8_t* pTextStart = reinterpret_cast<uint8_t*>(m_ExecutableCode.m_pSectionBase); // Get the start of the .text section.
ptrdiff_t dOccurencesFound = 0;
ptrdiff_t dOccurrencesFound = 0;
for (size_t i = 0ull; i < m_ExecutableCode.m_nSectionSize - 0x5; i++)
{
@ -199,15 +199,15 @@ CMemory CModule::FindString(const string& svString, const ptrdiff_t nOccurence,
if (potentialLocation == stringAddress)
{
dOccurencesFound++;
if (nOccurence == dOccurencesFound)
dOccurrencesFound++;
if (nOccurrence == dOccurrencesFound)
return CMemory(&pTextStart[i]);
pLatestOccurence = &pTextStart[i]; // Stash latest occurence.
pLatestOccurrence = &pTextStart[i]; // Stash latest occurrence.
}
}
}
return CMemory(pLatestOccurence);
return CMemory(pLatestOccurrence);
}
//-----------------------------------------------------------------------------

View File

@ -22,9 +22,9 @@ public:
CModule(void) = default;
CModule(const string& moduleName);
CMemory FindPatternSIMD(const uint8_t* szPattern, const char* szMask, const ModuleSections_t& moduleSection = {}, const uint32_t nOccurence = 0) const;
CMemory FindPatternSIMD(const uint8_t* szPattern, const char* szMask, const ModuleSections_t& moduleSection = {}, const uint32_t nOccurrence = 0) const;
CMemory FindPatternSIMD(const string& svPattern, const ModuleSections_t& moduleSection = {}) const;
CMemory FindString(const string& string, const ptrdiff_t occurence = 1, bool nullTerminator = false) const;
CMemory FindString(const string& string, const ptrdiff_t occurrence = 1, bool nullTerminator = false) const;
CMemory FindStringReadOnly(const string& svString, bool nullTerminator) const;
CMemory GetVirtualMethodTable(const string& svTableName, const uint32_t nRefIndex = 0);

View File

@ -110,7 +110,7 @@ void HexDump(const char* szHeader, const char* szLogger, const void* pData, int
}
}
// Add timestamp.
// Add time stamp.
logger->set_level(spdlog::level::trace);
logger->set_pattern("%v [%H:%M:%S.%f]\n");
logger->trace("---------------------------------------------------------");
@ -368,12 +368,12 @@ string CreateDirectories(string svInput, bool bWindows)
}
///////////////////////////////////////////////////////////////////////////////
// For converting filepaths to windows filepaths.
// For converting file paths to windows file paths.
string ConvertToWinPath(const string& svInput)
{
string result = svInput;
// Flip forward slashes in filepath to windows-style backslash
// Flip forward slashes in file path to windows-style backslash
for (size_t i = 0; i < result.size(); i++)
{
if (result[i] == '/')
@ -385,12 +385,12 @@ string ConvertToWinPath(const string& svInput)
}
///////////////////////////////////////////////////////////////////////////////
// For converting filepaths to unix filepaths.
// For converting file paths to unix file paths.
string ConvertToUnixPath(const string& svInput)
{
string result = svInput;
// Flip windows-style backslashes in filepath to forward slash
// Flip windows-style backslashes in file path to forward slash
for (size_t i = 0; i < result.size(); i++)
{
if (result[i] == '\\')
@ -609,7 +609,7 @@ string StringEscape(const string& svInput)
}
///////////////////////////////////////////////////////////////////////////////
// For unescaping special characters in a string.
// For un-escaping special characters in a string.
string StringUnescape(const string& svInput)
{
string result;
@ -777,7 +777,7 @@ vector<int> IntToDigits(int iValue)
}
///////////////////////////////////////////////////////////////////////////////
// For printing __m128i datatypes.
// For printing __m128i data types.
void PrintM128i8(__m128i in)
{
alignas(16) uint8_t v[16];

View File

@ -248,11 +248,11 @@ uint8_t __fastcall RTech::DecompressPakFile(RPakDecompState_t* state, uint64_t i
LABEL_9:
dword6c_shl8 = (uint64_t)dword6C << 8;
dword6c_old = dword6C;
LUT_200_val = LUT_200[(uint8_t)byte + dword6c_shl8];// LUT_200 - u8 - ammount of bits
LUT_200_val = LUT_200[(uint8_t)byte + dword6c_shl8];// LUT_200 - u8 - amount of bits
v17 = (uint8_t)byte + dword6c_shl8;
byte_bit_offset += LUT_200_val;
byte_new = byte >> LUT_200_val;
LUT_0_VAL = LUT_0[v17];// LUT_0 - i32 - signed, ammount of bytes
LUT_0_VAL = LUT_0[v17];// LUT_0 - i32 - signed, amount of bytes
if (LUT_0_VAL < 0)
{
@ -277,7 +277,7 @@ uint8_t __fastcall RTech::DecompressPakFile(RPakDecompState_t* state, uint64_t i
if (byte_3bits)
{
LUT_4D0_480 = LUT_4D0[byte_3bits];// LUT_4D0 - u8
LUT_4D8_4C0_nBits = LUT_4D8[byte_3bits];// LUT_4D8 - u8 - ammount of bits
LUT_4D8_4C0_nBits = LUT_4D8[byte_3bits];// LUT_4D8 - u8 - amount of bits
}
else
{
@ -285,7 +285,7 @@ uint8_t __fastcall RTech::DecompressPakFile(RPakDecompState_t* state, uint64_t i
byte_4bits = v40 & 15;
byte_bit_offset += 4;
LUT_4D0_480 = LUT_480[byte_4bits];// LUT_480 - u32
LUT_4D8_4C0_nBits = LUT_4C0[byte_4bits]; // LUT_4C0 - u8 - ammount of bits???
LUT_4D8_4C0_nBits = LUT_4C0[byte_4bits]; // LUT_4C0 - u8 - amount of bits???
}
byte_bit_offset += LUT_4D8_4C0_nBits + 3;
@ -331,8 +331,8 @@ uint8_t __fastcall RTech::DecompressPakFile(RPakDecompState_t* state, uint64_t i
byte_4bits_1 = byte_new & 0xF;
dword6C = 0;
v21 = ((uint64_t)(uint32_t)byte_new >> (((uint32_t)(byte_4bits_1 + 0xFFFFFFE1) >> 3) & 6)) & 0x3F;// 6 bits after shift for who knows how much???
v22 = 1 << (byte_4bits_1 + ((byte_new >> 4) & ((24 * (((uint32_t)(byte_4bits_1 + 0xFFFFFFE1) >> 3) & 2)) >> 4)));// ammount of bits to read???
byte_bit_offset += (((uint32_t)(byte_4bits_1 + 0xFFFFFFE1) >> 3) & 6)// shit shit gets shifted by ammount of bits it read or something
v22 = 1 << (byte_4bits_1 + ((byte_new >> 4) & ((24 * (((uint32_t)(byte_4bits_1 + 0xFFFFFFE1) >> 3) & 2)) >> 4)));// amount of bits to read???
byte_bit_offset += (((uint32_t)(byte_4bits_1 + 0xFFFFFFE1) >> 3) & 6)// shit shit gets shifted by amount of bits it read or something
+ LUT_440[v21]
+ byte_4bits_1
+ ((byte_new >> 4) & ((24 * (((uint32_t)(byte_4bits_1 + 0xFFFFFFE1) >> 3) & 2)) >> 4));
@ -398,7 +398,7 @@ uint8_t __fastcall RTech::DecompressPakFile(RPakDecompState_t* state, uint64_t i
v54 = v49;
do
{
*(uint8_t*)out_seekd_1 = v53[out_seekd_1];// seekd = seek_back; increment ptrs
*(uint8_t*)out_seekd_1 = v53[out_seekd_1];// seeked = seek_back; increment ptrs
++out_seekd_1;
--v54;
} while (v54);
@ -604,7 +604,7 @@ void RTech::CreateDXTexture(RTechTextureInfo_t* textureHeader, int64_t imageData
#ifndef DEDICATED
//----------------------------------------------------------------------------------
// Purpose: start loading shader sets, assign vtable pointer
// Purpose: start loading shader sets, assign vftable pointer
//----------------------------------------------------------------------------------
void** RTech::LoadShaderSet(void** VTablePtr)
{

View File

@ -460,7 +460,7 @@ inline PSRWLOCK* g_pPakFileSlotLock;
inline pFileHandleTracker_t* m_FileHandles;
inline JobFifoLock_s* g_pPakFifoLock;
inline void* g_pPakFifoLockWrapper; // Pointer to function that takes the the global pak fifolock as argument.
inline void* g_pPakFifoLockWrapper; // Pointer to functor that takes the global pak fifolock as argument.
inline bool* g_bPakFifoLockAcquired;
class RTech

View File

@ -12,7 +12,7 @@
//---------------------------------------------------------------------------------
// Purpose: registers and exposes code functions to target context
// Input : *sqvm -
// Input : *pSquirrelVM -
// *szName -
// *szHelpString -
// *szRetValType -
@ -40,7 +40,7 @@ SQRESULT Script_RegisterFunction(CSquirrelVM* pSquirrelVM, const SQChar* szScrip
#ifndef CLIENT_DLL
//---------------------------------------------------------------------------------
// Purpose: registers script functions in SERVER context
// Input : *sqvm -
// Input : *pSquirrelVM -
//---------------------------------------------------------------------------------
void Script_RegisterServerFunctions(CSquirrelVM* pSquirrelVM)
{
@ -60,7 +60,7 @@ void Script_RegisterServerFunctions(CSquirrelVM* pSquirrelVM)
#ifndef DEDICATED
//---------------------------------------------------------------------------------
// Purpose: registers script functions in CLIENT context
// Input : *sqvm -
// Input : *pSquirrelVM -
//---------------------------------------------------------------------------------
void Script_RegisterClientFunctions(CSquirrelVM* pSquirrelVM)
{
@ -75,7 +75,7 @@ void Script_RegisterClientFunctions(CSquirrelVM* pSquirrelVM)
//---------------------------------------------------------------------------------
// Purpose: registers script functions in UI context
// Input : *sqvm -
// Input : *pSquirrelVM -
//---------------------------------------------------------------------------------
void Script_RegisterUIFunctions(CSquirrelVM* pSquirrelVM)
{
@ -111,7 +111,7 @@ void Script_RegisterUIFunctions(CSquirrelVM* pSquirrelVM)
//---------------------------------------------------------------------------------
// Purpose: Initialize all CLIENT/UI global structs and register SDK (CLIENT/UI) script functions
// Input : *sqvm -
// Input : *pSquirrelVM -
// context - (1 = CLIENT 2 = UI)
//---------------------------------------------------------------------------------
SQRESULT Script_InitializeCLGlobalStructs(CSquirrelVM* pSquirrelVM, SQCONTEXT context)
@ -128,7 +128,7 @@ SQRESULT Script_InitializeCLGlobalStructs(CSquirrelVM* pSquirrelVM, SQCONTEXT co
#ifndef CLIENT_DLL
//---------------------------------------------------------------------------------
// Purpose: Initialize all SERVER global structs and register SDK (SERVER) script functions
// Input : *sqvm -
// Input : *pSquirrelVM -
//---------------------------------------------------------------------------------
void Script_InitializeSVGlobalStructs(CSquirrelVM* pSquirrelVM)
{
@ -154,12 +154,12 @@ SQBool Script_CreateServerVM()
#ifndef DEDICATED
//---------------------------------------------------------------------------------
// Purpose: Creates the CLIENT Squirrel VM
// Input : *hlclient -
// Input : *pHlClient -
// Output : True on success, false on failure
//---------------------------------------------------------------------------------
SQBool Script_CreateClientVM(CHLClient* hlclient)
SQBool Script_CreateClientVM(CHLClient* pHlClient)
{
SQBool results = v_Script_CreateClientVM(hlclient);
SQBool results = v_Script_CreateClientVM(pHlClient);
if (results)
DevMsg(eDLL_T::CLIENT, "Created CLIENT VM: '%p'\n", g_pClientScript.GetValue<CSquirrelVM*>());
else
@ -221,7 +221,7 @@ SQInteger Script_LoadRson(const SQChar* szRsonName)
//---------------------------------------------------------------------------------
// Purpose: prints the scripts the compiler loads from global include to be compiled
// Input : *sqvm -
// Input : *v -
// *szScriptPath -
// *szScriptName -
// nFlag -

View File

@ -55,9 +55,9 @@ namespace IO
// Scan the stream for a given signature
int64_t SignatureScan(const String& Signature, uint64_t Offset, uint64_t Count);
// Scan the process for a given signature (All occurences)
// Scan the process for a given signature (All occurrences)
List<int64_t> SignatureScanAll(const String& Signature);
// Scan the process for a given signature (All occurences)
// Scan the process for a given signature (All occurrences)
List<int64_t> SignatureScanAll(const String& Signature, uint64_t Offset, uint64_t Count);
// Get the underlying stream

View File

@ -70,7 +70,7 @@ namespace Data
// Search for the pattern in the given buffer
int64_t Search(uint8_t* Buffer, uint64_t Offset, uint64_t Size);
// Search for all occurences of the pattern in the given buffer
// Search for all occurrences of the pattern in the given buffer
List<int64_t> SearchAll(uint8_t* Buffer, uint64_t Offset, uint64_t Size);
private:

View File

@ -52,9 +52,9 @@ namespace IO
// Scan the process for a given signature
int64_t SignatureScan(const String& Signature, uint64_t Address, uint64_t Count);
// Scan the process for a given signature (All occurences)
// Scan the process for a given signature (All occurrences)
List<int64_t> SignatureScanAll(const String& Signature, bool ScanAllMemory = false);
// Scan the process for a given signature (All occurences)
// Scan the process for a given signature (All occurrences)
List<int64_t> SignatureScanAll(const String& Signature, uint64_t Address, uint64_t Count);
// Whether or not the process is running

View File

@ -45,13 +45,13 @@ public:
// Checks the string for equality, returns 0 when a match is found
constexpr int32_t Compare(std::basic_string_view<Tchar> Rhs) const noexcept;
// Creates an array of strings by splitting this string at each occurence of the separator
// Creates an array of strings by splitting this string at each occurrence of the separator
constexpr List<StringBase<Tchar>> Split(const Tchar Separator) const;
// Creates an array of strings by splitting this string at each occurence of the separator
// Creates an array of strings by splitting this string at each occurrence of the separator
constexpr List<StringBase<Tchar>> Split(const Tchar* Separator) const;
// Creates an array of strings by splitting this string at each occurence of the separator
// Creates an array of strings by splitting this string at each occurrence of the separator
constexpr List<StringBase<Tchar>> Split(const StringBase<Tchar>& Separator) const;
// Creates an array of strings by splitting this string at each occurence of the separator
// Creates an array of strings by splitting this string at each occurrence of the separator
constexpr List<StringBase<Tchar>> Split(const std::basic_string_view<Tchar> Separator) const;
// Trims the whitespace from both ends of the string
@ -61,34 +61,34 @@ public:
// Trims the whitespace from the end of the string
constexpr StringBase<Tchar> TrimEnd() const;
// Returns the index of the first occurance of value in the current instance
// Returns the index of the first occurrence of value in the current instance
constexpr uint32_t IndexOf(const Tchar Rhs, uint32_t Pos = 0) const noexcept;
// Returns the index of the first occurance of value in the current instance
// Returns the index of the first occurrence of value in the current instance
constexpr uint32_t IndexOf(const Tchar* Rhs, uint32_t Pos = 0) const;
// Returns the index of the first occurance of value in the current instance
// Returns the index of the first occurrence of value in the current instance
constexpr uint32_t IndexOf(const Tchar* Rhs, uint32_t Pos, uint32_t Count) const;
// Returns the index of the first occurance of value in the current instance
// Returns the index of the first occurrence of value in the current instance
constexpr uint32_t IndexOf(const StringBase<Tchar>& Rhs, uint32_t Pos = 0) const noexcept;
// Returns the index of the first occurance of value in the current instance
// Returns the index of the first occurrence of value in the current instance
constexpr uint32_t IndexOf(const StringBase<Tchar>& Rhs, uint32_t Pos, uint32_t Count) const noexcept;
// Returns the index of the first occurance of value in the current instance
// Returns the index of the first occurrence of value in the current instance
constexpr uint32_t IndexOf(std::basic_string_view<Tchar> Rhs, uint32_t Pos = 0) const noexcept;
// Returns the index of the first occurance of value in the current instance
// Returns the index of the first occurrence of value in the current instance
constexpr uint32_t IndexOf(std::basic_string_view<Tchar> Rhs, uint32_t Pos, uint32_t Count) const noexcept;
// Returns the index of the last occurance of value in the current instance
// Returns the index of the last occurrence of value in the current instance
constexpr uint32_t LastIndexOf(const Tchar Rhs, uint32_t Pos = 0) const noexcept;
// Returns the index of the last occurance of value in the current instance
// Returns the index of the last occurrence of value in the current instance
constexpr uint32_t LastIndexOf(const Tchar* Rhs, uint32_t Pos = 0) const;
// Returns the index of the last occurance of value in the current instance
// Returns the index of the last occurrence of value in the current instance
constexpr uint32_t LastIndexOf(const Tchar* Rhs, uint32_t Pos, uint32_t Count) const;
// Returns the index of the last occurance of value in the current instance
// Returns the index of the last occurrence of value in the current instance
constexpr uint32_t LastIndexOf(const StringBase<Tchar>& Rhs, uint32_t Pos = 0) const noexcept;
// Returns the index of the last occurance of value in the current instance
// Returns the index of the last occurrence of value in the current instance
constexpr uint32_t LastIndexOf(const StringBase<Tchar>& Rhs, uint32_t Pos, uint32_t Count) const noexcept;
// Returns the index of the last occurance of value in the current instance
// Returns the index of the last occurrence of value in the current instance
constexpr uint32_t LastIndexOf(std::basic_string_view<Tchar> Rhs, uint32_t Pos = 0) const noexcept;
// Returns the index of the last occurance of value in the current instance
// Returns the index of the last occurrence of value in the current instance
constexpr uint32_t LastIndexOf(std::basic_string_view<Tchar> Rhs, uint32_t Pos, uint32_t Count) const noexcept;
// Creates a copy of this string in lower case
@ -466,7 +466,7 @@ inline constexpr List<StringBase<Tchar>> StringBase<Tchar>::Split(const Tchar De
uint32_t CurrentIndex = 0, LocatedPosition = 0;
// Optimized for large strings and lots of occurences
// Optimized for large strings and lots of occurrences
while ((LocatedPosition = this->IndexOf(Delimiter, CurrentIndex)) != StringBase<Tchar>::InvalidPosition)
{
Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex));
@ -494,7 +494,7 @@ inline constexpr List<StringBase<Tchar>> StringBase<Tchar>::Split(const Tchar* S
else if constexpr (sizeof(Tchar) == sizeof(wchar_t))
LhsSize = (uint32_t)wcslen(Separator);
// Optimized for large strings and lots of occurences
// Optimized for large strings and lots of occurrences
while ((LocatedPosition = this->IndexOf(Separator, CurrentIndex)) != StringBase<Tchar>::InvalidPosition)
{
Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex));
@ -518,7 +518,7 @@ inline constexpr List<StringBase<Tchar>> StringBase<Tchar>::Split(const StringBa
auto LhsSize = Separator._StoreSize;
// Optimized for large strings and lots of occurences
// Optimized for large strings and lots of occurrences
while ((LocatedPosition = this->IndexOf(Separator, CurrentIndex)) != StringBase<Tchar>::InvalidPosition)
{
Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex));
@ -542,7 +542,7 @@ inline constexpr List<StringBase<Tchar>> StringBase<Tchar>::Split(const std::bas
auto LhsSize = Separator.size();
// Optimized for large strings and lots of occurences
// Optimized for large strings and lots of occurrences
while ((LocatedPosition = this->IndexOf(Separator, CurrentIndex)) != StringBase<Tchar>::InvalidPosition)
{
Result.Emplace(this->SubString(CurrentIndex, LocatedPosition - CurrentIndex));
@ -1072,7 +1072,7 @@ inline constexpr StringBase<Tchar> StringBase<Tchar>::Replace(const Tchar* Old,
auto Result = StringBase<Tchar>();
// Optimized for large strings and lots of occurences
// Optimized for large strings and lots of occurrences
while ((LocatedPosition = this->IndexOf(Old, CurrentIndex)) != StringBase<Tchar>::InvalidPosition)
{
Result += this->SubString(CurrentIndex, LocatedPosition - CurrentIndex);
@ -1096,7 +1096,7 @@ inline constexpr StringBase<Tchar> StringBase<Tchar>::Replace(const StringBase<T
auto Result = StringBase<Tchar>();
// Optimized for large strings and lots of occurences
// Optimized for large strings and lots of occurrences
while ((LocatedPosition = this->IndexOf(Old, CurrentIndex)) != StringBase<Tchar>::InvalidPosition)
{
Result += this->SubString(CurrentIndex, LocatedPosition - CurrentIndex);
@ -1120,7 +1120,7 @@ inline constexpr StringBase<Tchar> StringBase<Tchar>::Replace(std::basic_string_
auto Result = StringBase<Tchar>();
// Optimized for large strings and lots of occurences
// Optimized for large strings and lots of occurrences
while ((LocatedPosition = this->IndexOf(Old, CurrentIndex)) != StringBase<Tchar>::InvalidPosition)
{
Result += this->SubString(CurrentIndex, LocatedPosition - CurrentIndex);

View File

@ -512,7 +512,7 @@ namespace lzham
return cInvalidIndex;
}
inline uint count_occurences(const T& key) const
inline uint count_occurrences(const T& key) const
{
uint c = 0;

View File

@ -625,7 +625,7 @@ public:
nLogProcsPerPkg = ( cpu.Ebx() & LogicalProcessorCount ) >> 16;
// Determine the total number of cores per package. This info
// is extracted differently dependending on the cpu vendor.
// is extracted differently depending on the cpu vendor.
if( Cpuid::IsVendor( GenuineIntel ) )
{
if( cpu.Call( Cpuid::Std, 4 ) )
@ -648,7 +648,7 @@ public:
DWORD msbWidth = cpu.Ecx() & ApicIdCoreIdSize_Amd;
if( msbWidth )
{
// Set nCoresPerPkg to the maximum theortical number of cores
// Set nCoresPerPkg to the maximum theoretical number of cores
// the processor package can support (2 ^ width) so the APIC
// extractor object can be configured to extract the proper
// values from an APIC.
@ -868,7 +868,7 @@ private:
// Desc: Adds the package/core id extracted from the APIC ID at m_apicIds[idx]
// in the if the package/core id is unique to the pkgCoreIds array.
// nPkgCore is an in/out parm that will reflect the total number of items
// in pkgCoreIds array. It will be incrememted if a unique package/core
// in pkgCoreIds array. It will be incremented if a unique package/core
// id is found and added.
//-----------------------------------------------------------------------------
void AddUniquePkgCoreId_( DWORD idx, BYTE* pkgCoreIds, DWORD& nPkgCoreIds ) const

View File

@ -5,9 +5,9 @@
//=============================================================================//
// This class is set up to run before each frame (main thread).
// Commited tasks are scheduled to execute after 'i' frames.
// Committed tasks are scheduled to execute after 'i' frames.
// ----------------------------------------------------------------------------
// A usecase for scheduling tasks in the main thread would be (for example)
// A use case for scheduling tasks in the main thread would be (for example)
// calling 'KeyValues::ParsePlaylists(...)' from the render thread.
//=============================================================================//
class CFrameTask : public IFrameTask

View File

@ -465,7 +465,7 @@ inline int64 CastPtrToInt64(const void* p)
#define EXPLICIT explicit
#define NO_VTABLE __declspec( novtable )
// gcc doesn't allow storage specifiers on explicit template instatiation, but visual studio needs them to avoid link errors.
// gcc doesn't allow storage specifiers on explicit template instantiation, but visual studio needs them to avoid link errors.
#define TEMPLATE_STATIC static
// Used for dll exporting and importing
@ -480,8 +480,8 @@ inline int64 CastPtrToInt64(const void* p)
#define DLL_GLOBAL_EXPORT extern __declspec( dllexport )
#define DLL_GLOBAL_IMPORT extern __declspec( dllimport )
// Pass hints to the compiler to prevent it from generating unnessecary / stupid code
// in certain situations. Several compilers other than MSVC also have an equivilent
// Pass hints to the compiler to prevent it from generating unnecessary / stupid code
// in certain situations. Several compilers other than MSVC also have an equivalent
// construct.
//
// Essentially the 'Hint' is that the condition specified is assumed to be true at
@ -495,7 +495,7 @@ inline int64 CastPtrToInt64(const void* p)
// GCC had a few areas where it didn't construct objects in the same order
// that Windows does. So when CVProfile::CVProfile() would access g_pMemAlloc,
// it would crash because the allocator wasn't initalized yet.
// it would crash because the allocator wasn't initialized yet.
#define CONSTRUCT_EARLY
#define SELECTANY __declspec(selectany)
@ -748,7 +748,7 @@ inline void Destruct(float __attribute__((__vector_size__(16)))* pMemory)
//-----------------------------------------------------------------------------
struct CPUInformation
{
int m_Size; // Size of this structure, for forward compatability.
int m_Size; // Size of this structure, for forward compatibility.
uint8_t m_nLogicalProcessors; // Number op logical processors.
uint8_t m_nPhysicalProcessors; // Number of physical processors

View File

@ -1,6 +1,6 @@
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose: Random number generator
// Purpose: Thread tools
//
// $Workfile: $
// $NoKeywords: $

View File

@ -100,7 +100,7 @@ void ConVar::Init(void) const
navmesh_draw_poly_bounds_inner = ConVar::Create("navmesh_draw_poly_bounds_inner" , "0" , FCVAR_DEVELOPMENTONLY, "Draws the inner bounds of the NavMesh polys (requires navmesh_draw_poly_bounds).", false, 0.f, false, 0.f, nullptr, "Index: > 0 && < mesh->m_tileCount");
#endif // !DEDICATED
sv_showconnecting = ConVar::Create("sv_showconnecting" , "1", FCVAR_RELEASE, "Logs information about the connecting client to the console.", false, 0.f, false, 0.f, nullptr, nullptr);
sv_pylonVisibility = ConVar::Create("sv_pylonVisibility", "0", FCVAR_RELEASE, "Determines the visiblity to the Pylon master server.", false, 0.f, false, 0.f, nullptr, "0 = Offline, 1 = Hidden, 2 = Public.");
sv_pylonVisibility = ConVar::Create("sv_pylonVisibility", "0", FCVAR_RELEASE, "Determines the visibility to the Pylon master server.", false, 0.f, false, 0.f, nullptr, "0 = Offline, 1 = Hidden, 2 = Public.");
sv_pylonRefreshInterval = ConVar::Create("sv_pylonRefreshInterval" , "5.0", FCVAR_RELEASE, "Pylon server host request post update interval (seconds).", true, 2.f, true, 8.f, nullptr, nullptr);
sv_banlistRefreshInterval = ConVar::Create("sv_banlistRefreshInterval", "1.0", FCVAR_RELEASE, "Banlist refresh interval (seconds).", true, 1.f, false, 0.f, nullptr, nullptr);
sv_statusRefreshInterval = ConVar::Create("sv_statusRefreshInterval" , "0.5", FCVAR_RELEASE, "Server status bar update interval (seconds).", false, 0.f, false, 0.f, nullptr, nullptr);

View File

@ -233,7 +233,7 @@ const char* CCommand::operator[](int nIndex) const
}
//-----------------------------------------------------------------------------
// Purpose: returns max command lenght
// Purpose: returns max command length
//-----------------------------------------------------------------------------
int CCommand::MaxCommandLength(void) const
{

View File

@ -916,7 +916,7 @@ CConCommandHash::CCommandHashHandle_t CConCommandHash::Find(const ConCommandBase
{
// Set this #if to 1 if the assert at bottom starts whining --
// that indicates that a console command is being double-registered,
// or something similarly nonfatally bad. With this #if 1, we'll search
// or something similarly non-fatally bad. With this #if 1, we'll search
// by name instead of by pointer, which is more robust in the face
// of double registered commands, but obviously slower.
#if 0

View File

@ -66,7 +66,7 @@ inline unsigned HashIntConventional(const int n) // faster but less effective
template <typename T>
inline unsigned HashItem(const T& item)
{
// TODO: Confirm comiler optimizes out unused paths
// TODO: Confirm compiler optimizes out unused paths
if (sizeof(item) == 4)
return Hash4(&item);
else if (sizeof(item) == 8)

View File

@ -127,7 +127,7 @@ public:
// invalid index (M will never allocate an element at this index)
inline static S InvalidIndex() { return (S)M::InvalidIndex(); }
// Is a given index valid to use? (representible by S and not the invalid index)
// Is a given index valid to use? (representable by S and not the invalid index)
static bool IndexInRange(I index);
inline static size_t ElementSize() { return sizeof(ListElem_t); }
@ -758,7 +758,7 @@ void CUtlLinkedList<T, S, ML, I, M>::LinkBefore(I before, I elem)
// The element *after* our newly linked one is the one we linked before.
pNewElem->m_Next = before;
S newElem_mPrevious; // we need to hang on to this for the compairson against InvalidIndex()
S newElem_mPrevious; // we need to hang on to this for the comparison against InvalidIndex()
// below; otherwise we get a a load-hit-store on pNewElem->m_Previous, even
// with
if (before == InvalidIndex())
@ -880,7 +880,7 @@ inline void CUtlLinkedList<T, S, ML, I, M>::LinkToTail(I elem)
//-----------------------------------------------------------------------------
// Class to drop in to replace a CUtlLinkedList that needs to be more memory agressive
// Class to drop in to replace a CUtlLinkedList that needs to be more memory aggressive
//-----------------------------------------------------------------------------
DECLARE_POINTER_HANDLE(UtlPtrLinkedListIndex_t); // to enforce correct usage

View File

@ -427,7 +427,7 @@ template< class T, class I >
CUtlMemory<T, I>::CUtlMemory(T* pMemory, ssize_t numElements) : m_pMemory(pMemory),
m_nAllocationCount(numElements)
{
// Special marker indicating externally supplied modifyable memory
// Special marker indicating externally supplied modifiable memory
m_nGrowSize = EXTERNAL_BUFFER_MARKER;
}
@ -435,7 +435,7 @@ template< class T, class I >
CUtlMemory<T, I>::CUtlMemory(const T* pMemory, ssize_t numElements) : m_pMemory((T*)pMemory),
m_nAllocationCount(numElements)
{
// Special marker indicating externally supplied modifyable memory
// Special marker indicating externally supplied modifiable memory
m_nGrowSize = EXTERNAL_CONST_BUFFER_MARKER;
}

View File

@ -1142,7 +1142,7 @@ void CUtlRBTree<T, I, L, M>::RemoveAll()
}
if (it == m_LastAlloc)
break; // don't destruct elements that haven't ever been constucted
break; // don't destruct elements that haven't ever been constructed
}
// Clear everything else out

View File

@ -321,7 +321,7 @@ public:
//-----------------------------------------------------------------------------
// The CUtlVectorUltra Conservative class:
// A array class with a very conservative allocation scheme, with customizable allocator
// Especialy useful if you have a lot of vectors that are sparse, or if you're
// Especially useful if you have a lot of vectors that are sparse, or if you're
// carefully packing holders of vectors
//-----------------------------------------------------------------------------
#pragma warning(push)

View File

@ -37,7 +37,7 @@ void CPackedStore::InitLzDecompParams(void)
}
//-----------------------------------------------------------------------------
// Purpose: gets a directory structure for sepcified file
// Purpose: gets a directory structure for specified file
// Input : svPackDirFile -
// Output : VPKDir_t
//-----------------------------------------------------------------------------
@ -218,7 +218,7 @@ string CPackedStore::GetSourceName(const string& svDirectoryName) const
}
//-----------------------------------------------------------------------------
// Purpose: gets the manifest file assosiated with the VPK name
// Purpose: gets the manifest file associated with the VPK name
// Input : &svWorkSpace -
// &svManifestName -
// Output : json
@ -528,7 +528,7 @@ void CPackedStore::PackAll(const VPKPair_t& vPair, const string& svPathIn, const
}
}
}
DevMsg(eDLL_T::FS, "*** Build block totalling '%zu' bytes with '%zu' shared bytes among '%lu' chunks\n", writer.GetPosition(), nSharedTotal, nSharedCount);
DevMsg(eDLL_T::FS, "*** Build block totaling '%zu' bytes with '%zu' shared bytes among '%lu' chunks\n", writer.GetPosition(), nSharedTotal, nSharedCount);
m_mChunkHashMap.clear();
VPKDir_t vDir = VPKDir_t();
@ -825,7 +825,7 @@ void VPKDir_t::Build(const string& svDirectoryFile, const vector<VPKEntryBlock_t
writer.Write(this->m_vHeader.m_nDirectorySize);
writer.Write(0);
DevMsg(eDLL_T::FS, "*** Build directory totalling '%zu' bytes with '%zu' entries and '%zu' descriptors\n",
DevMsg(eDLL_T::FS, "*** Build directory totaling '%zu' bytes with '%zu' entries and '%zu' descriptors\n",
size_t(sizeof(VPKDirHeader_t) + m_vHeader.m_nDirectorySize), vEntryBlocks.size(), nDescriptors);
}
///////////////////////////////////////////////////////////////////////////////

View File

@ -238,7 +238,6 @@
<ClInclude Include="..\mathlib\fbits.h" />
<ClInclude Include="..\mathlib\color.h" />
<ClInclude Include="..\mathlib\crc32.h" />
<ClInclude Include="..\mathlib\float_tools.h" />
<ClInclude Include="..\mathlib\fltx4.h" />
<ClInclude Include="..\mathlib\halton.h" />
<ClInclude Include="..\mathlib\IceKey.H" />

View File

@ -1700,9 +1700,6 @@
<ClInclude Include="..\tier2\meshutils.h">
<Filter>sdk\tier2</Filter>
</ClInclude>
<ClInclude Include="..\mathlib\float_tools.h">
<Filter>sdk\mathlib</Filter>
</ClInclude>
<ClInclude Include="..\mathlib\fltx4.h">
<Filter>sdk\mathlib</Filter>
</ClInclude>

View File

@ -134,7 +134,7 @@ Host_KickID_f
*/
void Host_KickID_f(const CCommand& args)
{
if (args.ArgC() < 2) // Do we atleast have 2 arguments?
if (args.ArgC() < 2) // Do we at least have 2 arguments?
{
return;
}
@ -317,7 +317,7 @@ void Host_Unban_f(const CCommand& args)
try
{
if (args.HasOnlyDigits(1)) // Check if we have an ip address or origin ID.
if (args.HasOnlyDigits(1)) // Check if we have an ip address or nucleus id.
{
if (g_pBanSystem->DeleteEntry("noIP", std::stoll(args.Arg(1)))) // Delete ban entry.
{
@ -365,7 +365,7 @@ Host_ReloadBanList_f
*/
void Host_ReloadBanList_f(const CCommand& args)
{
g_pBanSystem->Load(); // Reload banlist.
g_pBanSystem->Load(); // Reload banned list.
}
/*
@ -938,7 +938,7 @@ void SQVM_ClientScript_f(const CCommand& args)
=====================
SQVM_UIScript_f
Exectutes input on the
Executes input on the
VM in UI context.
=====================
*/

View File

@ -8,7 +8,6 @@
#include "core/stdafx.h"
#include "vstdlib/random.h"
#include <math.h>
#include "tier0/dbg.h"
#define IA 16807

View File

@ -397,7 +397,7 @@ HRESULT __stdcall Present(IDXGISwapChain* pSwapChain, UINT nSyncInterval, UINT n
if (!g_oWndProc)
{ // Only initialize HwndProc pointer once to avoid stack overflow during ResizeBuffers(..)
SetupImGui(); // Don't re-init imgui everytime.
SetupImGui(); // Don't re-init imgui every time.
g_oWndProc = (WNDPROC)SetWindowLongPtr(g_hGameWindow, GWLP_WNDPROC, (LONG_PTR)HwndProc);
}

View File

@ -42,7 +42,7 @@ HPeekMessage(
_In_ UINT wRemoveMsg)
{
#ifdef DEDICATED
// Return false for dedicated to reduce unneccesary overhead when calling 'PeekMessageA/W()' every frame.
// Return false for dedicated to reduce unnecessary overhead when calling 'PeekMessageA/W()' every frame.
return NULL;
#else
return VPeekMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);