new anims + some fixes (dunno why do you need to replace model's path, I tested gmod's and modded models and they are fine)

This commit is contained in:
Jonny_Bro (Nikita) 2023-09-30 14:57:24 +05:00
parent cd1c14b037
commit bf304985f3
27 changed files with 41 additions and 20 deletions

View file

@ -50,11 +50,11 @@ Installer's source can be found [here](/BeatrunAnimInstaller).
* Added a ConVar to allow QuickTurn with any weapon or only with *Runner Hands* - `Beatrun_QuickturnHandsOnly`.
* Implemented Discord Rich Presence using open source tools (See [credits](https://github.com/JonnyBro/beatrun?tab=readme-ov-file#credits-3)).
* Added small camera punch when diving.
* Added the ability to remove ziplines that created with *Zipline Gun* - RMB.
* Added the ability to remove ziplines that created with *Zipline Gun* - `RMB`.
* Fixed some playermodels show up as ERROR.
* SteamID in the right corner is no longer present.
## Notable changes and fixes done by the community
* Made QuickTurn work only with `Runner Hands`.
* Fixed leaderboard sorting in gamemodes.
* Fixed grapple usage in courses and gamemodes.
* Fixed a crash in DataTheft when touching data bank.

View file

@ -343,8 +343,8 @@ function StartBodyAnim(animtable)
if not IsValid(ply:GetHands()) then return end
local plymodel = ply
local playermodel = string.Replace(ply:GetModel(), "models/models/", "models/")
local handsmodel = string.Replace(ply:GetHands():GetModel(), "models/models/", "models/")
local playermodel = ply:GetModel()
local handsmodel = ply:GetHands():GetModel()
if usefullbody == 2 then
BodyAnimMDL = ClientsideModel(playermodel, RENDERGROUP_BOTH)
@ -480,8 +480,7 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
return
end
-- This is the issue with disappearing model when sliding, should be fixed for now
if IsValid(BodyAnim) and pos:Distance(ply:EyePos()) > 20 then -- TODO: Something if appears again...
if IsValid(BodyAnim) and pos:Distance(ply:EyePos()) > 20 then
if updatethirdperson then
ply:SetNoDraw(false)
BodyAnim:SetNoDraw(true)

View file

@ -9,6 +9,7 @@ local discord_start = discord_start or -1
function DiscordUpdate()
local ply = LocalPlayer()
if not ply.GetLevel then return end
local rpc_data = {}

View file

@ -16,6 +16,7 @@ local vignettealpha = 0
local function FallCheck()
local ply = LocalPlayer()
if not IsValid(ply) then return end
local speed = ply:GetVelocity().z
if not ply.FallStatic and speed <= -800 and ply:GetMoveType() ~= MOVETYPE_NOCLIP and ply:GetDive() == false then

View file

@ -486,7 +486,8 @@ local nocyclereset = {
local ignorebac = {
evaderoll = true,
meroll = true
meroll = true,
merollgun = true
}
local customspeed = {

View file

@ -3,17 +3,23 @@ local domain = CreateClientConVar("Beatrun_Domain", "courses.beatrun.ru", true,
local QueuedArgs = NULL
local QueuedFunction = NULL
concommand.Add("beatrun_confirm", function()
concommand.Add("Beatrun_Confirm", function()
if QueuedArgs and QueuedFunction then
QueuedFunction(QueuedArgs)
return
end
if QueuedFunction then
QueuedFunction()
return
end
end)
concommand.Add("beatrun_cancel", function()
concommand.Add("Beatrun_Cancel", function()
QueuedArgs = NULL
QueuedFunction = NULL
end)
@ -54,8 +60,9 @@ end
concommand.Add("Beatrun_UploadCourse", function()
QueuedFunction = UploadCourse
print("You're trying to upload a course with the name "..Course_Name.." and on map "..game.GetMap()..".")
print("Write beatrun_confirm to continue, or beatrun_cancel to stop.")
print("You're trying to upload a course with the name " .. Course_Name .. " and on map " .. game.GetMap() .. ".")
print("Write Beatrun_Confirm to continue, or Beatrun_Cancel to cancel.")
end)
function GetCourse(sharecode)
@ -128,6 +135,7 @@ end
concommand.Add("Beatrun_UpdateCode", function(ply, cmd, args, argstr)
QueuedFunction = UpdateCourse
QueuedArgs = args[1]
print("You're trying to update a course with this code: "..args[1]..", with a course on map "..game.GetMap().." and name "..Course_Name..".")
print("Write beatrun_confirm to continue, or beatrun_cancel to stop.")
end)
print("You're trying to update a course with this code: " .. args[1] .. ", with a course on map " .. game.GetMap() .. " and name " .. Course_Name .. ".")
print("Write Beatrun_Confirm to continue, or Beatrun_Cancel to cancel.")
end)

View file

@ -7,6 +7,7 @@ local refresh_time = 60
local function UpdateRichPresence()
local ply = LocalPlayer()
if not ply.GetLevel then return end
local map = game.GetMap()

View file

@ -24,4 +24,4 @@ hook.Add("PostRender", "Watermark", function()
surface.DrawText(LocalPlayer():Nick())
cam.End2D()
end)
]]
--]]

View file

@ -72,4 +72,4 @@ local function ToggleWhitescale()
end
end
concommand.Add("ToggleWhitescale", ToggleWhitescale)
concommand.Add("Beatrun_ToggleWhitescale", ToggleWhitescale)

View file

@ -1,5 +1,4 @@
local meta = FindMetaTable("Player")
-- local XP_max = 2000000
local XP_ratiocache = nil
local parkourevent_lastpos = Vector()

View file

@ -57,6 +57,8 @@ local roll = {
}
net.Receive("RollAnimSP", function()
local ply = LocalPlayer()
if net.ReadBool() then
roll.AnimString = "land"
roll.animmodelstring = "climbanim"
@ -66,7 +68,12 @@ net.Receive("RollAnimSP", function()
roll.animmodelstring = "climbanim"
roll.BodyAnimSpeed = 1.5
else
roll.AnimString = "meroll"
if ply:GetActiveWeapon():GetClass() ~= "runnerhands" then
roll.AnimString = "merollgun"
else
roll.AnimString = "meroll"
end
roll.animmodelstring = "climbanim"
roll.BodyAnimSpeed = 1.15
end
@ -165,7 +172,12 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed)
ply:SetSafetyRollAng(ang)
ply:SetSafetyRollTime(CurTime() + 1.05)
roll.AnimString = "meroll"
if ply:GetActiveWeapon():GetClass() ~= "runnerhands" then
roll.AnimString = "merollgun"
else
roll.AnimString = "meroll"
end
roll.animmodelstring = "climbanim"
roll.usefullbody = false
end

View file

@ -105,7 +105,6 @@ local function ZiplineCheck(ply, mv, cmd, zipline)
ply:SetCrouchJumpBlocked(false)
if CLIENT and IsFirstTimePredicted() then
-- local zipline = ply:GetZipline()
ply.OrigEyeAng = (endpos - startpos):Angle()
elseif game.SinglePlayer() then
net.Start("Zipline_SPFix")