mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 21:33:02 +05:00
Cleaning and spawnmenu settings started
This commit is contained in:
parent
75198f56f2
commit
7a3e0362d2
3 changed files with 21 additions and 8 deletions
|
@ -26,6 +26,7 @@ This version of the beatrun works on any version of the game (Chromium or not).
|
||||||
- [ ] Gamemodes menu
|
- [ ] Gamemodes menu
|
||||||
|
|
||||||
## Fixes and changes from previous version
|
## Fixes and changes from previous version
|
||||||
|
* Hacky fix for 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)
|
||||||
* 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.
|
||||||
|
|
10
beatrun/gamemodes/beatrun/gamemode/cl/SpawnMenuSettings.lua
Normal file
10
beatrun/gamemodes/beatrun/gamemode/cl/SpawnMenuSettings.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
hook.Add("AddToolMenuCategories", "Beatrun_Category", function()
|
||||||
|
spawnmenu.AddToolCategory("Beatrun", "beatrun_category", "Beatrun Settings")
|
||||||
|
end)
|
||||||
|
|
||||||
|
hook.Add("PopulateToolMenu", "CustomMenuSettings", function()
|
||||||
|
spawnmenu.AddToolMenuOption("Utilities", "Beatrun Settings", "Custom_Menu", "#My Custom Menu", "", "", function(panel)
|
||||||
|
panel:ClearControls()
|
||||||
|
panel:NumSlider("Gravity", "sv_gravity", 0, 600)
|
||||||
|
end)
|
||||||
|
end)
|
|
@ -302,12 +302,9 @@ end)
|
||||||
|
|
||||||
hook.Add("ShouldCollide", "NoPlayerCollisions", function(ent1, ent2)
|
hook.Add("ShouldCollide", "NoPlayerCollisions", function(ent1, ent2)
|
||||||
if ent1:IsPlayer() and (ent2:IsPlayer() or ent2.NoPlayerCollisions) then
|
if ent1:IsPlayer() and (ent2:IsPlayer() or ent2.NoPlayerCollisions) then
|
||||||
if ent2.BRCollisionFunc then
|
if ent2.BRCollisionFunc then return ent2:BRCollisionFunc(ent1)
|
||||||
return ent2:BRCollisionFunc(ent1)
|
|
||||||
else
|
else
|
||||||
if ent1.br_Fired or ent2.br_Fired then
|
if ent1.br_Fired or ent2.br_Fired then return true end
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -316,10 +313,15 @@ hook.Add("ShouldCollide", "NoPlayerCollisions", function(ent1, ent2)
|
||||||
if ent2:IsPlayer() and ent1:IsNPC() then return true end
|
if ent2:IsPlayer() and ent1:IsNPC() then return true end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
// i was forced
|
-- i was forced
|
||||||
hook.Add("EntityFireBullets", "thisengineismadebyacrackhead", function(ent, data)
|
hook.Add("EntityFireBullets", "thisengineismadebyacrackhead", function(ent, data)
|
||||||
ent.br_Fired = true
|
ent.br_Fired = true
|
||||||
timer.Simple(engine.TickInterval()*2, function() if IsValid(ent) then ent.br_Fired = false end end)
|
|
||||||
|
timer.Simple(engine.TickInterval() * 2, function()
|
||||||
|
if IsValid(ent) then
|
||||||
|
ent.br_Fired = false
|
||||||
|
end
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
hook.Add("PhysgunPickup", "AllowPlayerPickup", function(ply, ent)
|
hook.Add("PhysgunPickup", "AllowPlayerPickup", function(ply, ent)
|
||||||
|
|
Loading…
Reference in a new issue