Skip to content

Commit

Permalink
Removed addons support from Left 4 Dead 1 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
shqke committed Mar 7, 2021
1 parent ffecf63 commit ee89a96
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
8 changes: 6 additions & 2 deletions core/extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,11 @@ bool SMExtension::SetupFromGameConfig(IGameConfig* gc, char* error, int maxlengt
{ "CBaseServer::GetChallengeNr", CBaseServer::vtblindex_GetChallengeNr },
{ "CBaseServer::GetChallengeType", CBaseServer::vtblindex_GetChallengeType },
{ "CBaseServer::ReplyChallenge", CBaseServer::vtblindex_ReplyChallenge },
#if SOURCE_ENGINE == SE_LEFT4DEAD2
{ "CBaseServer::FillServerInfo", CBaseServer::vtblindex_FillServerInfo },
#if !defined _WIN32
{ "CHLTVServer::FillServerInfo", CHLTVServer::vtblindex_FillServerInfo },
#endif
#endif
};

Expand Down Expand Up @@ -507,12 +509,14 @@ void SMExtension::OnSetHLTVServer(IHLTVServer* pIHLTVServer)
return;
}

CHLTVServer* pHLTVServer = CHLTVServer::FromBaseServer(pServer);

CHLTVServer::shookid_ReplyChallenge = SH_ADD_MANUALHOOK(CBaseServer_ReplyChallenge, pServer, SH_MEMBER(this, &SMExtension::Handler_CHLTVServer_ReplyChallenge), false);
#if SOURCE_ENGINE == SE_LEFT4DEAD2
CHLTVServer::shookid_FillServerInfo = SH_ADD_MANUALHOOK(CBaseServer_FillServerInfo, pServer, SH_MEMBER(this, &SMExtension::Handler_CHLTVServer_FillServerInfo), true);

CHLTVServer* pHLTVServer = CHLTVServer::FromBaseServer(pServer);
#if !defined _WIN32
CHLTVServer::shookid_hltv_FillServerInfo = SH_ADD_MANUALHOOK(CHLTVServer_FillServerInfo, pHLTVServer, SH_MEMBER(this, &SMExtension::Handler_CHLTVServer_FillServerInfo), true);
#endif
#endif

CHLTVDemoRecorder& demoRecorder = pHLTVServer->m_DemoRecorder();
Expand Down
5 changes: 1 addition & 4 deletions core/extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
#include <bitbuf.h>
#include <ihltv.h>

#include <tier0/memdbgon.h>
#include <tier1/utlbuffer.h>

#include <os/am-shared-library.h>
#include <os/am-path.h>

// Metamod Source
#include <sourcehook.h>

#if defined _WIN32
Expand All @@ -47,7 +45,6 @@ enum ESocketIndex_t
#define CONNECTIONLESS_HEADER 0xFFFFFFFF // all OOB packet start with this sequence
#define S2C_CHALLENGE 'A' // + challenge value

// Metamod Source
class SMExtension :
public SDKExtension
{
Expand Down
2 changes: 1 addition & 1 deletion core/smsdk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Configuration
#define SMEXT_CONF_NAME "SourceTV Support"
#define SMEXT_CONF_DESCRIPTION "Restores broadcasting/recording SourceTV features in Left 4 Dead engine"
#define SMEXT_CONF_VERSION "0.9.4"
#define SMEXT_CONF_VERSION "0.9.5"
#define SMEXT_CONF_AUTHOR "Evgeniy \"shqke\" Kazakov"
#define SMEXT_CONF_URL "https://github.com/shqke/sourcetvsupport"
#define SMEXT_CONF_LOGTAG "STVS"
Expand Down
18 changes: 6 additions & 12 deletions extra/sourcetvsupport.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
"linux" "40"
"windows" "40"
}

"CHLTVServer::FillServerInfo"
{
// Entry point "CHLTVDemoRecorder::WriteServerInfo"
"linux" "9"
}
}

"Signatures"
Expand Down Expand Up @@ -102,12 +96,6 @@
"linux" "58"
"windows" "59"
}

"CBaseServer::FillServerInfo"
{
"linux" "45"
"windows" "44"
}
}

"Signatures"
Expand Down Expand Up @@ -178,6 +166,12 @@
"windows" "61"
}

"CHLTVServer::FillServerInfo"
{
// Entry point "CHLTVDemoRecorder::WriteServerInfo"
"linux" "9"
}

"CBaseServer::FillServerInfo"
{
"linux" "47"
Expand Down

0 comments on commit ee89a96

Please sign in to comment.