From f799ce1e0b50850e7e418225c2bf337e728bc0b8 Mon Sep 17 00:00:00 2001 From: Zeuto Date: Wed, 1 May 2019 19:58:31 +0200 Subject: [PATCH] Fixed voice icon is now only been showed when loggedin --- ReallifeGamemode.Client/Voice/main.ts | 22 ++++++++++-------- .../dlcpacks/voiceimages/dlc.rpf | Bin 75776 -> 75776 bytes ReallifeGamemode.Client/index.ts | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ReallifeGamemode.Client/Voice/main.ts b/ReallifeGamemode.Client/Voice/main.ts index b3dd6ce1..900a057a 100644 --- a/ReallifeGamemode.Client/Voice/main.ts +++ b/ReallifeGamemode.Client/Voice/main.ts @@ -4,7 +4,7 @@ * @copyright (c) 2008 - 2019 Life of German */ -export default function voice() { +export default function voice(globalData: GlobalData) { let dictLoaded = false; const Use3d = true; @@ -24,17 +24,19 @@ export default function voice() { mp.events.add('render', () => { - if (!dictLoaded) { - mp.game.graphics.requestStreamedTextureDict("voiceimages", true); - dictLoaded = true; - } + if (globalData.LoggedIn) { + if (!dictLoaded) { + mp.game.graphics.requestStreamedTextureDict("voiceimages", true); + dictLoaded = true; + } - var { x, y } = mp.game.graphics.getScreenActiveResolution(0, 0); + var { x, y } = mp.game.graphics.getScreenActiveResolution(0, 0); - if (!mp.voiceChat.muted) { - mp.game.graphics.drawSprite("voiceimages", "microphone-black-shape", 0.165, 0.952, 0.015, 0.015 * (x / y), 0, 0, 102, 0, 255); - } else { - mp.game.graphics.drawSprite("voiceimages", "microphone-off", 0.165, 0.952, 0.015, 0.015 * (x / y), 0, 255, 51, 51, 255); + if (!mp.voiceChat.muted) { + mp.game.graphics.drawSprite("voiceimages", "microphone-black-shape", 0.165, 0.952, 0.015, 0.015 * (x / y), 0, 0, 102, 0, 255); + } else { + mp.game.graphics.drawSprite("voiceimages", "microphone-off", 0.165, 0.952, 0.015, 0.015 * (x / y), 0, 255, 51, 51, 255); + } } }) diff --git a/ReallifeGamemode.Client/dlcpacks/voiceimages/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/voiceimages/dlc.rpf index 97ce030399bff2515386948a8625f885fa888eac..81a9fbcf91a3537f8d6144c8f1082bfad8a0eb56 100644 GIT binary patch delta 265 zcmV+k0rviY&;)?c1b;V1P*Mf}002M$00960?+^W-}RW{O}dZtNW( zqoV*7rX&`Sxc%Xh`O=4(J*%L{+UqcqHj(iYub1lR#eCmR9%ch1AwCu-2J)v<=V}2w zC;mMbRn3skqKJazm3smZh?KaLsQ-B0GuNDf!eHl1=m3EHgE3%s9z0OPBKC*{y%4)( z=)91lm6yX*L;T%LU`e?)CQ+{4tqb!EvC8-B{$SEn;eij4YVq?1OfZq0