Reversed CCommandLine members

Fixed wrong order of 'CCommandLine::ParmValue()' methods. Float overload was first, char const* last.
Added reversed members (confirmed size of 2096 bytes).
This commit is contained in:
Kawe Mazidjatari 2022-06-24 02:42:28 +02:00
parent 1da841d4dd
commit ef454ac126
8 changed files with 30 additions and 5 deletions

View File

@ -83,20 +83,20 @@ void CCommandLine::AppendParm(const char* pszParm, const char* pszValues)
//-----------------------------------------------------------------------------
// Purpose: returns the argument after the one specified, or the default if not found
//-----------------------------------------------------------------------------
const char* CCommandLine::ParmValue(const char* psz, const char* pDefaultVal)
float CCommandLine::ParmValue(const char* psz, float flDefaultVal)
{
static int index = 7;
return CallVFunc<const char*>(index, this, psz, pDefaultVal);
return CallVFunc<float>(index, this, psz, flDefaultVal);
}
int CCommandLine::ParmValue(const char* psz, int nDefaultVal)
{
static int index = 8;
return CallVFunc<int>(index, this, psz, nDefaultVal);
}
float CCommandLine::ParmValue(const char* psz, float flDefaultVal)
const char* CCommandLine::ParmValue(const char* psz, const char* pDefaultVal)
{
static int index = 9;
return CallVFunc<float>(index, this, psz, flDefaultVal);
return CallVFunc<const char*>(index, this, psz, pDefaultVal);
}
//-----------------------------------------------------------------------------

View File

@ -1,6 +1,7 @@
#pragma once
#include "public/include/icommandline.h"
class CCommandLine // VTABLE @0x141369C78 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
class CCommandLine : public ICommandLine // VTABLE @0x141369C78 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
{
public:
void CreateCmdLine(const char* pszCommandline);
@ -17,6 +18,18 @@ public:
int FindParm(const char* psz);
const char* GetParm(int nIndex);
void SetParm(int nIndex, char const* pParm);
private:
enum
{
MAX_PARAMETER_LEN = 128,
MAX_PARAMETERS = 256,
};
char* m_pszCmdLine;
char m_Pad[0x18];
int m_nParmCount;
char* m_ppParms[MAX_PARAMETERS];
};
extern CCommandLine* g_pCmdLine;

View File

@ -209,6 +209,7 @@
<ClInclude Include="..\public\include\const.h" />
<ClInclude Include="..\public\include\edict.h" />
<ClInclude Include="..\public\include\globalvars_base.h" />
<ClInclude Include="..\public\include\icommandline.h" />
<ClInclude Include="..\public\include\inetchannel.h" />
<ClInclude Include="..\public\include\inetmsghandler.h" />
<ClInclude Include="..\public\include\ivrenderview.h" />

View File

@ -1523,6 +1523,9 @@
<ClInclude Include="..\tier0\platform_internal.h">
<Filter>sdk\tier0</Filter>
</ClInclude>
<ClInclude Include="..\public\include\icommandline.h">
<Filter>sdk\public\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="..\shared\resource\lockedserver.png">

View File

@ -204,6 +204,7 @@
<ClInclude Include="..\public\include\const.h" />
<ClInclude Include="..\public\include\edict.h" />
<ClInclude Include="..\public\include\globalvars_base.h" />
<ClInclude Include="..\public\include\icommandline.h" />
<ClInclude Include="..\public\include\inetchannel.h" />
<ClInclude Include="..\public\include\inetmsghandler.h" />
<ClInclude Include="..\public\include\iserver.h" />

View File

@ -1125,6 +1125,9 @@
<ClInclude Include="..\tier0\platform_internal.h">
<Filter>sdk\tier0</Filter>
</ClInclude>
<ClInclude Include="..\public\include\icommandline.h">
<Filter>sdk\public\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\common\opcodes.cpp">

View File

@ -226,6 +226,7 @@
<ClInclude Include="..\public\include\edict.h" />
<ClInclude Include="..\public\include\globalvars_base.h" />
<ClInclude Include="..\public\include\icliententitylist.h" />
<ClInclude Include="..\public\include\icommandline.h" />
<ClInclude Include="..\public\include\inetchannel.h" />
<ClInclude Include="..\public\include\inetmsghandler.h" />
<ClInclude Include="..\public\include\iserver.h" />

View File

@ -1586,6 +1586,9 @@
<ClInclude Include="..\tier0\platform_internal.h">
<Filter>sdk\tier0</Filter>
</ClInclude>
<ClInclude Include="..\public\include\icommandline.h">
<Filter>sdk\public\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="..\shared\resource\lockedserver.png">