Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cfg/cs2fixes.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ cs2f_user_prefs_api "" // User Preferences REST API endpoint

// Zombie:Reborn settings
zr_enable 0 // Whether to enable ZR features
zr_class_model_override 1 // Replace player models/skins with class settings; set 0 to keep the current model if replacements cause first-person clipping. Other class attributes still apply.
zr_knockback_scale 5.0 // Global knockback scale
zr_ztele_max_distance 150.0 // Maximum distance players are allowed to move after starting ztele
zr_ztele_allow_humans 0 // Whether to allow humans to use ztele
Expand Down
2 changes: 1 addition & 1 deletion sdk
Submodule sdk updated 99 files
+3 −0 AGENTS.md
+106 −0 CheckScript
+2 −1 common/netmessages.proto
+4 −0 common/source2_steam_stats.proto
+91 −0 entity2/entitysystem.cpp
+1 −1 game/shared/ehandle.h
+66 −0 game/shared/gameentitysystem.h
+5 −4 game/shared/networktransmitcomponent.h
+4 −5 game/shared/shareddefs.h
+47 −3 game/shared/spawngroupmgrgamesystem.h
+5 −2 public/const.h
+72 −1 public/engine2/basespawngroup.h
+16 −14 public/engine2/hoststate.h
+25 −16 public/engine2/iengineservicemgr.h
+7 −7 public/engine2/igameeventsystem.h
+18 −0 public/engine2/igameresourceservice.h
+21 −22 public/engine2/inetworkgameserver.h
+36 −18 public/engine2/isource2engine.h
+32 −11 public/engine2/isource2server.h
+3 −1 public/engine2/isource2serverconfig.h
+7 −8 public/engine2/ivengineserver2.h
+28 −7 public/engine2/networkgameserverbase.h
+0 −62 public/engine2/server_class.h
+1 −1 public/engine2/serversideclient.h
+24 −8 public/engine2/serversideclientbase.h
+3 −3 public/entity2/entityclass.h
+40 −2 public/entity2/entitycomponent.h
+22 −77 public/entity2/entitydatainstantiator.h
+1 −0 public/entity2/entityidentity.h
+10 −3 public/entity2/entityinterfaces.h
+6 −7 public/entity2/entityscriptframework.h
+5 −1 public/entity2/entitysystem.h
+5 −5 public/entity2/ientity2_entityio.h
+182 −215 public/entity2/variant.h
+9 −9 public/filesystem/ifilesystem.h
+40 −2 public/gcsdk/gcclient.h
+114 −6 public/gcsdk/jobmgr.h
+26 −0 public/gcsdk/jobtime.h
+1 −1 public/gcsdk/sharedobject.h
+11 −2 public/gcsdk/sharedobjectcache.h
+61 −0 public/gcsdk/workthreadpool.h
+3 −3 public/ihltv.h
+5 −2 public/inetchannelinfo.h
+6 −7 public/inputsystem/inputenums.h
+36 −0 public/iprerequisite.h
+4 −2 public/matchmaking/igametypes.h
+14 −2 public/networkstringtabledefs.h
+38 −7 public/networksystem/iflattenedserializers.h
+8 −6 public/networksystem/inetchannel.h
+38 −49 public/networksystem/inetworkmessages.h
+6 −26 public/networksystem/inetworkserializer.h
+28 −14 public/networksystem/inetworksystem.h
+71 −0 public/networksystem/networkvar.h
+110 −0 public/networksystem/serializedentity.h
+2 −2 public/rendersystem/rendersystemtypes.h
+29 −0 public/resourcefile/compressedresourcemanifest.h
+22 −0 public/resourcesystem/imanifestregistry.h
+237 −30 public/resourcesystem/iresourcesystem.h
+18 −0 public/schemalib/schematype.h
+8 −0 public/schemasystem/baseschema.h
+7 −6 public/schemasystem/ischemasystem.h
+1 −1 public/schemasystem/minschema.h
+30 −4 public/tier0/bitbuf.h
+31 −105 public/tier0/bitvec.h
+15 −17 public/tier0/callqueue.h
+2 −2 public/tier0/commandbuffer.h
+81 −50 public/tier0/convar.h
+1 −3 public/tier0/icvar.h
+25 −5 public/tier0/jobthread.h
+32 −32 public/tier0/keyvalues3.h
+2 −1 public/tier0/mempool.h
+3 −1 public/tier0/minidump.h
+3 −1 public/tier0/platform.h
+25 −0 public/tier0/reliabletimer.h
+56 −2 public/tier0/threadtools.h
+3 −2 public/tier0/tier0_strtools.h
+1 −1 public/tier0/tier0_unicode.h
+55 −32 public/tier0/utlbuffer.h
+32 −58 public/tier0/utlpriorityqueue.h
+11 −0 public/tier0/utlsymbollarge.h
+3 −1 public/tier0/utlsymboltablelarge.h
+27 −34 public/tier0/utlvectorultraconservative.h
+2 −2 public/tier0/vprof.h
+64 −0 public/tier2/fieldpath.h
+78 −0 public/tier2/fieldpathpacker.h
+46 −24 public/vscript/ivscript.h
+374 −0 tests/run/bitbuf.cpp
+197 −0 tests/run/bitvec.cpp
+270 −0 tests/run/convar.cpp
+238 −1 tests/run/keyvalues3.cpp
+92 −0 tests/run/threadrwlock.cpp
+279 −0 tests/run/utlbuffer.cpp
+198 −0 tests/run/utlpriorityqueue.cpp
+173 −0 tests/run/utlvectorultraconservative.cpp
+237 −0 tests/run/variant.cpp
+1 −1 tests/utlvector.cpp
+41 −17 tier0_perproject/bitbuf.cpp
+14 −10 tier0_perproject/convar.cpp
+28 −50 tier0_perproject/keyvalues3.cpp
4 changes: 2 additions & 2 deletions src/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void ClientPrintAll(int hud_dest, const char* msg, ...)

va_end(args);

INetworkMessageInternal* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("TextMsg");
NetMessageInfo_t* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("TextMsg");
auto data = pNetMsg->AllocateMessage()->ToPB<CUserMessageTextMsg>();

data->set_dest(hud_dest);
Expand Down Expand Up @@ -355,7 +355,7 @@ void ClientPrint(CCSPlayerController* player, int hud_dest, const char* msg, ...
return;
}

INetworkMessageInternal* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("TextMsg");
NetMessageInfo_t* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("TextMsg");
auto data = pNetMsg->AllocateMessage()->ToPB<CUserMessageTextMsg>();

data->set_dest(hud_dest);
Expand Down
1 change: 0 additions & 1 deletion src/detours.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class CCSPlayer_WeaponServices;
class CCSPlayer_MovementServices;
class CCSPlayer_ItemServices;
class CBasePlayerWeapon;
class INetworkMessageInternal;
class IEngineServiceMgr;
class CServerSideClient;
class INetChannel;
Expand Down
6 changes: 3 additions & 3 deletions src/panoramavote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ bool CPanoramaVoteHandler::SendYesNoVoteToAll(float flDuration, int iCaller, con

void CPanoramaVoteHandler::SendVoteStartUM(IRecipientFilter* pFilter)
{
INetworkMessageInternal* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("VoteStart");
NetMessageInfo_t* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("VoteStart");
auto data = pNetMsg->AllocateMessage()->ToPB<CCSUsrMsg_VoteStart>();

data->set_team(-1);
Expand Down Expand Up @@ -332,7 +332,7 @@ void CPanoramaVoteHandler::EndVote(YesNoVoteEndReason reason)

void CPanoramaVoteHandler::SendVoteFailed()
{
INetworkMessageInternal* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("VoteFailed");
NetMessageInfo_t* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("VoteFailed");

auto data = pNetMsg->AllocateMessage()->ToPB<CCSUsrMsg_VoteFailed>();

Expand All @@ -348,7 +348,7 @@ void CPanoramaVoteHandler::SendVoteFailed()

void CPanoramaVoteHandler::SendVotePassed()
{
INetworkMessageInternal* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("VotePass");
NetMessageInfo_t* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("VotePass");

auto data = pNetMsg->AllocateMessage()->ToPB<CCSUsrMsg_VotePass>();

Expand Down
2 changes: 1 addition & 1 deletion src/playermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void ZEPlayer::SetSteamIdAttribute()

void ZEPlayer::ReplicateConVar(const char* pszName, const char* pszValue)
{
INetworkMessageInternal* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("SetConVar");
NetMessageInfo_t* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("SetConVar");
auto data = pNetMsg->AllocateMessage()->ToPB<CNETMsg_SetConVar>();

CMsg_CVars_CVar* cvarMsg = data->mutable_convars()->add_cvars();
Expand Down
2 changes: 1 addition & 1 deletion src/utils/hud_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void CreateHudMessage(std::shared_ptr<CHudMessage> pHudMessage)
pEvent->SetInt("duration", pHudMessage->GetDuration() + g_cvarHudDurationLeeway.Get());
pEvent->SetInt("userid", -1);

INetworkMessageInternal* pMsg = g_pNetworkMessages->FindNetworkMessageById(GE_Source1LegacyGameEvent);
NetMessageInfo_t* pMsg = g_pNetworkMessages->FindNetworkMessageById(GE_Source1LegacyGameEvent);

if (!pMsg)
return;
Expand Down
6 changes: 3 additions & 3 deletions src/virtual_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ KHook::Return<void> Hook_ClientDisconnect_Post(IServerGameClients* pThis, CPlaye
return {KHook::Action::Ignore};
}

KHook::Return<void> Hook_ClientPutInServer_Post(IServerGameClients* pThis, CPlayerSlot slot, const char* pszName, int type, uint64 xuid)
KHook::Return<void> Hook_ClientPutInServer_Post(IServerGameClients* pThis, CPlayerSlot slot, const char* pszName, ClientPutInServerType_t type, uint64 xuid)
{
Message("Hook_ClientPutInServer(%d, \"%s\", %d, %d, %lli)\n", slot, pszName, type, xuid);

Expand Down Expand Up @@ -372,10 +372,10 @@ KHook::Return<void> Hook_ClientSvcUserMessage(IServerGameClients* pThis, CPlayer
CConVar<bool> g_cvarBlockParticleMsgs("cs2f_block_particle_msgs", FCVAR_NONE, "Whether to block CUserMsg_ParticleManager messages to fix lag/crashes, experimental", false);

KHook::Return<void> Hook_PostEventAbstract(IGameEventSystem* pThis, CSplitScreenSlot nSlot, bool bLocalOnly, int nClientCount, const uint64* clients,
INetworkMessageInternal* pEvent, const CNetMessage* pData, unsigned long nSize, NetChannelBufType_t bufType)
NetMessageInfo_t* pEvent, const CNetMessage* pData, unsigned long nSize, NetChannelBufType_t bufType)
{
// Message( "Hook_PostEvent(%d, %d, %d, %lli)\n", nSlot, bLocalOnly, nClientCount, clients );
NetMessageInfo_t* info = pEvent->GetNetMessageInfo();
NetMessageInfo_t* info = pEvent;

if (g_cvarEnableStopSound.Get() && info->m_MessageId == GE_FireBulletsId)
{
Expand Down
4 changes: 2 additions & 2 deletions src/virtual_hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ KHook::Return<void> Hook_GameServerSteamAPIActivated(IServerGameDLL* pThis);
KHook::Return<void> Hook_ApplyGameSettings(IServerGameDLL* pThis, KeyValues* pKV);
KHook::Return<void> Hook_ClientActive_Post(IServerGameClients* pThis, CPlayerSlot slot, bool bLoadGame, const char* pszName, uint64 xuid);
KHook::Return<void> Hook_ClientDisconnect_Post(IServerGameClients* pThis, CPlayerSlot slot, ENetworkDisconnectionReason reason, const char* pszName, uint64 xuid, const char* pszNetworkID);
KHook::Return<void> Hook_ClientPutInServer_Post(IServerGameClients* pThis, CPlayerSlot slot, const char* pszName, int type, uint64 xuid);
KHook::Return<void> Hook_ClientPutInServer_Post(IServerGameClients* pThis, CPlayerSlot slot, const char* pszName, ClientPutInServerType_t type, uint64 xuid);
KHook::Return<void> Hook_ClientSettingsChanged(IServerGameClients* pThis, CPlayerSlot slot);
KHook::Return<void> Hook_OnClientConnected(IServerGameClients* pThis, CPlayerSlot slot, const char* pszName, uint64 xuid, const char* pszNetworkID, const char* pszAddress, bool bFakePlayer);
KHook::Return<bool> Hook_ClientConnect(IServerGameClients* pThis, CPlayerSlot slot, const char* pszName, uint64 xuid, const char* pszNetworkID, bool unk1, CBufferString* pRejectReason);
KHook::Return<void> Hook_ClientCommand(IServerGameClients* pThis, CPlayerSlot nSlot, const CCommand& _cmd);
KHook::Return<void> Hook_ClientSvcUserMessage(IServerGameClients* pThis, CPlayerSlot slot, int um_type, uint32 size, const void* buf);
KHook::Return<void> Hook_PostEventAbstract(IGameEventSystem* pThis, CSplitScreenSlot nSlot, bool bLocalOnly, int nClientCount, const uint64* clients,
INetworkMessageInternal* pEvent, const CNetMessage* pData, unsigned long nSize, NetChannelBufType_t bufType);
NetMessageInfo_t* pEvent, const CNetMessage* pData, unsigned long nSize, NetChannelBufType_t bufType);
KHook::Return<void> Hook_StartupServer_Post(INetworkServerService* pThis, const GameSessionConfiguration_t& config, ISource2WorldSession*, const char*);
KHook::Return<void> Hook_CheckTransmit_Post(ISource2GameEntities* pThis, CCheckTransmitInfo** ppInfoList, int infoCount, CBitVec<16384>& unionTransmitEdicts,
CBitVec<16384>&, const Entity2Networkable_t** pNetworkables, const uint16* pEntityIndicies, int nEntities);
Expand Down
9 changes: 6 additions & 3 deletions src/zombiereborn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ZRWeaponConfig* g_pZRWeaponConfig = nullptr;
ZRHitgroupConfig* g_pZRHitgroupConfig = nullptr;

CConVar<bool> g_cvarEnableZR("zr_enable", FCVAR_NONE, "Whether to enable ZR features", false);
CConVar<bool> g_cvarClassModelOverride("zr_class_model_override", FCVAR_NONE, "Whether ZR classes replace player models and skins", true);
CConVar<float> g_cvarMaxZteleDistance("zr_ztele_max_distance", FCVAR_NONE, "Maximum distance players are allowed to move after starting ztele", 150.0f, true, 0.0f, false, 0.0f);
CConVar<bool> g_cvarZteleHuman("zr_ztele_allow_humans", FCVAR_NONE, "Whether to allow humans to use ztele", false);
CConVar<float> g_cvarKnockbackScale("zr_knockback_scale", FCVAR_NONE, "Global knockback scale", 5.0f);
Expand Down Expand Up @@ -497,9 +498,11 @@ void CZRPlayerClassManager::ApplyBaseClassVisuals(std::shared_ptr<ZRClass> pClas
Color clrRender;
V_StringToColor(pModelEntry->szColor.c_str(), clrRender);

pPawn->SetModel(pModelEntry->szModelPath.c_str());
if (g_cvarClassModelOverride.Get())
pPawn->SetModel(pModelEntry->szModelPath.c_str());
pPawn->m_clrRender = clrRender;
pPawn->AcceptInput("Skin", pModelEntry->GetRandomSkin());
if (g_cvarClassModelOverride.Get())
pPawn->AcceptInput("Skin", pModelEntry->GetRandomSkin());

const auto pController = reinterpret_cast<CCSPlayerController*>(pPawn->GetController());
if (const auto pPlayer = pController != nullptr ? pController->GetZEPlayer() : nullptr)
Expand Down Expand Up @@ -1138,7 +1141,7 @@ void ZR_InfectShake(CCSPlayerController* pController)
if (!pController || !pController->IsConnected() || pController->IsBot() || !g_cvarInfectShake.Get())
return;

INetworkMessageInternal* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("Shake");
NetMessageInfo_t* pNetMsg = g_pNetworkMessages->FindNetworkMessagePartial("Shake");

auto data = pNetMsg->AllocateMessage()->ToPB<CUserMessageShake>();

Expand Down
Loading