2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-04 02:55:50 +03:00

Merge pull request #358 from dreamstalker/fixes_unrechable

Fixed most of unrechable code.
This commit is contained in:
Lev 2017-02-15 08:22:06 +05:00 committed by GitHub
commit 94fb06f95b
11 changed files with 64 additions and 89 deletions

View File

@ -419,7 +419,7 @@ int DELTA_TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
delta_description_t *pTest; delta_description_t *pTest;
int fieldType; int fieldType;
int fieldCount = pFields->fieldCount; int fieldCount = pFields->fieldCount;
int length; int length = 0;
int different; int different;
int neededBits = 0; int neededBits = 0;
int highestBit = -1; int highestBit = -1;
@ -1155,7 +1155,6 @@ qboolean DELTA_ParseType(delta_description_t *pdelta, char **pstream)
// We are hit the end of the stream // We are hit the end of the stream
Sys_Error("%s: Expecting fieldtype info\n", __func__); // Was Con_Printf here Sys_Error("%s: Expecting fieldtype info\n", __func__); // Was Con_Printf here
return FALSE;
} }
qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link_t *pField, char **pstream) qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link_t *pField, char **pstream)
@ -1216,7 +1215,6 @@ qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link
if (Q_stricmp(com_token, ")")) if (Q_stricmp(com_token, ")"))
{ {
Sys_Error("%s: Expecting ), got %s\n", __func__, com_token); // Was Con_Printf here Sys_Error("%s: Expecting ), got %s\n", __func__, com_token); // Was Con_Printf here
return FALSE;
} }
*pstream = COM_Parse(*pstream); *pstream = COM_Parse(*pstream);
@ -1429,7 +1427,6 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
if (Q_stricmp(com_token, "{")) if (Q_stricmp(com_token, "{"))
{ {
Sys_Error("%s: Expecting {, got %s\n", __func__, com_token); // Was Con_Printf here Sys_Error("%s: Expecting {, got %s\n", __func__, com_token); // Was Con_Printf here
return FALSE;
} }
if (!DELTA_ParseOneField(&pstream, &links, count, pdefinition)) if (!DELTA_ParseOneField(&pstream, &links, count, pdefinition))
{ {

View File

@ -31,7 +31,6 @@ unsigned int DELTAJIT_GetFieldSize(delta_description_t* desc) {
default: default:
Sys_Error("%s: Unknown delta field type %d", __func__, desc->fieldType); Sys_Error("%s: Unknown delta field type %d", __func__, desc->fieldType);
return 0;
} }
} }

View File

@ -1358,7 +1358,7 @@ int Netchan_CreateFileFragments_(qboolean server, netchan_t *chan, const char *f
else else
{ {
rehlds_syserror("%s: Reverse clientside code", __func__); rehlds_syserror("%s: Reverse clientside code", __func__);
return 0; //return 0;
} }
} }

View File

@ -1053,20 +1053,15 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
"Reduce the number of brush models and/or regular models in the map to correct this.", __func__, "Reduce the number of brush models and/or regular models in the map to correct this.", __func__,
s, MAX_SOUNDS); s, MAX_SOUNDS);
} }
else
{
// precaching not enabled. check if already exists.
for (i = 0; i < MAX_SOUNDS; i++)
{
if (g_psv.sound_precache[i] && !Q_stricmp(g_psv.sound_precache[i], s))
return i;
}
Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, s); // precaching not enabled. check if already exists.
for (i = 0; i < MAX_SOUNDS; i++)
{
if (g_psv.sound_precache[i] && !Q_stricmp(g_psv.sound_precache[i], s))
return i;
} }
// unreach Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, s);
return -1;
} }
unsigned short EXT_FUNC EV_Precache(int type, const char *psz) unsigned short EXT_FUNC EV_Precache(int type, const char *psz)

View File

@ -328,8 +328,6 @@ delta_t *SV_LookupDelta(char *name)
} }
Sys_Error("%s: Couldn't find delta for %s\n", __func__, name); Sys_Error("%s: Couldn't find delta for %s\n", __func__, name);
return NULL;
} }
NOXREF void SV_DownloadingModules(void) NOXREF void SV_DownloadingModules(void)
@ -2111,8 +2109,6 @@ int SV_CheckForDuplicateNames(char *userinfo, qboolean bIsReconnecting, int nExc
val = Info_ValueForKey(userinfo, "name"); val = Info_ValueForKey(userinfo, "name");
changed = TRUE; changed = TRUE;
} }
return changed;
} }
#ifdef REHLDS_FIXES #ifdef REHLDS_FIXES

View File

@ -45,7 +45,6 @@ void *GetOriginalFuncAddrOrDie(const char *funcName)
} }
rehlds_syserror("%s: Could not find function '%s'", __func__, funcName); rehlds_syserror("%s: Could not find function '%s'", __func__, funcName);
return NULL;
} }
void *GetOriginalFuncAddrOrDefault(const char *funcName, void *def) void *GetOriginalFuncAddrOrDefault(const char *funcName, void *def)
@ -68,7 +67,6 @@ void *GetFuncRefAddrOrDie(const char *funcName)
} }
rehlds_syserror("%s: Could not find function '%s'", __func__, funcName); rehlds_syserror("%s: Could not find function '%s'", __func__, funcName);
return NULL;
} }
void *GetFuncRefAddrOrDefault(const char *funcName, void *def) void *GetFuncRefAddrOrDefault(const char *funcName, void *def)

View File

@ -417,31 +417,27 @@ size_t HIDDEN FindSymbol(Module *module, const char* symbolName, int index)
#ifdef _WIN32 #ifdef _WIN32
void ProcessModuleData(Module *module) void ProcessModuleData(Module *module)
{ {
int i = 0;
PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)module->base; PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)module->base;
if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) { if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) {
rehlds_syserror("%s: Invalid DOS header signature", __func__); rehlds_syserror("%s: Invalid DOS header signature", __func__);
return;
} }
PIMAGE_NT_HEADERS NTHeaders = (PIMAGE_NT_HEADERS)((size_t)module->base + dosHeader->e_lfanew); PIMAGE_NT_HEADERS NTHeaders = (PIMAGE_NT_HEADERS)((size_t)module->base + dosHeader->e_lfanew);
if (NTHeaders->Signature != 0x4550) { if (NTHeaders->Signature != 0x4550) {
rehlds_syserror("%s: Invalid NT header signature", __func__); rehlds_syserror("%s: Invalid NT header signature", __func__);
return;
} }
PIMAGE_SECTION_HEADER cSection = (PIMAGE_SECTION_HEADER)((size_t)(&NTHeaders->OptionalHeader) + NTHeaders->FileHeader.SizeOfOptionalHeader); PIMAGE_SECTION_HEADER cSection = (PIMAGE_SECTION_HEADER)((size_t)(&NTHeaders->OptionalHeader) + NTHeaders->FileHeader.SizeOfOptionalHeader);
PIMAGE_SECTION_HEADER CodeSection = NULL; PIMAGE_SECTION_HEADER CodeSection = NULL;
for (i = 0; i < NTHeaders->FileHeader.NumberOfSections; i++, cSection++) { for (int i = 0; i < NTHeaders->FileHeader.NumberOfSections; i++, cSection++) {
if (cSection->VirtualAddress == NTHeaders->OptionalHeader.BaseOfCode) if (cSection->VirtualAddress == NTHeaders->OptionalHeader.BaseOfCode)
CodeSection = cSection; CodeSection = cSection;
} }
if (CodeSection == NULL) { if (CodeSection == NULL) {
rehlds_syserror("%s: Code section not found", __func__); rehlds_syserror("%s: Code section not found", __func__);
return;
} }
module->codeSection.start = (uint32)module->base + CodeSection->VirtualAddress; module->codeSection.start = (uint32)module->base + CodeSection->VirtualAddress;

View File

@ -44,13 +44,11 @@ void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data) {
default: default:
rehlds_syserror("%s: unsupported callback %u", __func__, m_iCallback); rehlds_syserror("%s: unsupported callback %u", __func__, m_iCallback);
} }
return NULL;
} }
void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data, bool bIOFailure, SteamAPICall_t hSteamAPICall) { void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data, bool bIOFailure, SteamAPICall_t hSteamAPICall) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return NULL; //return NULL;
} }
@ -92,25 +90,25 @@ CSteamAppsAnonymizingWrapper::CSteamAppsAnonymizingWrapper(ISteamApps* original,
bool CSteamAppsAnonymizingWrapper::BIsSubscribed() bool CSteamAppsAnonymizingWrapper::BIsSubscribed()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsAnonymizingWrapper::BIsLowViolence() bool CSteamAppsAnonymizingWrapper::BIsLowViolence()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsAnonymizingWrapper::BIsCybercafe() bool CSteamAppsAnonymizingWrapper::BIsCybercafe()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsAnonymizingWrapper::BIsVACBanned() bool CSteamAppsAnonymizingWrapper::BIsVACBanned()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
const char* CSteamAppsAnonymizingWrapper::GetCurrentGameLanguage() const char* CSteamAppsAnonymizingWrapper::GetCurrentGameLanguage()
@ -122,43 +120,43 @@ const char* CSteamAppsAnonymizingWrapper::GetCurrentGameLanguage()
const char* CSteamAppsAnonymizingWrapper::GetAvailableGameLanguages() const char* CSteamAppsAnonymizingWrapper::GetAvailableGameLanguages()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return NULL; //return NULL;
} }
bool CSteamAppsAnonymizingWrapper::BIsSubscribedApp(AppId_t appID) bool CSteamAppsAnonymizingWrapper::BIsSubscribedApp(AppId_t appID)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsAnonymizingWrapper::BIsDlcInstalled(AppId_t appID) bool CSteamAppsAnonymizingWrapper::BIsDlcInstalled(AppId_t appID)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
uint32 CSteamAppsAnonymizingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID) uint32 CSteamAppsAnonymizingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
bool CSteamAppsAnonymizingWrapper::BIsSubscribedFromFreeWeekend() bool CSteamAppsAnonymizingWrapper::BIsSubscribedFromFreeWeekend()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
int CSteamAppsAnonymizingWrapper::GetDLCCount() int CSteamAppsAnonymizingWrapper::GetDLCCount()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
bool CSteamAppsAnonymizingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize) bool CSteamAppsAnonymizingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
void CSteamAppsAnonymizingWrapper::InstallDLC(AppId_t nAppID) void CSteamAppsAnonymizingWrapper::InstallDLC(AppId_t nAppID)
@ -179,25 +177,25 @@ void CSteamAppsAnonymizingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID)
bool CSteamAppsAnonymizingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize) bool CSteamAppsAnonymizingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsAnonymizingWrapper::MarkContentCorrupt(bool bMissingFilesOnly) bool CSteamAppsAnonymizingWrapper::MarkContentCorrupt(bool bMissingFilesOnly)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
uint32 CSteamAppsAnonymizingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots) uint32 CSteamAppsAnonymizingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
uint32 CSteamAppsAnonymizingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize) uint32 CSteamAppsAnonymizingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
@ -214,7 +212,7 @@ CSteamGameServerAnonymizingWrapper::CSteamGameServerAnonymizingWrapper(ISteamGam
bool CSteamGameServerAnonymizingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString) bool CSteamGameServerAnonymizingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
void CSteamGameServerAnonymizingWrapper::SetProduct(const char *pszProduct) void CSteamGameServerAnonymizingWrapper::SetProduct(const char *pszProduct)
@ -370,13 +368,13 @@ bool CSteamGameServerAnonymizingWrapper::BUpdateUserData(CSteamID steamIDUser, c
HAuthTicket CSteamGameServerAnonymizingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket) HAuthTicket CSteamGameServerAnonymizingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_HAuthTicketInvalid; //return k_HAuthTicketInvalid;
} }
EBeginAuthSessionResult CSteamGameServerAnonymizingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID) EBeginAuthSessionResult CSteamGameServerAnonymizingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_EBeginAuthSessionResultInvalidTicket; //return k_EBeginAuthSessionResultInvalidTicket;
} }
void CSteamGameServerAnonymizingWrapper::EndAuthSession(CSteamID steamID) void CSteamGameServerAnonymizingWrapper::EndAuthSession(CSteamID steamID)
@ -392,13 +390,13 @@ void CSteamGameServerAnonymizingWrapper::CancelAuthTicket(HAuthTicket hAuthTicke
EUserHasLicenseForAppResult CSteamGameServerAnonymizingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID) EUserHasLicenseForAppResult CSteamGameServerAnonymizingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_EUserHasLicenseResultDoesNotHaveLicense; //return k_EUserHasLicenseResultDoesNotHaveLicense;
} }
bool CSteamGameServerAnonymizingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) bool CSteamGameServerAnonymizingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
void CSteamGameServerAnonymizingWrapper::GetGameplayStats() void CSteamGameServerAnonymizingWrapper::GetGameplayStats()
@ -409,13 +407,13 @@ void CSteamGameServerAnonymizingWrapper::GetGameplayStats()
SteamAPICall_t CSteamGameServerAnonymizingWrapper::GetServerReputation() SteamAPICall_t CSteamGameServerAnonymizingWrapper::GetServerReputation()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_uAPICallInvalid; //return k_uAPICallInvalid;
} }
uint32 CSteamGameServerAnonymizingWrapper::GetPublicIP() uint32 CSteamGameServerAnonymizingWrapper::GetPublicIP()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
bool CSteamGameServerAnonymizingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort) bool CSteamGameServerAnonymizingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort)
@ -430,7 +428,6 @@ bool CSteamGameServerAnonymizingWrapper::HandleIncomingPacket(const void *pData,
res = m_Wrapped->HandleIncomingPacket(pData, cbData, ntohl(realIp), srcPort); res = m_Wrapped->HandleIncomingPacket(pData, cbData, ntohl(realIp), srcPort);
} }
return res; return res;
} }
@ -472,13 +469,13 @@ void CSteamGameServerAnonymizingWrapper::ForceHeartbeat()
SteamAPICall_t CSteamGameServerAnonymizingWrapper::AssociateWithClan(CSteamID steamIDClan) SteamAPICall_t CSteamGameServerAnonymizingWrapper::AssociateWithClan(CSteamID steamIDClan)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_uAPICallInvalid; //return k_uAPICallInvalid;
} }
SteamAPICall_t CSteamGameServerAnonymizingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) SteamAPICall_t CSteamGameServerAnonymizingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer)
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_uAPICallInvalid; //return k_uAPICallInvalid;
} }

View File

@ -3287,6 +3287,5 @@ IEngExtCall* IEngExtCallFactory::createByOpcode(ExtCallFuncs opc, void* buf, int
default: default:
rehlds_syserror("%s: unknown funccall opcode %d", __func__, opc); rehlds_syserror("%s: unknown funccall opcode %d", __func__, opc);
return NULL;
} }
} }

View File

@ -67,7 +67,6 @@ void* CPlayingEngExtInterceptor::allocFuncCall()
} }
rehlds_syserror("%s: running out of free slots", __func__); rehlds_syserror("%s: running out of free slots", __func__);
return NULL;
} }
void CPlayingEngExtInterceptor::freeFuncCall(void* fcall) void CPlayingEngExtInterceptor::freeFuncCall(void* fcall)
@ -165,7 +164,6 @@ IEngExtCall* CPlayingEngExtInterceptor::getNextCall(bool peek, bool processCallb
if (callback != NULL && callback->m_Start) { if (callback != NULL && callback->m_Start) {
if (!processCallbacks) { if (!processCallbacks) {
rehlds_syserror("%s: read a callback, but it's not allowed here", __func__); rehlds_syserror("%s: read a callback, but it's not allowed here", __func__);
return NULL;
} }
while (callback != NULL && callback->m_Start) { while (callback != NULL && callback->m_Start) {
@ -690,7 +688,7 @@ CSteamGameServerPlayingWrapper::CSteamGameServerPlayingWrapper(CPlayingEngExtInt
bool CSteamGameServerPlayingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString) { bool CSteamGameServerPlayingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
void CSteamGameServerPlayingWrapper::SetProduct(const char *pszProduct) { void CSteamGameServerPlayingWrapper::SetProduct(const char *pszProduct) {
@ -901,12 +899,12 @@ bool CSteamGameServerPlayingWrapper::BUpdateUserData(CSteamID steamIDUser, const
HAuthTicket CSteamGameServerPlayingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket) { HAuthTicket CSteamGameServerPlayingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_HAuthTicketInvalid; //return k_HAuthTicketInvalid;
} }
EBeginAuthSessionResult CSteamGameServerPlayingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID) { EBeginAuthSessionResult CSteamGameServerPlayingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_EBeginAuthSessionResultInvalidTicket; //return k_EBeginAuthSessionResultInvalidTicket;
} }
void CSteamGameServerPlayingWrapper::EndAuthSession(CSteamID steamID) { void CSteamGameServerPlayingWrapper::EndAuthSession(CSteamID steamID) {
@ -919,12 +917,12 @@ void CSteamGameServerPlayingWrapper::CancelAuthTicket(HAuthTicket hAuthTicket) {
EUserHasLicenseForAppResult CSteamGameServerPlayingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID) { EUserHasLicenseForAppResult CSteamGameServerPlayingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_EUserHasLicenseResultHasLicense; //return k_EUserHasLicenseResultHasLicense;
} }
bool CSteamGameServerPlayingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) { bool CSteamGameServerPlayingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
void CSteamGameServerPlayingWrapper::GetGameplayStats() { void CSteamGameServerPlayingWrapper::GetGameplayStats() {
@ -933,12 +931,12 @@ void CSteamGameServerPlayingWrapper::GetGameplayStats() {
SteamAPICall_t CSteamGameServerPlayingWrapper::GetServerReputation() { SteamAPICall_t CSteamGameServerPlayingWrapper::GetServerReputation() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_uAPICallInvalid; //return k_uAPICallInvalid;
} }
uint32 CSteamGameServerPlayingWrapper::GetPublicIP() { uint32 CSteamGameServerPlayingWrapper::GetPublicIP() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
bool CSteamGameServerPlayingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort) { bool CSteamGameServerPlayingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort) {
@ -988,12 +986,12 @@ void CSteamGameServerPlayingWrapper::ForceHeartbeat() {
SteamAPICall_t CSteamGameServerPlayingWrapper::AssociateWithClan(CSteamID steamIDClan) { SteamAPICall_t CSteamGameServerPlayingWrapper::AssociateWithClan(CSteamID steamIDClan) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_uAPICallInvalid; //return k_uAPICallInvalid;
} }
SteamAPICall_t CSteamGameServerPlayingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) { SteamAPICall_t CSteamGameServerPlayingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return k_uAPICallInvalid; //return k_uAPICallInvalid;
} }
@ -1009,62 +1007,62 @@ CSteamAppsPlayingWrapper::CSteamAppsPlayingWrapper(CPlayingEngExtInterceptor* pl
bool CSteamAppsPlayingWrapper::BIsSubscribed() { bool CSteamAppsPlayingWrapper::BIsSubscribed() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsPlayingWrapper::BIsLowViolence() { bool CSteamAppsPlayingWrapper::BIsLowViolence() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsPlayingWrapper::BIsCybercafe() { bool CSteamAppsPlayingWrapper::BIsCybercafe() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsPlayingWrapper::BIsVACBanned() { bool CSteamAppsPlayingWrapper::BIsVACBanned() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
const char* CSteamAppsPlayingWrapper::GetCurrentGameLanguage() { const char* CSteamAppsPlayingWrapper::GetCurrentGameLanguage() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return ""; //return "";
} }
const char* CSteamAppsPlayingWrapper::GetAvailableGameLanguages() { const char* CSteamAppsPlayingWrapper::GetAvailableGameLanguages() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return ""; //return "";
} }
bool CSteamAppsPlayingWrapper::BIsSubscribedApp(AppId_t appID) { bool CSteamAppsPlayingWrapper::BIsSubscribedApp(AppId_t appID) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsPlayingWrapper::BIsDlcInstalled(AppId_t appID) { bool CSteamAppsPlayingWrapper::BIsDlcInstalled(AppId_t appID) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
uint32 CSteamAppsPlayingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID) { uint32 CSteamAppsPlayingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
bool CSteamAppsPlayingWrapper::BIsSubscribedFromFreeWeekend() { bool CSteamAppsPlayingWrapper::BIsSubscribedFromFreeWeekend() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
int CSteamAppsPlayingWrapper::GetDLCCount() { int CSteamAppsPlayingWrapper::GetDLCCount() {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
bool CSteamAppsPlayingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize) { bool CSteamAppsPlayingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
void CSteamAppsPlayingWrapper::InstallDLC(AppId_t nAppID) { void CSteamAppsPlayingWrapper::InstallDLC(AppId_t nAppID) {
@ -1081,20 +1079,20 @@ void CSteamAppsPlayingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID) {
bool CSteamAppsPlayingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize) { bool CSteamAppsPlayingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
bool CSteamAppsPlayingWrapper::MarkContentCorrupt(bool bMissingFilesOnly) { bool CSteamAppsPlayingWrapper::MarkContentCorrupt(bool bMissingFilesOnly) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return false; //return false;
} }
uint32 CSteamAppsPlayingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots) { uint32 CSteamAppsPlayingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }
uint32 CSteamAppsPlayingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize) { uint32 CSteamAppsPlayingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize) {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return 0; //return 0;
} }

View File

@ -2,7 +2,7 @@
/* ============================================================================ /* ============================================================================
external function hooks external function hooks
============================================================================*/ ============================================================================*/
uint32 __cdecl time_hooked(uint32* pTime) uint32 __cdecl time_hooked(uint32* pTime)
{ {
@ -145,13 +145,13 @@ bool __cdecl SteamAPI_Init_hooked()
ISteamUser* __cdecl SteamUser_hooked() ISteamUser* __cdecl SteamUser_hooked()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return NULL; //return NULL;
} }
ISteamFriends* __cdecl SteamFriends_hooked() ISteamFriends* __cdecl SteamFriends_hooked()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return NULL; //return NULL;
} }
void __cdecl SteamGameServer_RunCallbacks_hooked() void __cdecl SteamGameServer_RunCallbacks_hooked()
@ -197,7 +197,7 @@ void __cdecl SteamAPI_RegisterCallResult_hooked(class CCallbackBase *pCallback,
ISteamHTTP* __cdecl SteamHTTP_hooked() ISteamHTTP* __cdecl SteamHTTP_hooked()
{ {
rehlds_syserror("%s: not implemented", __func__); rehlds_syserror("%s: not implemented", __func__);
return NULL; //return NULL;
} }
void __cdecl SteamAPI_UnregisterCallResult_hooked(class CCallbackBase *pCallback, SteamAPICall_t hAPICall) void __cdecl SteamAPI_UnregisterCallResult_hooked(class CCallbackBase *pCallback, SteamAPICall_t hAPICall)
@ -216,7 +216,7 @@ void __cdecl SteamAPI_UseBreakpadCrashHandler_hooked(char const *pchVersion, cha
} }
/* ============================================================================ /* ============================================================================
Hooks installation Hooks installation
============================================================================*/ ============================================================================*/
HMODULE getModuleHandleOrDie(const char* moduleName) { HMODULE getModuleHandleOrDie(const char* moduleName) {
HMODULE res = GetModuleHandleA(moduleName); HMODULE res = GetModuleHandleA(moduleName);