mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 21:33:02 +05:00
duck in roll and some fixes
This commit is contained in:
parent
11615053a9
commit
478fb208f4
10 changed files with 16 additions and 36 deletions
11
README.md
11
README.md
|
@ -27,7 +27,10 @@ All of the settings below can be changed in the configuration menu
|
||||||
- [ ] Gamemodes menu
|
- [ ] Gamemodes menu
|
||||||
|
|
||||||
## Fixes and changes from previous version
|
## Fixes and changes from previous version
|
||||||
* nothin, just README changes
|
* Punching while crouching.
|
||||||
|
* Tweaked safety roll, now you can roll under things.
|
||||||
|
* Fixes to Gamemodes menu.
|
||||||
|
* Removed unused code.
|
||||||
|
|
||||||
# All changes and fixes
|
# All changes and fixes
|
||||||
* Course saving works with compression and without.
|
* Course saving works with compression and without.
|
||||||
|
@ -38,7 +41,9 @@ All of the settings below can be changed in the configuration menu
|
||||||
* Fixed error when loading course.
|
* Fixed error when loading course.
|
||||||
* Fixed collisions issues.
|
* Fixed collisions issues.
|
||||||
* Fixed and tweaked player-player weapon damage.
|
* Fixed and tweaked player-player weapon damage.
|
||||||
* Proper Kick Glitch (Like in original ME: https://www.youtube.com/watch?v=zK5y3NBUStc)
|
* Proper Kick Glitch (Like in original ME: https://www.youtube.com/watch?v=zK5y3NBUStc).
|
||||||
* You can now dive to your death =)
|
* Tweaked safety roll, now you can roll under things.
|
||||||
|
* You can now dive to your death =).
|
||||||
|
* Allowed punching while crouching.
|
||||||
* Grapple fixes. Now it moves with entity it attached to and other players can see it.
|
* Grapple fixes. Now it moves with entity it attached to and other players can see it.
|
||||||
* More reliable grappling.
|
* More reliable grappling.
|
||||||
|
|
|
@ -126,14 +126,6 @@ if SERVER then
|
||||||
local dbtbl = ents.FindByClass("br_databank")
|
local dbtbl = ents.FindByClass("br_databank")
|
||||||
local bank = dbtbl[math.random(1, #dbtbl)]
|
local bank = dbtbl[math.random(1, #dbtbl)]
|
||||||
|
|
||||||
--[[
|
|
||||||
while self:GetNW2Entity("DataBank") == bank do
|
|
||||||
table.Shuffle(dbtbl)
|
|
||||||
|
|
||||||
bank = dbtbl[1]
|
|
||||||
end
|
|
||||||
]]
|
|
||||||
|
|
||||||
if bank then
|
if bank then
|
||||||
self:SetNW2Entity("DataBank", bank)
|
self:SetNW2Entity("DataBank", bank)
|
||||||
end
|
end
|
||||||
|
|
|
@ -419,7 +419,7 @@ function SWEP:PrimaryAttack()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not ply:OnGround() or ply:Crouching() or ply:GetSliding() or ply:GetGrappling() or ply:GetWallrun() ~= 0 then return end
|
if not ply:OnGround() or ply:GetSliding() or ply:GetGrappling() or ply:GetWallrun() ~= 0 then return end
|
||||||
|
|
||||||
local curseq = self:GetSequence()
|
local curseq = self:GetSequence()
|
||||||
local infall = curseq == 19
|
local infall = curseq == 19
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
valvebiped = {"ValveBiped.Bip01_Pelvis", "ValveBiped.Bip01_Spine", "ValveBiped.Bip01_Spine1", "ValveBiped.Bip01_Spine2", "ValveBiped.Bip01_Spine4", "ValveBiped.Bip01_Neck1", "ValveBiped.Bip01_Head1", "ValveBiped.forward", "ValveBiped.Bip01_R_Clavicle", "ValveBiped.Bip01_R_UpperArm", "ValveBiped.Bip01_R_Forearm", "ValveBiped.Bip01_R_Hand", "ValveBiped.Anim_Attachment_RH", "ValveBiped.Bip01_R_Finger4", "ValveBiped.Bip01_R_Finger41", "ValveBiped.Bip01_R_Finger42", "ValveBiped.Bip01_R_Finger3", "ValveBiped.Bip01_R_Finger31", "ValveBiped.Bip01_R_Finger32", "ValveBiped.Bip01_R_Finger2", "ValveBiped.Bip01_R_Finger21", "ValveBiped.Bip01_R_Finger22", "ValveBiped.Bip01_R_Finger1", "ValveBiped.Bip01_R_Finger11", "ValveBiped.Bip01_R_Finger12", "ValveBiped.Bip01_R_Finger0", "ValveBiped.Bip01_R_Finger01", "ValveBiped.Bip01_R_Finger02", "ValveBiped.Bip01_R_Ulna", "ValveBiped.Bip01_R_Wrist", "ValveBiped.Bip01_R_Elbow", "ValveBiped.Bip01_R_Bicep", "ValveBiped.Bip01_R_Shoulder", "ValveBiped.Bip01_R_Trapezius", "ValveBiped.Bip01_L_Clavicle", "ValveBiped.Bip01_L_UpperArm", "ValveBiped.Bip01_L_Forearm", "ValveBiped.Bip01_L_Hand", "ValveBiped.Anim_Attachment_LH", "ValveBiped.Bip01_L_Finger4", "ValveBiped.Bip01_L_Finger41", "ValveBiped.Bip01_L_Finger42", "ValveBiped.Bip01_L_Finger3", "ValveBiped.Bip01_L_Finger31", "ValveBiped.Bip01_L_Finger32", "ValveBiped.Bip01_L_Finger2", "ValveBiped.Bip01_L_Finger21", "ValveBiped.Bip01_L_Finger22", "ValveBiped.Bip01_L_Finger1", "ValveBiped.Bip01_L_Finger11", "ValveBiped.Bip01_L_Finger12", "ValveBiped.Bip01_L_Finger0", "ValveBiped.Bip01_L_Finger01", "ValveBiped.Bip01_L_Finger02", "ValveBiped.Bip01_L_Ulna", "ValveBiped.Bip01_L_Wrist", "ValveBiped.Bip01_L_Elbow", "ValveBiped.Bip01_L_Bicep", "ValveBiped.Bip01_L_Shoulder", "ValveBiped.Bip01_L_Trapezius", "ValveBiped.Bip01_R_Thigh", "ValveBiped.Bip01_R_Calf", "ValveBiped.Bip01_R_Foot", "ValveBiped.Bip01_R_Toe0", "ValveBiped.Bip01_L_Thigh", "ValveBiped.Bip01_L_Calf", "ValveBiped.Bip01_L_Foot", "ValveBiped.Bip01_L_Toe0", "ValveBiped.Bip01_L_Pectoral", "ValveBiped.Bip01_R_Pectoral", "ValveBiped.Cod", "j_ringpalm_L", "j_pinkypalm_L", "j_ringpalm_ri", "j_pinkypalm_ri"}
|
local valvebiped = {"ValveBiped.Bip01_Pelvis", "ValveBiped.Bip01_Spine", "ValveBiped.Bip01_Spine1", "ValveBiped.Bip01_Spine2", "ValveBiped.Bip01_Spine4", "ValveBiped.Bip01_Neck1", "ValveBiped.Bip01_Head1", "ValveBiped.forward", "ValveBiped.Bip01_R_Clavicle", "ValveBiped.Bip01_R_UpperArm", "ValveBiped.Bip01_R_Forearm", "ValveBiped.Bip01_R_Hand", "ValveBiped.Anim_Attachment_RH", "ValveBiped.Bip01_R_Finger4", "ValveBiped.Bip01_R_Finger41", "ValveBiped.Bip01_R_Finger42", "ValveBiped.Bip01_R_Finger3", "ValveBiped.Bip01_R_Finger31", "ValveBiped.Bip01_R_Finger32", "ValveBiped.Bip01_R_Finger2", "ValveBiped.Bip01_R_Finger21", "ValveBiped.Bip01_R_Finger22", "ValveBiped.Bip01_R_Finger1", "ValveBiped.Bip01_R_Finger11", "ValveBiped.Bip01_R_Finger12", "ValveBiped.Bip01_R_Finger0", "ValveBiped.Bip01_R_Finger01", "ValveBiped.Bip01_R_Finger02", "ValveBiped.Bip01_R_Ulna", "ValveBiped.Bip01_R_Wrist", "ValveBiped.Bip01_R_Elbow", "ValveBiped.Bip01_R_Bicep", "ValveBiped.Bip01_R_Shoulder", "ValveBiped.Bip01_R_Trapezius", "ValveBiped.Bip01_L_Clavicle", "ValveBiped.Bip01_L_UpperArm", "ValveBiped.Bip01_L_Forearm", "ValveBiped.Bip01_L_Hand", "ValveBiped.Anim_Attachment_LH", "ValveBiped.Bip01_L_Finger4", "ValveBiped.Bip01_L_Finger41", "ValveBiped.Bip01_L_Finger42", "ValveBiped.Bip01_L_Finger3", "ValveBiped.Bip01_L_Finger31", "ValveBiped.Bip01_L_Finger32", "ValveBiped.Bip01_L_Finger2", "ValveBiped.Bip01_L_Finger21", "ValveBiped.Bip01_L_Finger22", "ValveBiped.Bip01_L_Finger1", "ValveBiped.Bip01_L_Finger11", "ValveBiped.Bip01_L_Finger12", "ValveBiped.Bip01_L_Finger0", "ValveBiped.Bip01_L_Finger01", "ValveBiped.Bip01_L_Finger02", "ValveBiped.Bip01_L_Ulna", "ValveBiped.Bip01_L_Wrist", "ValveBiped.Bip01_L_Elbow", "ValveBiped.Bip01_L_Bicep", "ValveBiped.Bip01_L_Shoulder", "ValveBiped.Bip01_L_Trapezius", "ValveBiped.Bip01_R_Thigh", "ValveBiped.Bip01_R_Calf", "ValveBiped.Bip01_R_Foot", "ValveBiped.Bip01_R_Toe0", "ValveBiped.Bip01_L_Thigh", "ValveBiped.Bip01_L_Calf", "ValveBiped.Bip01_L_Foot", "ValveBiped.Bip01_L_Toe0", "ValveBiped.Bip01_L_Pectoral", "ValveBiped.Bip01_R_Pectoral", "ValveBiped.Cod", "j_ringpalm_L", "j_pinkypalm_L", "j_ringpalm_ri", "j_pinkypalm_ri"}
|
||||||
|
|
||||||
local scalevec = Vector(1, 1, 1)
|
local scalevec = Vector(1, 1, 1)
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ local function BeatrunHUD()
|
||||||
|
|
||||||
local coursename = nil
|
local coursename = nil
|
||||||
local customname = hook.Run("BeatrunHUDCourse")
|
local customname = hook.Run("BeatrunHUDCourse")
|
||||||
coursename = customname and customname or Course_Name ~= "" and Course_Name or "Freeplay"
|
coursename = customname and customname or Course_Name ~= "" and "Course: " .. Course_Name or "Freeplay"
|
||||||
-- local lastxp = ply.LastXP or 0
|
-- local lastxp = ply.LastXP or 0
|
||||||
local nicktext = nil
|
local nicktext = nil
|
||||||
|
|
||||||
|
@ -324,7 +324,6 @@ function BeatrunLeaderboard(forced)
|
||||||
local isdatatheft = GetGlobalBool(GM_DATATHEFT)
|
local isdatatheft = GetGlobalBool(GM_DATATHEFT)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local vp = ply:GetViewPunchAngles()
|
local vp = ply:GetViewPunchAngles()
|
||||||
-- local scrw = ScrW()
|
|
||||||
local scrh = ScrH()
|
local scrh = ScrH()
|
||||||
|
|
||||||
if not sway:GetBool() then
|
if not sway:GetBool() then
|
||||||
|
|
|
@ -212,7 +212,6 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
|
||||||
InfectionButton:SetText("Toggle Infection Gamemode")
|
InfectionButton:SetText("Toggle Infection Gamemode")
|
||||||
InfectionButton:SetSize(0, 20)
|
InfectionButton:SetSize(0, 20)
|
||||||
InfectionButton.DoClick = function()
|
InfectionButton.DoClick = function()
|
||||||
-- if GetGlobalBool(GM_DATATHEFT) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end
|
|
||||||
if GetGlobalBool(GM_DATATHEFT) then
|
if GetGlobalBool(GM_DATATHEFT) then
|
||||||
InfectionButton:SetText("Another gamemode is running!")
|
InfectionButton:SetText("Another gamemode is running!")
|
||||||
timer.Simple(2, function()
|
timer.Simple(2, function()
|
||||||
|
@ -229,7 +228,6 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
|
||||||
DatatheftButton:SetText("Toggle Data Theft Gamemode")
|
DatatheftButton:SetText("Toggle Data Theft Gamemode")
|
||||||
DatatheftButton:SetSize(0, 20)
|
DatatheftButton:SetSize(0, 20)
|
||||||
DatatheftButton.DoClick = function()
|
DatatheftButton.DoClick = function()
|
||||||
-- if GetGlobalBool(GM_INFECTION) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end
|
|
||||||
if GetGlobalBool(GM_INFECTION) then
|
if GetGlobalBool(GM_INFECTION) then
|
||||||
InfectionButton:SetText("Another gamemode is running!")
|
InfectionButton:SetText("Another gamemode is running!")
|
||||||
timer.Simple(2, function()
|
timer.Simple(2, function()
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
GM_DATATHEFT = 1
|
|
||||||
|
|
||||||
DATATHEFT_LOADOUTS = {
|
DATATHEFT_LOADOUTS = {
|
||||||
{"weapon_357", "weapon_ar2"}
|
{"weapon_357", "weapon_ar2"}
|
||||||
}
|
}
|
||||||
|
@ -44,9 +42,7 @@ if SERVER then
|
||||||
|
|
||||||
local function DataTheftSync(ply)
|
local function DataTheftSync(ply)
|
||||||
if GetGlobalBool(GM_DATATHEFT) and not ply.DataTheftSynced then
|
if GetGlobalBool(GM_DATATHEFT) and not ply.DataTheftSynced then
|
||||||
net.Start("Infection_Sync")
|
net.Start("DataTheft_Sync")
|
||||||
net.WriteFloat(Infection_StartTime)
|
|
||||||
net.WriteFloat(Infection_EndTime)
|
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply.DataTheftSynced = true
|
ply.DataTheftSynced = true
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
GM_INFECTION = 0
|
|
||||||
Infection_StartTime = 0
|
Infection_StartTime = 0
|
||||||
Infection_EndTime = 0
|
Infection_EndTime = 0
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ local function SafetyRollThink(ply, mv, cmd)
|
||||||
mv:SetSideSpeed(0)
|
mv:SetSideSpeed(0)
|
||||||
mv:SetForwardSpeed(0)
|
mv:SetForwardSpeed(0)
|
||||||
|
|
||||||
|
mv:AddKey(IN_DUCK)
|
||||||
|
|
||||||
if ang ~= landang then
|
if ang ~= landang then
|
||||||
local vel = mv:GetVelocity()
|
local vel = mv:GetVelocity()
|
||||||
vel.x = 0
|
vel.x = 0
|
||||||
|
|
|
@ -1,30 +1,19 @@
|
||||||
util.AddNetworkString("Beatrun_ToggleGamemode")
|
util.AddNetworkString("Beatrun_ToggleGamemode")
|
||||||
util.AddNetworkString("Beatrun_UpdateDataTheftLoadout")
|
|
||||||
|
|
||||||
local datatheft, infection = false, false
|
|
||||||
|
|
||||||
net.Receive("Beatrun_ToggleGamemode", function(_, ply)
|
net.Receive("Beatrun_ToggleGamemode", function(_, ply)
|
||||||
local gm = net.ReadString()
|
local gm = net.ReadString()
|
||||||
|
|
||||||
if gm == "datatheft" then
|
if gm == "datatheft" then
|
||||||
datatheft = not datatheft
|
if not GetGlobalBool(GM_DATATHEFT) then
|
||||||
|
|
||||||
if datatheft then
|
|
||||||
Beatrun_StartDataTheft()
|
Beatrun_StartDataTheft()
|
||||||
else
|
else
|
||||||
Beatrun_StopDataTheft()
|
Beatrun_StopDataTheft()
|
||||||
end
|
end
|
||||||
elseif gm == "infection" then
|
elseif gm == "infection" then
|
||||||
infection = not infection
|
if not GetGlobalBool(GM_INFECTION) then
|
||||||
|
|
||||||
if infection then
|
|
||||||
Beatrun_StartInfection()
|
Beatrun_StartInfection()
|
||||||
else
|
else
|
||||||
Beatrun_StopInfection()
|
Beatrun_StopInfection()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
net.Receive("Beatrun_UpdateDataTheftLoadout", function(_, ply)
|
|
||||||
|
|
||||||
end)
|
|
Loading…
Reference in a new issue