Original, unedited source-code for budding modders out there.
Originally created in order to aid those attempting to fix the 'SwapEndian' error with C++11 and later versions (link points to a question on Stack Overflow by me), but also because I keep losing the original source-code :-).
Feel free to fork and create your own game mod :-).
From the CryEngine Forums:
static void SvMaxPlayers(ICVar* cvar)
{
int value = cvar->GetIVal();
if (value < 2)
{
value=2;
cvar->Set(value);
return;
}
}
pConsole->GetCVar("sv_maxplayers")->SetOnChangeCallback(SvMaxPlayers);
Goes in GameCVars.cpp.
Common Issues:
Open StlUtls.h
(Code\CryEngine\CryCommon), and add another at line 21 with #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
.
Comment-out lines 414 to 430 in CryArray.h
(Code\CryEngine\CryCommon).
Include <functional>
(#include <functional>
) in GrabHandler.h
(Code\GrabHandler.h
).