Skip to content

Commit 8ea26b8

Browse files
committed
chore: update to latest cs build
1 parent ecad844 commit 8ea26b8

File tree

6 files changed

+39
-22
lines changed

6 files changed

+39
-22
lines changed

src/dll/cs2_sdk/entity/cbaseplayerpawn.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class CCSPlayer_ItemServices
4545
virtual void unk_12() = 0;
4646
virtual void unk_13() = 0;
4747
virtual void unk_14() = 0;
48+
virtual void unk_15() = 0;
49+
virtual void unk_16() = 0;
50+
virtual void unk_17() = 0;
51+
4852
virtual CBaseEntity* _GiveNamedItem(const char* pchName) = 0;
4953
public:
5054
virtual bool GiveNamedItemBool(const char* pchName) = 0;

src/dll/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void InitModulesAndInterfaces()
7777
Interfaces::schemaSystem2 = Modules::schemaSystem->FindInterface<CSchemaSystem*>(SCHEMASYSTEM_INTERFACE_VERSION);
7878
Interfaces::server = Modules::server->FindInterface<IServerGameDLL*>(INTERFACEVERSION_SERVERGAMEDLL);
7979

80-
const byte sig[] = "\x40\x53\x41\x56\x41\x57\x48\x81\xEC\x90\x00\x00\x00\x0F\x29\x74\x24\x70";
80+
const byte sig[] = "\x40\x53\x55\x41\x56\x48\x81\xec\x90\x00\x00\x00";
8181
int err;
8282
g_pSetAttribute = (CAttributeListSetOrAddAttributeValueByName)Modules::server->FindSignature((byte*)sig, sizeof(sig) - 1, err);
8383

src/dll/gui/panels/stickerinspect/stickerinspect.cpp

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <filesystem>
4242
#include <fstream>
4343

44+
4445
using json = nlohmann::json;
4546

4647
namespace GUI::StickerInspect
@@ -424,6 +425,7 @@ void RunInGameInspect(std::string& protoData)
424425
i--;
425426
}
426427

428+
427429
size_t stickerIndex = 0;
428430
for (auto& sticker : itemPreviewPB.stickers())
429431
{
@@ -449,6 +451,30 @@ void RunInGameInspect(std::string& protoData)
449451
stickerIndex++;
450452
}
451453

454+
// lovely, valve literally jsut copy pasted everything from stickers
455+
size_t chainIndex = 0;
456+
for (auto& chain : itemPreviewPB.keychains())
457+
{
458+
const int stickerID = chain.sticker_id();
459+
const int schema = chain.slot();
460+
std::string stickerPrefix = "keychain slot " + std::to_string(chainIndex);
461+
462+
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), (stickerPrefix + " id").c_str(), *((float*)&stickerID));
463+
464+
if (chain.has_offset_x() && chain.offset_x() != 0)
465+
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), (stickerPrefix + " offset x").c_str(), chain.offset_x());
466+
467+
if (chain.has_offset_y() && chain.offset_y() != 0)
468+
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), (stickerPrefix + " offset y").c_str(), chain.offset_y());
469+
470+
if (chain.has_offset_z() && chain.offset_z() != 0)
471+
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), (stickerPrefix + " offset z").c_str(), chain.offset_z());
472+
473+
if (chain.has_pattern() && chain.pattern() != 0)
474+
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), (stickerPrefix + " pattern").c_str(), chain.pattern());
475+
chainIndex++;
476+
}
477+
452478
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), "set item texture prefab", itemPreviewPB.paintindex());
453479
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), "set item texture wear", itemPreviewPB.paintwear());
454480
g_pSetAttribute(econItem.m_NetworkedDynamicAttributes(), "set item texture seed", itemPreviewPB.paintseed());
@@ -459,19 +485,8 @@ void RunInGameInspect(std::string& protoData)
459485
if (legacyMapIt != g_LegacyModelMap.end())
460486
isLegacyModel = legacyMapIt->second;
461487

488+
// if paint skin is visible on ground but not in hands its likely because the weapon was spawned before items game keyvalues was parsed as it parses only the items_game_workshop file that does not exist before compiling a skin
462489
((CSkeletonInstance*)(weapon->m_CBodyComponent()->m_pSceneNode()))->m_modelState().m_MeshGroupMask = isLegacyModel ? 2 : 1;
463-
464-
CCSPlayer_ViewModelServices* pViewModelServices =
465-
pawn->m_pViewModelServices();
466-
467-
if (!pViewModelServices) continue;
468-
469-
CBaseViewModel* pViewModel =
470-
pViewModelServices->m_hViewModel()[0].Get();
471-
472-
if (!pViewModel) continue;
473-
474-
((CSkeletonInstance*)(pViewModel->m_CBodyComponent()->m_pSceneNode()))->m_modelState().m_MeshGroupMask = isLegacyModel ? 2 : 1;
475490
}
476491
});
477492
}

src/dll/utils/module.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ class CModule
101101
if (int e = GetModuleInformation(m_hModule, &m_base, &m_size, m_sections))
102102
Error("Failed to get module info for %s, error %d\n", szModule, e);
103103
#endif
104-
104+
/*
105105
for(auto& section : m_sections)
106106
ConMsg("Section %s base: 0x%p | size: %d\n", section.m_szName.c_str(), section.m_pBase, section.m_iSize);
107107
108-
ConMsg("Initialized module %s base: 0x%p | size: %d\n", m_pszModule, m_base, m_size);
108+
ConMsg("Initialized module %s base: 0x%p | size: %d\n", m_pszModule, m_base, m_size);*/
109109
}
110110

111111
void *FindSignature(const byte *pData, size_t iSigLength, int &error)
@@ -154,11 +154,11 @@ class CModule
154154

155155
if (!pInterface)
156156
{
157-
printf("Could not find %s in %s\n", name, m_pszModule);
158-
Error("Could not find %s in %s\n", name, m_pszModule);
157+
//printf("Could not find %s in %s\n", name, m_pszModule);
158+
//Error("Could not find %s in %s\n", name, m_pszModule);
159159
}
160160

161-
ConMsg("Found interface %s in %s\n", name, m_pszModule);
161+
//ConMsg("Found interface %s in %s\n", name, m_pszModule);
162162

163163
return (T)pInterface;
164164
}

src/dll/utils/oslink.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
#if defined __WIN32__ || defined _WIN32 || defined WIN32
3535
#define WIN32_LEAN_AND_MEAN
3636
#define OS_WIN32
37-
#if defined _MSC_VER && _MSC_VER >= 1400
38-
#undef ARRAYSIZE
39-
#else
37+
#if !defined _MSC_VER || _MSC_VER < 1400
4038
#define mkdir(a) _mkdir(a)
4139
#endif
4240
#include <windows.h>

vendor/hl2sdk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit a5d9f803af02f2dab53fe69683a1c77d562ab7ba
1+
Subproject commit 4499acb4f565540771be8544fff2f4c2cab43413

0 commit comments

Comments
 (0)