diff --git a/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.cs b/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.cs deleted file mode 100644 index f09d614..0000000 --- a/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; - -namespace BeatrunAnimInstaller -{ - internal class BeatrunAnimInstaller - { - private static readonly string inDir = "."; - private static readonly string outDir = "gamemodes\\beatrun\\content\\models"; - private static readonly List choices = new List() { "Beatrun Reanimated", "Original Animations" }; - - static void RecursiveCopyDir(string inputDir, string outputDir) - { - if (!Directory.Exists(inputDir)) return; - if (!Directory.Exists(outputDir)) Directory.CreateDirectory(outputDir); - - foreach (string filePath in Directory.GetFiles(inputDir)) - { - string fileName = Path.GetFileName(filePath); - File.Copy(filePath, outputDir + Path.DirectorySeparatorChar + fileName, true); - Console.WriteLine(string.Format("Copied {0} to {1}", filePath, outputDir)); - } - - foreach (string dirPath in Directory.GetDirectories(inputDir)) - { - string dirName = Path.GetDirectoryName(dirPath); - RecursiveCopyDir(dirPath, outputDir + Path.DirectorySeparatorChar + dirName); - } - } - - static void Main(string[] args) - { - Console.WriteLine("Select animations to install:"); - Console.WriteLine(""); - int i = 1; - foreach (string choice in choices) - { - Console.WriteLine(string.Format("{0}: {1}", i, choice)); - i++; - } - Console.WriteLine(""); - - while (true) - { - ConsoleKeyInfo key = Console.ReadKey(true); - - if (key.Key == ConsoleKey.Enter || key.Key == ConsoleKey.Escape) break; - - char keyChar = key.KeyChar; - if (char.IsDigit(keyChar)) - { - int index = keyChar - '0'; - string choice = choices[index - 1]; - if (choice != null) - { - Console.WriteLine(string.Format("Selected pack: {0}", choice)); - - RecursiveCopyDir(inDir + Path.DirectorySeparatorChar + choice, outDir); - - Console.WriteLine("Press any key to exit..."); - Console.ReadKey(true); - - break; - } - } - } - } - } -} diff --git a/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.csproj b/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.csproj deleted file mode 100644 index 4573139..0000000 --- a/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.csproj +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Debug - AnyCPU - {6096D195-BC98-4E67-86F7-CBD21A427405} - Exe - BeatrunAnimInstaller - BeatrunAnimInstaller - v4.8 - 512 - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - BeatrunAnimInstaller.BeatrunAnimInstaller - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.sln b/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.sln deleted file mode 100644 index 88313e6..0000000 --- a/BeatrunAnimInstaller_Source/BeatrunAnimInstaller.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.6.33829.357 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeatrunAnimInstaller", "BeatrunAnimInstaller.csproj", "{6096D195-BC98-4E67-86F7-CBD21A427405}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6096D195-BC98-4E67-86F7-CBD21A427405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6096D195-BC98-4E67-86F7-CBD21A427405}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6096D195-BC98-4E67-86F7-CBD21A427405}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6096D195-BC98-4E67-86F7-CBD21A427405}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {A9FCE6D1-6D4B-4DFB-91A2-DCC7E79299D8} - EndGlobalSection -EndGlobal diff --git a/BeatrunAnimInstaller_Source/Properties/AssemblyInfo.cs b/BeatrunAnimInstaller_Source/Properties/AssemblyInfo.cs deleted file mode 100644 index 593267a..0000000 --- a/BeatrunAnimInstaller_Source/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Общие сведения об этой сборке предоставляются следующим набором -// набора атрибутов. Измените значения этих атрибутов для изменения сведений, -// связанные с этой сборкой. -[assembly: AssemblyTitle("BeatrunAnimInstaller")] -[assembly: AssemblyDescription("Beatrun Animations Installer")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("beatrun.ru")] -[assembly: AssemblyProduct("BeatrunAnimInstaller")] -[assembly: AssemblyCopyright("Copyright © 2023")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми -// для компонентов COM. Если необходимо обратиться к типу в этой сборке через -// из модели COM задайте для атрибута ComVisible этого типа значение true. -[assembly: ComVisible(false)] - -// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM -[assembly: Guid("6096d195-bc98-4e67-86f7-cbd21a427405")] - -// Сведения о версии сборки состоят из указанных ниже четырех значений: -// -// Основной номер версии -// Дополнительный номер версии -// Номер сборки -// Номер редакции -// -// Можно задать все значения или принять номера сборки и редакции по умолчанию -// используя "*", как показано ниже: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BeatrunAnimInstaller_Source/README.md b/BeatrunAnimInstaller_Source/README.md deleted file mode 100644 index ad9bdb8..0000000 --- a/BeatrunAnimInstaller_Source/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# ENGLISH - -## Animations Installer Source Code - -Here you can find source code of the animations installer.\ -I don't know why you will ever need that but we put it here so you can be sure we don't supply malware with our project. - -## How To Use - -Please refer to this [README](../beatrun/README.md). - -## Credits - -* [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ) - Creator of this installer. - - -# RUSSIAN - -## Исходный код установщика анимаций - -Здесь находятся исходники нашего установщика анимаций.\ -Я не знаю зачем это вам надо, но мы оставили их здесь чтобы вы могли убедиться что мы не распространяем вирусы в нашем проекте. - -## Как использовать - -Прочитайте этот файл [README](../beatrun/README.md). - -## Благодарность - -* [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ) - Создатель установщика. diff --git a/BeatrunAnimInstaller_Source/app.config b/BeatrunAnimInstaller_Source/app.config deleted file mode 100644 index 3e0e37c..0000000 --- a/BeatrunAnimInstaller_Source/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/beatrun/Beatrun Reanimated/climbanim.dx80.vtx b/beatrun/Beatrun Reanimated/climbanim.dx80.vtx deleted file mode 100644 index 560f6f4..0000000 Binary files a/beatrun/Beatrun Reanimated/climbanim.dx80.vtx and /dev/null differ diff --git a/beatrun/Beatrun Reanimated/climbanim.dx90.vtx b/beatrun/Beatrun Reanimated/climbanim.dx90.vtx deleted file mode 100644 index a8c2747..0000000 Binary files a/beatrun/Beatrun Reanimated/climbanim.dx90.vtx and /dev/null differ diff --git a/beatrun/Beatrun Reanimated/climbanim.mdl b/beatrun/Beatrun Reanimated/climbanim.mdl deleted file mode 100644 index 730232c..0000000 Binary files a/beatrun/Beatrun Reanimated/climbanim.mdl and /dev/null differ diff --git a/beatrun/Beatrun Reanimated/climbanim.sw.vtx b/beatrun/Beatrun Reanimated/climbanim.sw.vtx deleted file mode 100644 index 797a0f1..0000000 Binary files a/beatrun/Beatrun Reanimated/climbanim.sw.vtx and /dev/null differ diff --git a/beatrun/Beatrun Reanimated/climbanim.vvd b/beatrun/Beatrun Reanimated/climbanim.vvd deleted file mode 100644 index aeef0bc..0000000 Binary files a/beatrun/Beatrun Reanimated/climbanim.vvd and /dev/null differ diff --git a/beatrun/BeatrunAnimInstaller.exe b/beatrun/BeatrunAnimInstaller.exe deleted file mode 100644 index f21ef47..0000000 Binary files a/beatrun/BeatrunAnimInstaller.exe and /dev/null differ diff --git a/beatrun/README.md b/beatrun/README.md deleted file mode 100644 index 39438f3..0000000 --- a/beatrun/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# ENGLISH - -## Animations Installer - -You can use **BeatrunAnimInstaller** (located here) to change animations. Currently we have: - -* Beatrun Reanimated Project. -* Original but fixed animations. - -## How To Use - -1. Start the executable. -2. Press a key on your keyboard with the number of the animation you want to install. - -> [!NOTE] -> If nothing is changed, close the game and try run the program with admin priveleges. - -## Source Code - -Please refer to this [README](../BeatrunAnimInstaller_Source/README.md). - - -# RUSSIAN - -## Установщик анимаций - -Используйте **BeatrunAnimInstaller** (расположен прямо тут) чтобы менять анимации. На данный момент у нас имеются: - -* Beatrun Reanimated Project. -* Починенные оригинальные анимации. - -## Как использовать - -1. Запустите исполняемый файл. -2. Нажмите цифру желаемых анимаций на клавиатуре. - -> [!NOTE] -> Если ничего не изменилось, закройте игру и запустите файл от имени администратора. - -## Исходный код - -Прочитайте этот файл [README](../BeatrunAnimInstaller_Source/README.md). diff --git a/beatrun/gamemodes/beatrun/content/models/climbanim.dx80.vtx b/beatrun/gamemodes/beatrun/content/models/new_climbanim.dx80.vtx similarity index 100% rename from beatrun/gamemodes/beatrun/content/models/climbanim.dx80.vtx rename to beatrun/gamemodes/beatrun/content/models/new_climbanim.dx80.vtx diff --git a/beatrun/gamemodes/beatrun/content/models/climbanim.dx90.vtx b/beatrun/gamemodes/beatrun/content/models/new_climbanim.dx90.vtx similarity index 100% rename from beatrun/gamemodes/beatrun/content/models/climbanim.dx90.vtx rename to beatrun/gamemodes/beatrun/content/models/new_climbanim.dx90.vtx diff --git a/beatrun/gamemodes/beatrun/content/models/climbanim.mdl b/beatrun/gamemodes/beatrun/content/models/new_climbanim.mdl similarity index 100% rename from beatrun/gamemodes/beatrun/content/models/climbanim.mdl rename to beatrun/gamemodes/beatrun/content/models/new_climbanim.mdl diff --git a/beatrun/gamemodes/beatrun/content/models/climbanim.sw.vtx b/beatrun/gamemodes/beatrun/content/models/new_climbanim.sw.vtx similarity index 100% rename from beatrun/gamemodes/beatrun/content/models/climbanim.sw.vtx rename to beatrun/gamemodes/beatrun/content/models/new_climbanim.sw.vtx diff --git a/beatrun/gamemodes/beatrun/content/models/climbanim.vvd b/beatrun/gamemodes/beatrun/content/models/new_climbanim.vvd similarity index 100% rename from beatrun/gamemodes/beatrun/content/models/climbanim.vvd rename to beatrun/gamemodes/beatrun/content/models/new_climbanim.vvd diff --git a/beatrun/Original Animations/climbanim.dx80.vtx b/beatrun/gamemodes/beatrun/content/models/old_climbanim.dx80.vtx similarity index 100% rename from beatrun/Original Animations/climbanim.dx80.vtx rename to beatrun/gamemodes/beatrun/content/models/old_climbanim.dx80.vtx diff --git a/beatrun/Original Animations/climbanim.dx90.vtx b/beatrun/gamemodes/beatrun/content/models/old_climbanim.dx90.vtx similarity index 100% rename from beatrun/Original Animations/climbanim.dx90.vtx rename to beatrun/gamemodes/beatrun/content/models/old_climbanim.dx90.vtx diff --git a/beatrun/Original Animations/climbanim.mdl b/beatrun/gamemodes/beatrun/content/models/old_climbanim.mdl similarity index 100% rename from beatrun/Original Animations/climbanim.mdl rename to beatrun/gamemodes/beatrun/content/models/old_climbanim.mdl diff --git a/beatrun/Original Animations/climbanim.sw.vtx b/beatrun/gamemodes/beatrun/content/models/old_climbanim.sw.vtx similarity index 100% rename from beatrun/Original Animations/climbanim.sw.vtx rename to beatrun/gamemodes/beatrun/content/models/old_climbanim.sw.vtx diff --git a/beatrun/Original Animations/climbanim.vvd b/beatrun/gamemodes/beatrun/content/models/old_climbanim.vvd similarity index 100% rename from beatrun/Original Animations/climbanim.vvd rename to beatrun/gamemodes/beatrun/content/models/old_climbanim.vvd diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties index 1b062e5..ea9447b 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties @@ -37,10 +37,10 @@ beatrun.convars.viewbobstabilization=Turn on to reduce motion sickness by making beatrun.convars.fov=Changes player's Field Of View beatrun.convars.cpsave=Respawning during a course will go back to the last hit checkpoint beatrun.convars.faststart=Faster start countdown -beatrun.convars.disablegrapple=Disables grapple ability +beatrun.convars.disablegrapple=Toggles grapple ability beatrun.convars.puristmode=Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how ME games handle this.\n0 = No restrictions\n1 = Reduced move speed in the air -beatrun.convars.quickturnground=Enables quickturning with secondary attack while on the ground -beatrun.convars.quickturnhandsonly=Enables quickturning with "Runner Hands" only +beatrun.convars.quickturnground=Toggles quickturning with secondary attack while on the ground +beatrun.convars.quickturnhandsonly=Toggles quickturning with "Runner Hands" only beatrun.convars.showspeedometer=Toggle speedometer visibility # HUD @@ -140,17 +140,20 @@ beatrun.toolsmenu.camera.fovdesc=Changes your Field Of View beatrun.toolsmenu.gameplay.name=Gameplay beatrun.toolsmenu.gameplay.desc=Gameplay Settings +beatrun.toolsmenu.gameplay.oldanims=Old Animations +beatrun.toolsmenu.gameplay.oldanimsdesc=Toggles the use of old animations instead new ones + beatrun.toolsmenu.gameplay.quickturnground=Quickturn Ground -beatrun.toolsmenu.gameplay.quickturngrounddesc=Enables quickturning with secondary attack while on the ground +beatrun.toolsmenu.gameplay.quickturngrounddesc=Toggles quickturning with secondary attack while on the ground beatrun.toolsmenu.gameplay.quickturnhandsonly=Quickturn Hands Only -beatrun.toolsmenu.gameplay.quickturnhandsonlydesc=Enables quickturning with "Runner Hands" only +beatrun.toolsmenu.gameplay.quickturnhandsonlydesc=Toggles quickturning with "Runner Hands" only beatrun.toolsmenu.gameplay.puristmode=Purist Mode beatrun.toolsmenu.gameplay.puristmodedesc=Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how Mirror's Edge games handle this.\nDisabled = No restrictions\nEnabled = Reduced move speed in the air beatrun.toolsmenu.gameplay.disablegrapple=Disable Grapple Ability -beatrun.toolsmenu.gameplay.disablegrappledesc=Disables grapple ability +beatrun.toolsmenu.gameplay.disablegrappledesc=Toggles grapple ability beatrun.toolsmenu.gameplay.rollspeedloss=Lose Speed on Roll beatrun.toolsmenu.gameplay.rollspeedlossdesc=Toggles loss of speed on safety roll diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties index b33ed92..27f7461 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties @@ -37,11 +37,11 @@ beatrun.convars.viewbobstabilization=Включите чтобы снизить beatrun.convars.fov=Угол обзора игрока beatrun.convars.cpsave=Респавн в курсах отправляет на последнюю контрольную точку beatrun.convars.faststart=Быстрый отчёт в начале курса -beatrun.convars.disablegrapple=Переключить крюк-кошку +beatrun.convars.disablegrapple=Переключает крюк-кошку beatrun.convars.puristmode=Режим Purist это клиентский параметр который сильно снижает движение игрока в стороны будучи в воздухе, прямо как в оригинальное ME.\n0 = Нет ограничений\n1 = Снижает движение игрока в воздухе в стороны -beatrun.convars.quickturnground=Переключить Quickturn будучи на земле -beatrun.convars.quickturnhandsonly=Переключить Quickturn только с "Runner Hands" -beatrun.convars.showspeedometer=Переключить спидометр +beatrun.convars.quickturnground=Переключает Quickturn будучи на земле +beatrun.convars.quickturnhandsonly=Переключает Quickturn только с "Runner Hands" +beatrun.convars.showspeedometer=Переключает спидометр # HUD beatrun.hud.course=Курс: %s @@ -137,6 +137,9 @@ beatrun.toolsmenu.camera.fovdesc=Изменяет ваш Угол Обзора beatrun.toolsmenu.gameplay.name=Геймплей beatrun.toolsmenu.gameplay.desc=Настройки геймплея +beatrun.toolsmenu.gameplay.oldanims=Старые анимации +beatrun.toolsmenu.gameplay.oldanimsdesc=Переключает использование старых анимаций заместо новеньких + beatrun.toolsmenu.gameplay.quickturnground=Quickturn на Земле beatrun.toolsmenu.gameplay.quickturngrounddesc=Переключает Quickturn будучи на земле (быстрый разворот) @@ -147,7 +150,7 @@ beatrun.toolsmenu.gameplay.puristmode=Режим Purist beatrun.toolsmenu.gameplay.puristmodedesc=Режим Purist это клиентский параметр который сильно снижает движение игрока в стороны будучи в воздухе, прямо как в оригинальное ME.\n0 = Нет ограничений\n1 = Снижает движение игрока в воздухе в стороны beatrun.toolsmenu.gameplay.disablegrapple=Отключить Крюк-Кошку -beatrun.toolsmenu.gameplay.disablegrappledesc=Отключает использование крюка-кошки +beatrun.toolsmenu.gameplay.disablegrappledesc=Переключает использование крюка-кошки beatrun.toolsmenu.gameplay.rollspeedloss=Потеря скорости при перекате beatrun.toolsmenu.gameplay.rollspeedlossdesc=Переключает потерю скорости при перекате diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua b/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua index 4a7038a..3745f5d 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua @@ -1,3 +1,5 @@ +local OldAnims = CreateClientConVar("Beatrun_OldAnims", "0", true, false, "") + local animtable = { lockang = false, allowmove = true, @@ -8,7 +10,7 @@ local animtable = { BodyLimitX = 90, AnimString = "jumpslow", CamIgnoreAng = true, - animmodelstring = "climbanim", + animmodelstring = "new_climbanim", BodyLimitY = 180, usefullbody = 2 } @@ -1397,6 +1399,37 @@ local function JumpAnim(event, ply) end end +function CheckAnims() + RemoveBodyAnim() + + if OldAnims:GetBool() then + animtable.animmodelstring = "old_climbanim" + else + animtable.animmodelstring = "new_climbanim" + end + + StartBodyAnim(animtable) + + if not IsValid(BodyAnim) then return end + + CreateBodyAnimArmCopy() + + if not LocalPlayer():ShouldDrawLocalPlayer() or CurTime() < 10 then + for k, v in ipairs(playermodelbones) do + local b = BodyAnim:LookupBone(v) + + if b then + BodyAnim:ManipulateBonePosition(b, Vector(0, 0, 100 * (k == 1 and -1 or 1))) + end + end + end +end + +cvars.AddChangeCallback("Beatrun_OldAnims", function(cvar, vOld, vNew) + CheckAnims() +end) + +hook.Add("PlayerInitialSpawn", "CheckAnims", CheckAnims) hook.Add("OnParkour", "JumpAnim", JumpAnim) function ArmInterrupt(anim) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua index 16ca803..46f4052 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua @@ -232,6 +232,9 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() panel:ClearControls() panel:SetName("#beatrun.toolsmenu.gameplay.desc") + panel:CheckBox("#beatrun.toolsmenu.gameplay.oldanims", "Beatrun_OldAnims") + panel:ControlHelp("#beatrun.toolsmenu.gameplay.oldanimsdesc") + panel:CheckBox("#beatrun.toolsmenu.gameplay.quickturnground", "Beatrun_QuickturnGround") panel:ControlHelp("#beatrun.toolsmenu.gameplay.quickturngrounddesc") diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua index 9a77cac..0d70075 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua @@ -11,7 +11,7 @@ local CLIMB_FOLDEDHEAVEUP = 6 local climb1 = { followplayer = false, - animmodelstring = "climbanim", + animmodelstring = "new_climbanim", allowmove = true, lockang = false, ignorez = true, diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua index 87d6b4d..5e19aca 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua @@ -68,7 +68,7 @@ hook.Add("SetupMove", "SafetyRoll", SafetyRollThink) local roll = { followplayer = true, - animmodelstring = "climbanim", + animmodelstring = "new_climbanim", showweapon = true, lockang = true, BodyAnimSpeed = 1.15, @@ -82,18 +82,24 @@ net.Receive("RollAnimSP", function() if net.ReadBool() then roll.AnimString = ply:UsingRH() and "land" or "landgun" - roll.animmodelstring = "climbanim" + roll.animmodelstring = "new_climbanim" roll.BodyAnimSpeed = 1 elseif net.ReadBool() then roll.AnimString = "evaderoll" - roll.animmodelstring = "climbanim" + roll.animmodelstring = "new_climbanim" roll.BodyAnimSpeed = 1.5 else roll.AnimString = ply:UsingRH() and "meroll" or "merollgun" - roll.animmodelstring = "climbanim" + roll.animmodelstring = "new_climbanim" roll.BodyAnimSpeed = 1.15 end + if GetConVar("Beatrun_OldAnims"):GetBool() then + roll.animmodelstring = "old_climbanim" + else + roll.animmodelstring = "new_climbanim" + end + CacheBodyAnim() RemoveBodyAnim() StartBodyAnim(roll) @@ -120,7 +126,7 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) ply:SetSafetyRollTime(CurTime() + 0.9) roll.AnimString = "evaderoll" - roll.animmodelstring = "climbanim" + roll.animmodelstring = "new_climbanim" roll.usefullbody = false if SERVER and not land then @@ -132,6 +138,12 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) end if CLIENT and IsFirstTimePredicted() then + if GetConVar("Beatrun_OldAnims"):GetBool() then + roll.animmodelstring = "old_climbanim" + else + roll.animmodelstring = "new_climbanim" + end + CacheBodyAnim() RemoveBodyAnim() StartBodyAnim(roll) @@ -180,7 +192,7 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed) ply:SetSafetyRollTime(CurTime() + 0.6) roll.AnimString = ply:UsingRH() and "land" or "landgun" - roll.animmodelstring = "climbanim" + roll.animmodelstring = "new_climbanim" roll.usefullbody = true else land = false @@ -189,7 +201,7 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed) ply:SetSafetyRollTime(CurTime() + 1.05) roll.AnimString = ply:UsingRH() and "meroll" or "merollgun" - roll.animmodelstring = "climbanim" + roll.animmodelstring = "new_climbanim" roll.usefullbody = false end @@ -202,6 +214,12 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed) end if CLIENT and IsFirstTimePredicted() then + if GetConVar("Beatrun_OldAnims"):GetBool() then + roll.animmodelstring = "old_climbanim" + else + roll.animmodelstring = "new_climbanim" + end + CacheBodyAnim() RemoveBodyAnim() StartBodyAnim(roll) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua index b55bab0..5800a0e 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua @@ -31,7 +31,7 @@ local animtable = { deleteonend = false, BodyLimitX = 50, AnimString = "meslidestart", - animmodelstring = "climbanim", + animmodelstring = "new_climbanim", camjoint = "camerajoint", usefullbody = 2 }