Skip to content

Commit

Permalink
Fixed crash???
Browse files Browse the repository at this point in the history
  • Loading branch information
nullifiedcat committed Feb 24, 2017
1 parent 3a226c3 commit a1416f6
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 30 deletions.
18 changes: 8 additions & 10 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1168214098" name="TF2" parent="cdt.managedbuild.config.gnu.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1168214098." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.965909756" name="Linux GCC" nonInternalBuilderId="cdt.managedbuild.target.gnu.builder.exe.debug" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1799148153" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
<builder buildPath="${workspace_loc:/cathook}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1383099376" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
<builder autoBuildTarget="all" buildPath="${workspace_loc:/cathook}/TF2" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.101808636" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.782611349" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.883030293" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.908662295" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
Expand All @@ -40,12 +38,12 @@
<option id="gnu.cpp.compiler.option.other.other.1916750610" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -shared -Wall -Wno-unknown-pragmas -fmessage-length=0 -m32 -fvisibility=hidden" valueType="string"/>
<option id="gnu.cpp.compiler.option.other.pic.920050344" name="Position Independent Code (-fPIC)" superClass="gnu.cpp.compiler.option.other.pic" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.include.paths.1848710724" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="/home/nullifiedcat/source-sdk-2013-master/mp/src/public"/>
<listOptionValue builtIn="false" value="/home/nullifiedcat/cathook/imgui"/>
<listOptionValue builtIn="false" value="/home/nullifiedcat/source-sdk-2013-master/mp/src/mathlib"/>
<listOptionValue builtIn="false" value="/home/nullifiedcat/source-sdk-2013-master/mp/src/common"/>
<listOptionValue builtIn="false" value="/home/nullifiedcat/source-sdk-2013-master/mp/src/public/tier1"/>
<listOptionValue builtIn="false" value="/home/nullifiedcat/source-sdk-2013-master/mp/src/public/tier0"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/source-sdk-2013/mp/src/common}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/source-sdk-2013/mp/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/source-sdk-2013/mp/src/public}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/source-sdk-2013/mp/src/mathlib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/source-sdk-2013/mp/src/public/tier0}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/source-sdk-2013/mp/src/public/tier1}&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.other.verbose.1509393088" name="Verbose (-v)" superClass="gnu.cpp.compiler.option.other.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.116822749" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
Expand Down Expand Up @@ -103,7 +101,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="autogen|vtables|segvcatch|gui|copypasted|targeting|ipc|mem|hooks|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="source-sdk-2013|autogen|vtables|segvcatch|gui|copypasted|targeting|ipc|mem|hooks|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="autogen|vtables|segvcatch|gui|targeting|ipc|mem" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="depr" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/gui"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/ipc"/>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
I know that the style sucks. There is a lot of design errors and cancerous patterns. Most of the code was intended to be *temporary*.

# Compilation
`git submodule update --init --recursive` after cloning, then
`make`

# Injection
Expand Down
6 changes: 3 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CC=g++
CFLAGS=-std=gnu++11 -D_POSIX=1 -DRAD_TELEMETRY_DISABLED -DLINUX=1 -D_LINUX=1 -DPOSIX=1 -DGNUC=1 -DNO_MALLOC_OVERRIDE -O3 -w -c -shared -Wall -Wno-unknown-pragmas -fmessage-length=0 -m32 -fvisibility=hidden -fPIC
SDKFOLDER=source-sdk-2013/mp/src
CFLAGS+=-D__DRM_HWID_0='$(HWID_0)' -D__DRM_HWID_1='$(HWID_1)' -D__DRM_HWID_2='$(HWID_2)' -D__DRM_HWID_3='$(HWID_3)' -D__DRM_NAME='"$(DRM_NAME)"' -D__DRM_EXPIRES='$(DRM_EXPIRES)' -DCATHOOK_BUILD_NUMBER='"$(COUNTER)"'
CINCLUDES=-I$(SDKFOLDER)/public -I$(SDKFOLDER)/mathlib -I$(SDKFOLDER)/common -I$(SDKFOLDER)/public/tier1 -I$(SDKFOLDER)/public/tier0
CFLAGS+=-D_DEVELOPER
CINCLUDES=-I$(SDKFOLDER)/public -I$(SDKFOLDER)/mathlib -I$(SDKFOLDER)/common -I$(SDKFOLDER)/public/tier1 -I$(SDKFOLDER)/public/tier0 -I$(SDKFOLDER)
LDFLAGS=-m32 -fno-gnu-unique -D_GLIBCXX_USE_CXX11_ABI=0 -shared
LDLIBS=-Bstatic -lvstdlib -lstdc++ -lc -ltier0
OBJ_DIR := obj
Expand All @@ -24,7 +24,7 @@ OBJECTS := $(patsubst $(SRC_DIR)/%,$(OBJ_DIR)/%,$(patsubst %.cpp,%.o,$(SOURCES))

.PHONY: clean directories

all: directories cathook
all: clean directories cathook

directories:
mkdir -p bin
Expand Down
8 changes: 1 addition & 7 deletions src/gui/RootWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ void TICallback(CTextInput* thisptr, std::string olds, std::string news) {
}
}

RootWindow::RootWindow() : CBaseWindow("root") {

}
RootWindow::RootWindow() : CBaseWindow("root") {}

void RootWindow::Setup() {
g_pGUI->m_pTooltip = new CTooltip();
Expand Down Expand Up @@ -143,7 +141,3 @@ void RootWindow::Setup() {
td->SetPositionMode(INLINE);
this->AddChild(wgt);*/
}

RootWindow::~RootWindow() {

}
1 change: 0 additions & 1 deletion src/gui/RootWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
class RootWindow : public CBaseWindow {
public:
RootWindow();
~RootWindow();

void Setup();

Expand Down
10 changes: 1 addition & 9 deletions src/hack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ void hack::Initialize() {
else if (TF2C) g_pClassID = new ClassIDTF2C();
else if (HL2DM) g_pClassID = new ClassIDHL2DM();
g_pClassID->Init();

draw::Initialize();
colors::Init();
if (TF2) {
Expand All @@ -141,20 +140,13 @@ void hack::Initialize() {
hack::c_Cat = CreateConCommand(CON_NAME, &hack::CC_Cat, "Info");
hack::InitHacks();
g_Settings.Init();
#if ENTITY_CACHE_PROFILER == true
if (!g_vEntityCacheProfiling) {
g_vEntityCacheProfiling = CREATE_CV(CV_SWITCH, "entity_cache_profiling", "0", "Entity cache profiling");
}
#endif
g_pGUI = new CatGUI();
g_pGUI->Setup();
EndConVars();
gNetvars.init();
InitNetVars();

g_pLocalPlayer = new LocalPlayer();
g_pPlayerResource = new TFPlayerResource();

hooks::hkPanel = new hooks::VMTHook();
hooks::hkPanel->Init(interfaces::panel, 0);
//hooks::hkPanel->HookMethod((void*)&hack::Hk_PaintTraverse, hooks::offPaintTraverse);
Expand All @@ -179,7 +171,6 @@ void hack::Initialize() {
hooks::hkStudioRender->Init((void*)interfaces::render, 0);
hooks::hkStudioRender->HookMethod((void*)BeginFrame_hook, hooks::offBeginFrame);
hooks::hkStudioRender->Apply();

hooks::hkClient = new hooks::VMTHook();
hooks::hkClient->Init((void*)interfaces::baseClient, 0);
hooks::hkClient->HookMethod((void*)FrameStageNotify_hook, hooks::offFrameStageNotify);
Expand All @@ -188,6 +179,7 @@ void hack::Initialize() {
hooks::hkClient->Apply();
if (TF2) g_GlowObjectManager = *reinterpret_cast<CGlowObjectManager**>(gSignatures.GetClientSignature("C1 E0 05 03 05") + 5);
InitStrings();
logging::Info("Init done.");
g_pChatStack = new ChatStack();
}

Expand Down
1 change: 1 addition & 0 deletions src/sdk/convar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static bool s_bRegistered = false;

void SetCVarInterface(ICvar* iface) {
g_pCVar = iface;
logging::Info("Set interface to 0x%08x", iface);
}

class CDefaultAccessor : public IConCommandBaseAccessor
Expand Down

0 comments on commit a1416f6

Please sign in to comment.