From a31f3de27024aedec67776ba1e80fbaa8417dfbc Mon Sep 17 00:00:00 2001 From: ermaccer <40604575+ermaccer@users.noreply.github.com> Date: Mon, 30 Aug 2021 20:19:30 +0200 Subject: [PATCH] weapon adjuster thing --- source/code/plugin/weapon_adjuster/eWeaponAdjuster.cpp | 3 +-- source/dllmain.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/code/plugin/weapon_adjuster/eWeaponAdjuster.cpp b/source/code/plugin/weapon_adjuster/eWeaponAdjuster.cpp index 3ac43ee..21b16d3 100644 --- a/source/code/plugin/weapon_adjuster/eWeaponAdjuster.cpp +++ b/source/code/plugin/weapon_adjuster/eWeaponAdjuster.cpp @@ -10,6 +10,7 @@ eWeaponEntry eWeaponAdjuster::m_vWeapons[TOTAL_COLLECTABLES]; void eWeaponAdjuster::InitHooks() { + if (ReadFile("data\\weapons.dat")) { InjectHook(0x470F82, CCollectable_IsSniperRifle, PATCH_CALL); @@ -74,8 +75,6 @@ bool eWeaponAdjuster::ReadFile(const char * path) sprintf(wep.m_szExecution, execution); m_vWeapons[GetTypeFromStr(collectableType)] = wep; - - printf("%d %d %s\n", wep.m_nType, wep.m_iFlags, wep.m_szExecution); } } diff --git a/source/dllmain.cpp b/source/dllmain.cpp index d861897..ad6440d 100644 --- a/source/dllmain.cpp +++ b/source/dllmain.cpp @@ -37,10 +37,10 @@ int GenericFalseReturn() { return 0; } void GenericDummy() { } void Init() { - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); + //AllocConsole(); + //freopen("CONIN$", "r", stdin); + //freopen("CONOUT$", "w", stdout); + //freopen("CONOUT$", "w", stderr); eSettingsManager::Init();