Skip to content

Commit

Permalink
HLAE 2.56.3 (2018-10-30T05:39Z)
Browse files Browse the repository at this point in the history
Fixes #111
  • Loading branch information
dtugend committed Oct 30, 2018
1 parent 603b364 commit d869c98
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 8 deletions.
1 change: 1 addition & 0 deletions AfxHookSource/AfxHookSource.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
<ClCompile Include="CommandSystem.cpp" />
<ClCompile Include="csgo\ClientToolsCsgo.cpp" />
<ClCompile Include="csgo\hooks\engine.cpp" />
<ClCompile Include="csgo\hooks\PanoramaDebugger.cpp" />
<ClCompile Include="csgo\Panorama.cpp" />
<ClCompile Include="csgo_Audio.cpp" />
<ClCompile Include="csgo_CBasePlayer.cpp" />
Expand Down
3 changes: 3 additions & 0 deletions AfxHookSource/AfxHookSource.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@
<ClCompile Include="FovScaling.cpp">
<Filter>AfxHookSource</Filter>
</ClCompile>
<ClCompile Include="csgo\hooks\PanoramaDebugger.cpp">
<Filter>AfxHookSource\csgo</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\shared\bvhexport.h">
Expand Down
9 changes: 9 additions & 0 deletions AfxHookSource/AfxStreams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7130,6 +7130,9 @@ MirvPgl::CamData GetMirvPglCamData(SOURCESDK::vrect_t_csgo *rect) {
);
}

extern SOURCESDK::CSGO::panorama::CTopLevelWindowSource2 * panoramaDebuggerTopLevelWindow;
extern HWND panoramaDebuggerHwnd;

void CAfxStreams::View_Render(IAfxBaseClientDll * cl, SOURCESDK::vrect_t_csgo *rect)
{
SetCurrent_View_Render_ThreadId(GetCurrentThreadId());
Expand All @@ -7145,6 +7148,12 @@ void CAfxStreams::View_Render(IAfxBaseClientDll * cl, SOURCESDK::vrect_t_csgo *r

//IAfxMatRenderContextOrg * ctxp = GetCurrentContext()->GetOrg(); // We are on potentially a new context now!

if (panoramaDebuggerTopLevelWindow) {
panoramaDebuggerTopLevelWindow->SetVisible(false);
panoramaDebuggerTopLevelWindow->RunFrame(GetActiveWindow(), 1);
//panoramaDebuggerTopLevelWindow->LayoutAndPaintIfNeeded();
}

#ifdef AFX_MIRV_PGL
if (MirvPgl::IsDrawingActive())
{
Expand Down
2 changes: 1 addition & 1 deletion AfxHookSource/addresses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void Addresses_InitPanoramaDll(AfxAddr panoramaDll, SourceSdkVer sourceSdkVer)
DWORD addr = 0;
DWORD tmpAddr = FindClassVtable((HMODULE)panoramaDll, ".?AVCZip@@", 0, 0x0);
if (tmpAddr) {
addr = ((DWORD *)tmpAddr)[13];
addr = ((DWORD *)tmpAddr)[14];
}
else ErrorBox(MkErrStr(__FILE__, __LINE__));

Expand Down
77 changes: 77 additions & 0 deletions AfxHookSource/csgo/hooks/PanoramaDebugger.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#include "stdafx.h"

#include "engine.h"

#include "../../addresses.h"
#include "SourceInterfaces.h"
#include "../../WrpConsole.h"

#include <shared/detours.h>

using namespace SOURCESDK::CSGO;
using namespace SOURCESDK::CSGO::panorama;

extern CGameUIFuncs * g_pGameUIFuncs;
extern CPanoramaUIEngine * g_pPanoramaUIEngine;
extern CPanoramaUIClient * g_pPanoramaUIClient;

CTopLevelWindowSource2 * panoramaDebuggerTopLevelWindow = 0;
HWND panoramaDebuggerHwnd = 0;

LRESULT CALLBACK PanoramaDebuggerWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg)
{
default:
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
return 0;
}

CON_COMMAND(mirv_panorama_toggledebugger, "Toggle Panorama UI debugger") {
if (!(false && g_pGameUIFuncs && g_pPanoramaUIEngine && g_pPanoramaUIClient))
{
Tier0_Warning("Error: Missing interfacess.\n");
return;
}

static CDebugger * debugger = nullptr;

if (nullptr == debugger) {

/*
WNDCLASSEXA wndClass = {
sizeof(WNDCLASSEXA),
CS_OWNDC | CS_DBLCLKS,
PanoramaDebuggerWndProc,
0,
0,
NULL,
NULL,
NULL,
NULL,
NULL,
"ValvePanDebugger"
};
RECT windowRect = { 0, 0, 600, 400 };
DWORD wndStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX;
ATOM atomWndClass = RegisterClassExA(&wndClass);
AdjustWindowRectEx(&windowRect, wndStyle, FALSE, 0);
panoramaDebuggerHwnd = CreateWindowExA(0, wndClass.lpszClassName, "Panorama Debugger", wndStyle, 0, 0, windowRect.right - windowRect.left, windowRect.bottom - windowRect.left, NULL, NULL, NULL, NULL);
*/
CGameUIFuncs_SomeShit_t * someShit = g_pGameUIFuncs->GetSomeShit();
CUIEngineSource2 * uiEngineSource = g_pPanoramaUIEngine->GetUIEngineSoruce2();
panoramaDebuggerTopLevelWindow = uiEngineSource->CreateTopLevelWindow(0, 0, 600, 400, 0, 0, 0, 1, "PanoramaDebugger", someShit);

//ShowWindowAsync(panoramaDebuggerHwnd, SW_SHOWNORMAL);

debugger = g_pPanoramaUIClient->CreateDebugger(panoramaDebuggerTopLevelWindow, "Debugger");

}

Tier0_Msg("Debugger=0x%08x\n", debugger);
}
2 changes: 2 additions & 0 deletions AfxHookSource/csgo/hooks/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void OnPanoramaDebuggerOpened();

void OnPanoramaDebuggerClosed();

/*
CON_COMMAND(mirv_panorama_toggledebugger, "Toggle Panorama UI debugger") {
if (!EngineHooks_Install() || nullptr == g_Engine_ToggleDebugger_This || nullptr == g_pVGuiSurface_csgo)
{
Expand All @@ -79,3 +80,4 @@ CON_COMMAND(mirv_panorama_toggledebugger, "Toggle Panorama UI debugger") {
else
OnPanoramaDebuggerClosed();
}
*/
4 changes: 3 additions & 1 deletion AfxHookSource/csgo_CHudDeathNotice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,9 @@ void __fastcall Mycsgo_panorama_CUIPanel_UnkSetFloatProp(csgo_panorama_CUIPanel
break;
case 2:
// LifetimeMod.
if (g_HudDeathNoticeHookGlobals.activeWrapper->lifetimeMod.use) value = g_HudDeathNoticeHookGlobals.activeWrapper->lifetimeMod.value;
if (g_HudDeathNoticeHookGlobals.activeWrapper->lifetimeMod.use
&& value != 1.0f // multiplier is used
) value = g_HudDeathNoticeHookGlobals.activeWrapper->lifetimeMod.value;
break;
}

Expand Down
30 changes: 28 additions & 2 deletions AfxHookSource/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ SOURCESDK::CSGO::vgui::ISurface *g_pVGuiSurface_csgo = 0;

SOURCESDK::CSGO::IEngineTrace * g_pClientEngineTrace = 0;

SOURCESDK::CSGO::CGameUIFuncs * g_pGameUIFuncs = nullptr;
SOURCESDK::CSGO::panorama::CPanoramaUIEngine * g_pPanoramaUIEngine = nullptr;
SOURCESDK::CSGO::CPanoramaUIClient * g_pPanoramaUIClient = nullptr;


void MySetup(SOURCESDK::CreateInterfaceFn appSystemFactory, WrpGlobals *pGlobals)
{
static bool bFirstRun = true;
Expand Down Expand Up @@ -337,14 +342,35 @@ void MySetup(SOURCESDK::CreateInterfaceFn appSystemFactory, WrpGlobals *pGlobals
ErrorBox("Could not get a supported ShaderShadow interface.");
}


if (iface = appSystemFactory(SOURCESDK_CSGO_INTERFACEVERSION_ENGINETRACE_CLIENT, NULL))
{
g_pClientEngineTrace = (SOURCESDK::CSGO::IEngineTrace *)iface;
}
else {
ErrorBox("Could not get a supported client engine trace interface.");
}

if (iface = appSystemFactory(SORUCESDK_CSGO_VENGINE_GAMEUIFUNCS_VERSION, NULL))
{
g_pGameUIFuncs = (SOURCESDK::CSGO::CGameUIFuncs *)iface;
}
else {
ErrorBox("Could not get " SORUCESDK_CSGO_VENGINE_GAMEUIFUNCS_VERSION " interface.");
}
if (iface = appSystemFactory(SOURCECSDK_CSGO_PANORAMAUIENGINE, NULL))
{
g_pPanoramaUIEngine = (SOURCESDK::CSGO::panorama::CPanoramaUIEngine *)iface;
}
else {
ErrorBox("Could not get " SOURCECSDK_CSGO_PANORAMAUIENGINE " interface.");
}
if (iface = appSystemFactory(SOURCESDK_CSGO_PANORAMAUICLIENT_VERSION, NULL))
{
g_pPanoramaUIClient = (SOURCESDK::CSGO::CPanoramaUIClient *)iface;
}
else {
ErrorBox("Could not get " SOURCESDK_CSGO_PANORAMAUICLIENT_VERSION " interface.");
}
}

g_Hook_VClient_RenderView.Install(pGlobals);
Expand Down Expand Up @@ -2111,7 +2137,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
{
case DLL_PROCESS_ATTACH:
{
#ifdef _DEBUG
#if 0
MessageBox(0,"DLL_PROCESS_ATTACH","MDT_DEBUG",MB_OK);
#endif

Expand Down
6 changes: 3 additions & 3 deletions hlae/UpdateCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public UpdateCheck()

m_Guids = new Guid[]{
// current GUID:
new Guid("9e43e4c2-c8ff-41c3-8abb-1399fe5f35f1"),
new Guid("a6094c8e-86e5-442a-8841-c3187443d467"),
// current roll-back GUID:
new Guid("01d4b650-1a22-45d4-812c-dc6348b6857d"),
new Guid("f8fabc86-dc41-414b-8348-62b51df3665d"),
// old GUID(s) to accept:
new Guid("b6b14a18-2c24-434b-9aa5-c3659a949c6c")
new Guid("9e43e4c2-c8ff-41c3-8abb-1399fe5f35f1")
};

m_Targets = new LinkedList<UpdateCheckNotificationTarget>();
Expand Down
2 changes: 1 addition & 1 deletion prop
15 changes: 15 additions & 0 deletions resources/AfxHookSource_changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@
<changelog>


<release>
<name>AfxHookSource</name>
<version>1.45.2</version>
<time>2018-10-30T05:39Z</time>
<changes>
<change type="fixed">
Adjusted to CS:GO 10/29/2018 (10/30/2018 UTC, 1.36.5.8) update: Fixed -afxDetourPanorama not working (mirv_panorama_toggledebugger has still not been restored yet though).
</change>
<change type="fixed">
Fixed mirv_deathmsg lifeTimeMod not working as intended (was only supposed to be applied to localPlayer).
</change>
</changes>
</release>


<release>
<name>AfxHookSource</name>
<version>1.45.1</version>
Expand Down
12 changes: 12 additions & 0 deletions resources/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
<changelog>


<release>
<name>HLAE</name>
<version>2.56.3</version>
<time>2018-10-30T05:39Z</time>
<changes>
<change type="updated">
Included AfxHookSource 1.45.2 (2018-10-30T05:39Z).
</change>
</changes>
</release>


<release>
<name>HLAE</name>
<version>2.56.2</version>
Expand Down

0 comments on commit d869c98

Please sign in to comment.