From 5f0cfd7a19a652a2868ea41371eea029b24076f5 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Wed, 13 Jan 2016 13:18:36 +0100 Subject: [PATCH] Intro stuff. --- src/Components/Modules/ConnectProtocol.cpp | 19 +++++++++++-------- src/Components/Modules/QuickPatch.cpp | 5 +++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Components/Modules/ConnectProtocol.cpp b/src/Components/Modules/ConnectProtocol.cpp index b5e414f8..7c41d6f3 100644 --- a/src/Components/Modules/ConnectProtocol.cpp +++ b/src/Components/Modules/ConnectProtocol.cpp @@ -218,15 +218,18 @@ namespace Components // Fire protocol handlers // Make sure this happens after the pipe-initialization! - if (!Singleton::IsFirstInstance() && ConnectProtocol::Used()) + if (ConnectProtocol::Used()) { - IPCPipe::Write("connect", ConnectProtocol::ConnectContainer.ConnectString); - ExitProcess(0); - } - else - { - // Only skip intro here, invocation will be done later. - Utils::Hook::Set(0x60BECF, 0xEB); + if (!Singleton::IsFirstInstance()) + { + IPCPipe::Write("connect", ConnectProtocol::ConnectContainer.ConnectString); + ExitProcess(0); + } + else + { + // Only skip intro here, invocation will be done later. + Utils::Hook::Set(0x60BECF, 0xEB); + } } } } diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 129945ae..d3984c8a 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -139,6 +139,11 @@ namespace Components Utils::Hook::Nop(0x4AA89F, 2); Utils::Hook::Nop(0x4AA8A1, 6); + // intro stuff + Utils::Hook::Nop(0x60BEE9, 5); // Don't show legals + Utils::Hook::Set(0x60BED2, "unskippablecinematic IW_logo\n"); + Utils::Hook::Nop(0x60BEF6, 5); // Don't reset intro dvar + // Rename stat file - TODO: beautify Utils::Hook::SetString(0x71C048, "iw4x.stat");