From 705ab362f0dc2d6fe20399f7064a36f6a1ebe65b Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 27 Jun 2016 19:30:58 +0200 Subject: [PATCH] Fix intro --- src/Components/Modules/QuickPatch.cpp | 1 + src/Components/Modules/Toast.cpp | 17 ++++------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 2e748b1a..185a5f79 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -238,6 +238,7 @@ namespace Components // intro stuff Utils::Hook::Nop(0x60BEE9, 5); // Don't show legals + Utils::Hook::Nop(0x60BEF6, 5); // Don't reset the intro dvar Utils::Hook::Set(0x60BED2, "unskippablecinematic IW_logo\n"); // Redirect logs diff --git a/src/Components/Modules/Toast.cpp b/src/Components/Modules/Toast.cpp index e21e4976..1ede6d84 100644 --- a/src/Components/Modules/Toast.cpp +++ b/src/Components/Modules/Toast.cpp @@ -37,14 +37,14 @@ namespace Components Game::vec4_t color = { 0, 0, 0, 0.7f }; Game::vec4_t wColor = { 1.0f, 1.0f, 1.0f, 1.0f }; + height /= 5; + height *= 4; + if (Game::Com_Milliseconds() < startTime || (startTime + duration) < Game::Com_Milliseconds()) return; // Fadein stuff else if (Game::Com_Milliseconds() - startTime < slideTime) { - height /= 5; - height *= 4; - int diffH = Renderer::Height() / 5; int diff = Game::Com_Milliseconds() - startTime; double scale = 1.0 - ((1.0 * diff) / (1.0 * slideTime)); @@ -55,9 +55,6 @@ namespace Components // Fadeout stuff else if (Game::Com_Milliseconds() - startTime > (duration - slideTime)) { - height /= 5; - height *= 4; - int diffH = Renderer::Height() / 5; int diff = (startTime + duration) - Game::Com_Milliseconds(); double scale = 1.0 - ((1.0 * diff) / (1.0 * slideTime)); @@ -65,12 +62,6 @@ namespace Components height += diffH; } - else - { - height /= 5; - height *= 4; - } - height += bHeight / 2 + aCorners - cornerSize; // Calculate width data @@ -98,7 +89,7 @@ namespace Components Game::CL_DrawStretchPicPhysical(static_cast(width / 2 - bWidth / 2 + aCorners), static_cast(height - bHeight / 2 + cornerSize), static_cast(cornerSize - aCorners), static_cast(bHeight - cornerSize * 2), 0, 0, 1.0f, 1.0f, color, white); // Left Game::CL_DrawStretchPicPhysical(static_cast(width / 2 + bWidth / 2 - cornerSize), static_cast(height - bHeight / 2 + cornerSize), static_cast(cornerSize - aCorners), static_cast(bHeight - cornerSize * 2), 0, 0, 1.0f, 1.0f, color, white); // Right - // Center + // Center Game::CL_DrawStretchPicPhysical(static_cast(width / 2 - (bWidth - cornerSize * 2) / 2), static_cast(height - (bHeight - cornerSize * 2) / 2), static_cast(bWidth - cornerSize * 2), static_cast(bHeight - cornerSize * 2), 0, 0, 1.0f, 1.0f, color, white); // Image