mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
some cleanup and fixes
This commit is contained in:
parent
f8ab85a207
commit
a3bbbbff84
7 changed files with 29 additions and 12 deletions
|
@ -50,6 +50,8 @@ Please refer to this [README](beatrun/README.md).
|
||||||
**All** of the Beatrun settings can be changed in the configuration menu.
|
**All** of the Beatrun settings can be changed in the configuration menu.
|
||||||
* Localization support.\
|
* Localization support.\
|
||||||
For now Russian and English are supported.
|
For now Russian and English are supported.
|
||||||
|
* Build Mode Tweaks.\
|
||||||
|
You can now spawn any prop from Spawn Menu and they will save in course.
|
||||||
* Added the ability to get off of ladders.
|
* Added the ability to get off of ladders.
|
||||||
* Added an arrow that shows the next checkpoint.
|
* Added an arrow that shows the next checkpoint.
|
||||||
* Added a ConVar to allow Overdrive usage on the server - `Beatrun_AllowOverdriveInMultiplayer`.
|
* Added a ConVar to allow Overdrive usage on the server - `Beatrun_AllowOverdriveInMultiplayer`.
|
||||||
|
|
|
@ -50,6 +50,8 @@ iex (iwr "rlxx.ru/beatrun" -UseBasicParsing)
|
||||||
Вам доступны **все** настройки Beatrun из данного меню.
|
Вам доступны **все** настройки Beatrun из данного меню.
|
||||||
* Поддержка локализации.\
|
* Поддержка локализации.\
|
||||||
На данный момент доступны Русский и Английский языки.
|
На данный момент доступны Русский и Английский языки.
|
||||||
|
* Улучшения режима строительства.\
|
||||||
|
Можно заспавнить любой проп из меню спавна и он сохранится в курсе.
|
||||||
* Добавлена возможность слезания с лестниц.
|
* Добавлена возможность слезания с лестниц.
|
||||||
* Добавлена стрелка указывающая на следующую контрольную точку.
|
* Добавлена стрелка указывающая на следующую контрольную точку.
|
||||||
* Добавлена переменная которая разрешает использование Overdrive на сервере - `Beatrun_AllowOverdriveInMultiplayer`.
|
* Добавлена переменная которая разрешает использование Overdrive на сервере - `Beatrun_AllowOverdriveInMultiplayer`.
|
||||||
|
|
|
@ -18,7 +18,12 @@ lockang = false
|
||||||
CamAddAng = false
|
CamAddAng = false
|
||||||
CamIgnoreAng = false
|
CamIgnoreAng = false
|
||||||
|
|
||||||
local tools = {["gmod_tool"] = true, ["weapon_physgun"] = true, ["gmod_camera"] = true}
|
local tools = {
|
||||||
|
["gmod_tool"] = true,
|
||||||
|
["weapon_physgun"] = true,
|
||||||
|
["gmod_camera"] = true
|
||||||
|
}
|
||||||
|
|
||||||
has_tool_equipped = false
|
has_tool_equipped = false
|
||||||
|
|
||||||
hook.Add("Think", "beatrun_detect_tool", function()
|
hook.Add("Think", "beatrun_detect_tool", function()
|
||||||
|
@ -30,7 +35,11 @@ hook.Add("Think", "beatrun_detect_tool", function()
|
||||||
|
|
||||||
local class = weapon:GetClass()
|
local class = weapon:GetClass()
|
||||||
|
|
||||||
if tools[class] then has_tool_equipped = true else has_tool_equipped = false end
|
if tools[class] then
|
||||||
|
has_tool_equipped = true
|
||||||
|
else
|
||||||
|
has_tool_equipped = false
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- local BodyAnimPos = Vector(0, 0, 0)
|
-- local BodyAnimPos = Vector(0, 0, 0)
|
||||||
|
@ -496,6 +505,7 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
||||||
if has_tool_equipped then
|
if has_tool_equipped then
|
||||||
BodyAnim:SetNoDraw(true)
|
BodyAnim:SetNoDraw(true)
|
||||||
BodyAnim:SetRenderOrigin(pos * 1000)
|
BodyAnim:SetRenderOrigin(pos * 1000)
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -691,9 +701,11 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
||||||
hook.Run("BodyAnimCalcView", view)
|
hook.Run("BodyAnimCalcView", view)
|
||||||
|
|
||||||
pos:Set(view.origin)
|
pos:Set(view.origin)
|
||||||
|
|
||||||
if not has_tool_equipped then
|
if not has_tool_equipped then
|
||||||
angles:Set(view.angles)
|
angles:Set(view.angles)
|
||||||
end
|
end
|
||||||
|
|
||||||
if lerpchangeatt < 1 then
|
if lerpchangeatt < 1 then
|
||||||
pos:Set(lerpedpos)
|
pos:Set(lerpedpos)
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,10 +35,9 @@ XP_floatingxp = {}
|
||||||
|
|
||||||
hook.Add("OnParkour", "ParkourXP", function(event)
|
hook.Add("OnParkour", "ParkourXP", function(event)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if not IsValid(ply) then return end
|
if not IsValid(ply) then return end
|
||||||
|
|
||||||
if ply.InReplay then return end
|
-- if ply.InReplay then return end
|
||||||
|
|
||||||
local pos = ply:GetPos()
|
local pos = ply:GetPos()
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ local function CustomPropMat(prop)
|
||||||
|
|
||||||
if prop.hr == true then
|
if prop.hr == true then
|
||||||
prop:SetMaterial("medge/redplainplastervertex")
|
prop:SetMaterial("medge/redplainplastervertex")
|
||||||
elseif prop.hr == nil then
|
elseif prop.hr == nil or prop.hr == false then
|
||||||
prop:SetMaterial("medge/plainplastervertex")
|
prop:SetMaterial("medge/plainplastervertex")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -980,7 +980,8 @@ if CLIENT then
|
||||||
local id = args[1]
|
local id = args[1]
|
||||||
|
|
||||||
if not id then
|
if not id then
|
||||||
print("Supply the name.")
|
print("Supply course name")
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -989,7 +990,7 @@ if CLIENT then
|
||||||
|
|
||||||
function LoadCourseRaw(data)
|
function LoadCourseRaw(data)
|
||||||
if not data then
|
if not data then
|
||||||
print("LOAD NOTHING??!!")
|
print("Supply course data")
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -1406,6 +1407,7 @@ if CLIENT then
|
||||||
hook.Add("OnEntityCreated", "BuildModeProps", function(ent)
|
hook.Add("OnEntityCreated", "BuildModeProps", function(ent)
|
||||||
if not ent:GetNW2Bool("BRProtected") and ent:GetClass() == "prop_physics" or buildmode_ents[ent:GetClass()] then
|
if not ent:GetNW2Bool("BRProtected") and ent:GetClass() == "prop_physics" or buildmode_ents[ent:GetClass()] then
|
||||||
if not BuildMode then ent.buildmode_placed_manually = true end
|
if not BuildMode then ent.buildmode_placed_manually = true end
|
||||||
|
|
||||||
table.insert(buildmode_placed, ent)
|
table.insert(buildmode_placed, ent)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -207,7 +207,7 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if mv:KeyPressed(IN_FORWARD) and ang <= 42 then
|
if (mv:KeyPressed(IN_FORWARD) or mv:KeyPressed(IN_JUMP)) and ang <= 42 then
|
||||||
local tr = ply.ClimbingTraceSafety
|
local tr = ply.ClimbingTraceSafety
|
||||||
local trout = ply.ClimbingTraceSafetyOut
|
local trout = ply.ClimbingTraceSafetyOut
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
|
|
Loading…
Reference in a new issue