mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-01-30 19:47:28 +05:00
Fixed random stuck glitch (I hope)
This commit is contained in:
parent
c13bc69b95
commit
a6665c4dfe
6 changed files with 91 additions and 84 deletions
|
@ -17,13 +17,12 @@ This version of the beatrun works on any version of the game (Chromium or not).
|
||||||
* Change HUD's colors - `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor`.
|
* Change HUD's colors - `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor`.
|
||||||
* Discord Rich Presence (extract `lua` folder to `garrysmod`, along side with `addons` folder).
|
* Discord Rich Presence (extract `lua` folder to `garrysmod`, along side with `addons` folder).
|
||||||
* Small camera punch when diving.
|
* Small camera punch when diving.
|
||||||
* Change max moving speed - `Beatrun_MaxSpeed`.
|
|
||||||
* Ability to remove ziplines that created with *Zipline Gun* - RMB.
|
* Ability to remove ziplines that created with *Zipline Gun* - RMB.
|
||||||
* Removed your SteamID from right corner, because I can.
|
* Removed your SteamID from right corner, because I can.
|
||||||
* Allow players to spawn props without admin rights - `Beatrun_AllowPropSpawn`.
|
* Allow players to spawn props without admin rights - `Beatrun_AllowPropSpawn`.
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
- [ ] Configuration menu
|
- [X] Configurations menu
|
||||||
- [ ] Gamemodes menu
|
- [ ] Gamemodes menu
|
||||||
|
|
||||||
## Fixes and changes from previous version
|
## Fixes and changes from previous version
|
||||||
|
|
|
@ -149,9 +149,6 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
|
||||||
panel:ClearControls()
|
panel:ClearControls()
|
||||||
panel:SetName("Misc Settings")
|
panel:SetName("Misc Settings")
|
||||||
|
|
||||||
panel:NumSlider("Max Speed", "Beatrun_MaxSpeed", 0, 1000, 0)
|
|
||||||
panel:ControlHelp("Changes Max Moving Speed")
|
|
||||||
|
|
||||||
panel:CheckBox("Prop Spawning", "Beatrun_AllowPropSpawn")
|
panel:CheckBox("Prop Spawning", "Beatrun_AllowPropSpawn")
|
||||||
panel:ControlHelp("Allows players without admin rights to spawn props, entities and weapons")
|
panel:ControlHelp("Allows players without admin rights to spawn props, entities and weapons")
|
||||||
|
|
||||||
|
@ -205,4 +202,29 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
|
||||||
panel:CheckBox("Totsugeki Direction", "Beatrun_TotsugekiDir")
|
panel:CheckBox("Totsugeki Direction", "Beatrun_TotsugekiDir")
|
||||||
panel:ControlHelp("Allows to Totsugeki into Another Direction\nCombined with Spam and Heading Allows You to Fly =)")
|
panel:ControlHelp("Allows to Totsugeki into Another Direction\nCombined with Spam and Heading Allows You to Fly =)")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
spawnmenu.AddToolMenuOption("Beatrun", "Server", "beatrun_gamemodes", "Gamemodes", "", "", function(panel)
|
||||||
|
panel:ClearControls()
|
||||||
|
panel:SetName("Gamemodes Settings")
|
||||||
|
|
||||||
|
local InfectionButton = vgui.Create("DButton", panel)
|
||||||
|
InfectionButton:SetText("Toggle Infection Gamemode")
|
||||||
|
InfectionButton:SetSize(0, 20)
|
||||||
|
InfectionButton.DoClick = function()
|
||||||
|
if GetGlobalBool(GM_DATATHEFT) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end
|
||||||
|
|
||||||
|
StartInfection()
|
||||||
|
end
|
||||||
|
panel:AddItem(InfectionButton)
|
||||||
|
|
||||||
|
local DatatheftButton = vgui.Create("DButton", panel)
|
||||||
|
DatatheftButton:SetText("Toggle Data Theft Gamemode")
|
||||||
|
DatatheftButton:SetSize(0, 20)
|
||||||
|
DatatheftButton.DoClick = function()
|
||||||
|
if GetGlobalBool(GM_INFECTION) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end
|
||||||
|
|
||||||
|
StartDataTheft()
|
||||||
|
end
|
||||||
|
panel:AddItem(DatatheftButton)
|
||||||
|
end)
|
||||||
end)
|
end)
|
|
@ -1,6 +1,5 @@
|
||||||
local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||||
local sidestep = CreateConVar("Beatrun_SideStep", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
local sidestep = CreateConVar("Beatrun_SideStep", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||||
local max_speed = CreateConVar("Beatrun_MaxSpeed", 325, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
|
||||||
|
|
||||||
local function Hardland(jt)
|
local function Hardland(jt)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
@ -230,8 +229,8 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
|
||||||
ply.FootstepLand = true
|
ply.FootstepLand = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if ply:GetRunSpeed() ~= max_speed:GetInt() * ply:GetOverdriveMult() then
|
if ply:GetRunSpeed() ~= 325 * ply:GetOverdriveMult() then
|
||||||
ply:SetRunSpeed(max_speed:GetInt() * ply:GetOverdriveMult())
|
ply:SetRunSpeed(325 * ply:GetOverdriveMult())
|
||||||
end
|
end
|
||||||
|
|
||||||
if not ply:GetMEMoveLimit() then
|
if not ply:GetMEMoveLimit() then
|
||||||
|
@ -257,11 +256,11 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
|
||||||
|
|
||||||
local MEAng = math.Truncate(ang:Forward().x, 2)
|
local MEAng = math.Truncate(ang:Forward().x, 2)
|
||||||
local MEAngDiff = math.abs((MEAng - ply:GetMEAng()) * 100)
|
local MEAngDiff = math.abs((MEAng - ply:GetMEAng()) * 100)
|
||||||
local weaponspeed = math.floor(max_speed:GetInt() / 1.66)
|
local weaponspeed = 150
|
||||||
local activewep = ply:GetActiveWeapon()
|
local activewep = ply:GetActiveWeapon()
|
||||||
|
|
||||||
if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then
|
if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then
|
||||||
weaponspeed = max_speed:GetInt()
|
weaponspeed = 250
|
||||||
end
|
end
|
||||||
|
|
||||||
if (ismoving or ply:GetMantle() ~= 0) and ply:GetMESprintDelay() < CurTime() and (cmd:KeyDown(IN_SPEED) or ply:GetMantle() ~= 0 or not ply:OnGround() or (not ply:OnGround() or ply:GetMantle() ~= 0) and mv:GetVelocity().z > -450) then
|
if (ismoving or ply:GetMantle() ~= 0) and ply:GetMESprintDelay() < CurTime() and (cmd:KeyDown(IN_SPEED) or ply:GetMantle() ~= 0 or not ply:OnGround() or (not ply:OnGround() or ply:GetMantle() ~= 0) and mv:GetVelocity().z > -450) then
|
||||||
|
@ -275,9 +274,9 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
|
||||||
mult = mult * ply:GetMEMoveLimit() / 1000
|
mult = mult * ply:GetMEMoveLimit() / 1000
|
||||||
end
|
end
|
||||||
|
|
||||||
ply:SetMEMoveLimit(math.Clamp(ply:GetMEMoveLimit() + mult * ply:GetOverdriveMult() * 2, 0, max_speed:GetInt() * ply:GetOverdriveMult()))
|
ply:SetMEMoveLimit(math.Clamp(ply:GetMEMoveLimit() + mult * ply:GetOverdriveMult() * 2, 0, 325 * ply:GetOverdriveMult()))
|
||||||
elseif not ismoving and (not ply:Crouching() or ply:GetCrouchJump()) or CurTime() < ply:GetMESprintDelay() and ply:OnGround() then
|
elseif not ismoving and (not ply:Crouching() or ply:GetCrouchJump()) or CurTime() < ply:GetMESprintDelay() and ply:OnGround() then
|
||||||
ply:SetMEMoveLimit(math.Clamp(ply:GetMEMoveLimit() - 40, weaponspeed, max_speed:GetInt() * ply:GetOverdriveMult()))
|
ply:SetMEMoveLimit(math.Clamp(ply:GetMEMoveLimit() - 40, weaponspeed, 325 * ply:GetOverdriveMult()))
|
||||||
end
|
end
|
||||||
|
|
||||||
if MEAngDiff > 1.25 and ply:GetWallrun() == 0 then
|
if MEAngDiff > 1.25 and ply:GetWallrun() == 0 then
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
--[[N++ Protip: View > Collapse Level 1
|
--[[
|
||||||
|
N++ Protip: View > Collapse Level 1
|
||||||
More detail on stuff in lua/vmanip/vmanip_baseanims.lua
|
More detail on stuff in lua/vmanip/vmanip_baseanims.lua
|
||||||
|
|
||||||
Please keep in mind that you do not fire events *through vmanip*. Think of it as a fully
|
Please keep in mind that you do not fire events *through vmanip*. Think of it as a fully
|
||||||
|
@ -550,8 +551,6 @@ hook.Add("PostDrawViewModel", "VManip", function(vm, ply, weapon)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local anglef = Angle(0, 1, 0)
|
|
||||||
|
|
||||||
--Very basic stuff, you see
|
--Very basic stuff, you see
|
||||||
hook.Add("PostDrawViewModel", "VMLegs", function(vm, ply, weapon)
|
hook.Add("PostDrawViewModel", "VMLegs", function(vm, ply, weapon)
|
||||||
if VMLegs:IsActive() then
|
if VMLegs:IsActive() then
|
||||||
|
|
|
@ -5,14 +5,12 @@ util.AddNetworkString("VManip_StopHold")
|
||||||
--VManip_StopHold: WriteString of anim to stop holding on client
|
--VManip_StopHold: WriteString of anim to stop holding on client
|
||||||
|
|
||||||
local function VManip_FindAndImport()
|
local function VManip_FindAndImport()
|
||||||
|
local path = "vmanip/anims/"
|
||||||
|
local anims = file.Find(path .. "*.lua", "lsv")
|
||||||
|
|
||||||
local path="vmanip/anims/"
|
for k, v in pairs(anims) do
|
||||||
local anims=file.Find(path.."*.lua","lsv")
|
AddCSLuaFile(path .. v)
|
||||||
|
end
|
||||||
for k,v in pairs(anims) do
|
|
||||||
AddCSLuaFile(path..v)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
VManip_FindAndImport()
|
VManip_FindAndImport()
|
|
@ -26,79 +26,69 @@ Hands
|
||||||
|
|
||||||
Legs
|
Legs
|
||||||
"model" - path to model
|
"model" - path to model
|
||||||
"speed" - playback speed
|
"speed" - playback speed
|
||||||
"forwardboost" - forward offset
|
"forwardboost" - forward offset
|
||||||
"upboost" - vertical offset (in actual hammer units)
|
"upboost" - vertical offset (in actual hammer units)
|
||||||
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
VManip:RegisterAnim("use",
|
VManip:RegisterAnim("use", {
|
||||||
{
|
["model"] = "c_vmanipinteract.mdl",
|
||||||
["model"]="c_vmanipinteract.mdl",
|
["lerp_peak"] = 0.4,
|
||||||
["lerp_peak"]=0.4,
|
["lerp_speed_in"] = 1,
|
||||||
["lerp_speed_in"]=1,
|
["lerp_speed_out"] = 0.8,
|
||||||
["lerp_speed_out"]=0.8,
|
["lerp_curve"] = 2.5,
|
||||||
["lerp_curve"]=2.5,
|
["speed"] = 1,
|
||||||
["speed"]=1,
|
["startcycle"] = 0.1,
|
||||||
["startcycle"]=0.1,
|
["sounds"] = {},
|
||||||
["sounds"]={},
|
["loop"] = false
|
||||||
["loop"]=false
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
VManip:RegisterAnim("vault",
|
VManip:RegisterAnim("vault", {
|
||||||
{
|
["model"] = "c_vmanipvault.mdl",
|
||||||
["model"]="c_vmanipvault.mdl",
|
["lerp_peak"] = 0.4,
|
||||||
["lerp_peak"]=0.4,
|
["lerp_speed_in"] = 1,
|
||||||
["lerp_speed_in"]=1,
|
["lerp_speed_out"] = 0.5,
|
||||||
["lerp_speed_out"]=0.5,
|
["lerp_curve"] = 1,
|
||||||
["lerp_curve"]=1,
|
["speed"] = 1
|
||||||
["speed"]=1
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
VManip:RegisterAnim("handslide",
|
VManip:RegisterAnim("handslide", {
|
||||||
{
|
["model"] = "c_vmanipvault.mdl",
|
||||||
["model"]="c_vmanipvault.mdl",
|
["lerp_peak"] = 0.2,
|
||||||
["lerp_peak"]=0.2,
|
["lerp_speed_in"] = 1,
|
||||||
["lerp_speed_in"]=1,
|
["lerp_speed_out"] = 0.8,
|
||||||
["lerp_speed_out"]=0.8,
|
["lerp_curve"] = 2,
|
||||||
["lerp_curve"]=2,
|
["speed"] = 1.5,
|
||||||
["speed"]=1.5,
|
["holdtime"] = 0.25,
|
||||||
["holdtime"]=0.25,
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
VManip:RegisterAnim("adrenalinestim",
|
VManip:RegisterAnim("adrenalinestim", {
|
||||||
{
|
["model"] = "old/c_vmanip.mdl",
|
||||||
["model"]="old/c_vmanip.mdl",
|
["lerp_peak"] = 1.1,
|
||||||
["lerp_peak"]=1.1,
|
["lerp_speed_in"] = 1,
|
||||||
["lerp_speed_in"]=1,
|
["speed"] = 0.7,
|
||||||
["speed"]=0.7,
|
["sounds"] = {},
|
||||||
["sounds"]={},
|
["loop"] = false
|
||||||
["loop"]=false
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
VManip:RegisterAnim("thrownade",
|
VManip:RegisterAnim("thrownade", {
|
||||||
{
|
["model"] = "c_vmanipgrenade.mdl",
|
||||||
["model"]="c_vmanipgrenade.mdl",
|
["lerp_peak"] = 0.85,
|
||||||
["lerp_peak"]=0.85,
|
["lerp_speed_in"] = 1.2,
|
||||||
["lerp_speed_in"]=1.2,
|
["lerp_speed_out"] = 1.2,
|
||||||
["lerp_speed_out"]=1.2,
|
["lerp_curve"] = 1,
|
||||||
["lerp_curve"]=1,
|
["speed"] = 1,
|
||||||
["speed"]=1,
|
["holdtime"] = 0.4,
|
||||||
["holdtime"]=0.4,
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
--###################################
|
--###################################
|
||||||
|
|
||||||
VMLegs:RegisterAnim("test", --lmao, im not recompiling to change THAT shit
|
--lmao, im not recompiling to change THAT shit
|
||||||
{
|
VMLegs:RegisterAnim("test", {
|
||||||
["model"]="c_vmaniplegs.mdl",
|
["model"] = "c_vmaniplegs.mdl",
|
||||||
["speed"]=1.5,
|
["speed"] = 1.5,
|
||||||
["forwardboost"]=4,
|
["forwardboost"] = 4,
|
||||||
["upwardboost"]=0
|
["upwardboost"] = 0
|
||||||
})
|
})
|
Loading…
Reference in a new issue