diff --git a/Config/MovieAdsRemover_Config.ini b/Config/MovieAdsRemover_Config.ini index 2773785..ee5b56a 100644 --- a/Config/MovieAdsRemover_Config.ini +++ b/Config/MovieAdsRemover_Config.ini @@ -1,13 +1,18 @@ [MovieAdsRemover.MovieAdsRemover] # Removes the 'Movies' section completely bCompletelyDisable=true -# Replace the movies with a texture image that you can specify below +# Replace the movies with a texture image/GIF that you can specify below bReplaceWithTexture=true -# Texture Class Name -# All textures MUST be of dimension 1024/1024. Please Up-scale or Down-scale before you +# First, make sure the image you are trying to import is: +# A power-of-two number of pixels across (e.g. 1x1, 16x4, 64x128, 256x256, ...) up to 1024x1024. +# Using 8-bit color (256 color indexed) BMP or PCX for UT; 8-bit indexed BMP or PCX, 24 bit or 32 bit TGA or DDS for UT2003. +# Saved in .pcx or .bmp for UT; saved in .pcx, .bmp, targa, DXT or UPaint for UT2003. # Import to KF-SDK. In-game they will automatically be downscaled to fit view of w=320 h=240 -; sTextureName=MARTex.AT_FirePlace # This is just an Image -sTextureName=MARTex.Doro.Blood_a01 # This is an actual GIF -# Texture Dimensions -iW=320 -iH=240 \ No newline at end of file +# This is just an `Image` +; sTextureName=MARTex.AT_FirePlace +# This is a `GIF` +sTextureName=MARTex.Doro.Blood_a01 +# FPS of the Animated GIF/Texture - if set to 0, FPS will always be same +# as the Player's own FPS. This is sometimes problematic if you have 60+ FPS +# then the animation will be super fast! +fMaxFPS=60 \ No newline at end of file diff --git a/MovieAdsRemover/Classes/CustomLobbyMenu.uc b/MovieAdsRemover/Classes/CustomLobbyMenu.uc index 4b1bfea..dc28a9e 100644 --- a/MovieAdsRemover/Classes/CustomLobbyMenu.uc +++ b/MovieAdsRemover/Classes/CustomLobbyMenu.uc @@ -1,7 +1,10 @@ +// Modified class of LobbyMenu to show custon Textures +// as IMGs or GIFs + Class CustomLobbyMenu extends LobbyMenu DependsOn(MovieAdsRemover); -var texture ImgTex; -var string ImgName; +var texture CustomTex; +var string TexName; var MovieAdsRemover MutRef; function InitComponent(GUIController MyC, GUIComponent MyO) @@ -54,19 +57,25 @@ function DrawPerk(Canvas Canvas) AdBackground.WinWidth = 320 * X + 10; AdBackground.WinHeight = 240 * X + 37; - // Show Canvas + Img - ImgName = MutRef.sTextureName; - ImgTex = texture(DynamicLoadObject(ImgName, class'texture', true)); - Canvas.DrawTile(ImgTex, 320 * X, 240 * X, - 0, 0, MutRef.iW, MutRef.iH); + // Show Canvas + Custom Texture + TexName = MutRef.sTextureName; + CustomTex = texture(DynamicLoadObject(TexName, class'texture', true)); + + // If 0, then FPS of animation will be same as Player's FPS + // Always recommended to 60 + // If you are using an image instead of GIF, you can set this to 0 + if(MutRef.fMaxFPS != 0) CustomTex.MaxFrameRate = MutRef.fMaxFPS; + + // Draw Texture + Canvas.DrawTile(CustomTex, 320 * X, 240 * X, 0, 0, CustomTex.USize, CustomTex.VSize); } else { - AdBackground.WinTop=0; - AdBackground.WinLeft=0; - AdBackground.WinWidth=0; - AdBackground.WinHeight=0; - AdBackground.RenderWeight=0; + AdBackground.WinTop=0; + AdBackground.WinLeft=0; + AdBackground.WinWidth=0; + AdBackground.WinHeight=0; + AdBackground.RenderWeight=0; } diff --git a/MovieAdsRemover/Classes/MovieAdsRemover.uc b/MovieAdsRemover/Classes/MovieAdsRemover.uc index 5676d99..0fcfec9 100644 --- a/MovieAdsRemover/Classes/MovieAdsRemover.uc +++ b/MovieAdsRemover/Classes/MovieAdsRemover.uc @@ -11,7 +11,7 @@ class MovieAdsRemover extends Mutator Config(MovieAdsRemover_Config); // Config Vars var config bool bCompletelyDisable, bReplaceWithTexture; var config string sTextureName; -var config int iW, iH; +var config float fMaxFPS; // Local Vars var MovieAdsRemover Mut; @@ -20,7 +20,8 @@ replication { unreliable if (Role == ROLE_Authority) bCompletelyDisable,bReplaceWithTexture, - sTextureName; + sTextureName, + fMaxFPS; } // Initialization @@ -61,7 +62,7 @@ defaultproperties { GroupName = "KF-MovieAdsRemover" FriendlyName = "Movie Ads Remover - v1.0" - Description = "Remove 'Movies Section' from LobbyMenu, or replace with a custom Image for your own Server; Written by Vel-San" + Description = "Remove 'Movies Section' from LobbyMenu, or replace with a custom IMG/GIF for your own Server; Written by Vel-San" bAddToServerPackages=true RemoteRole = ROLE_SimulatedProxy bAlwaysRelevant = true diff --git a/Textures/MARTex.utx b/Textures/MARTex.utx index 6a59cf2..3eeab74 100644 Binary files a/Textures/MARTex.utx and b/Textures/MARTex.utx differ