-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3e00f3
commit 3c15507
Showing
6 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
TOOL.Category = "Glide" | ||
TOOL.Name = "#tool.glide_ragdoll_disabler.name" | ||
|
||
TOOL.Information = { | ||
{ name = "left" }, | ||
{ name = "right" } | ||
} | ||
|
||
local function IsGlideVehicle( ent ) | ||
return IsValid( ent ) and ent.IsGlideVehicle | ||
end | ||
|
||
local function GetGlideVehicle( trace ) | ||
local ent = trace.Entity | ||
|
||
if IsGlideVehicle( ent ) then | ||
return ent | ||
end | ||
|
||
return false | ||
end | ||
|
||
function TOOL:LeftClick( trace ) | ||
local veh = GetGlideVehicle( trace ) | ||
if not veh then return false end | ||
|
||
if SERVER then | ||
veh.FallOnCollision = false | ||
end | ||
|
||
return true | ||
end | ||
|
||
function TOOL:RightClick( trace ) | ||
local veh = GetGlideVehicle( trace ) | ||
if not veh then return false end | ||
|
||
if SERVER then | ||
veh.FallOnCollision = true | ||
end | ||
|
||
return true | ||
end | ||
|
||
function TOOL.BuildCPanel( panel ) | ||
panel:Help( "#tool.glide_ragdoll_disabler.desc" ) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters