mirror of
https://github.com/chev2/gmod-addons.git
synced 2025-12-18 05:52:15 +00:00
SprayMesh Extended: Add concommand spraymesh_debug_place
Used to place fake player sprays for debugging purposes. Only works when spraymesh.DEBUG_MODE is enabled.
This commit is contained in:
parent
995e20125a
commit
a5227bd0e7
1 changed files with 20 additions and 0 deletions
|
|
@ -995,3 +995,23 @@ concommand.Add("spraymesh_shownames", function(ply, cmd, args, argstr)
|
|||
print(([[%s %s]]):format(plyStr, URLStr))
|
||||
end
|
||||
end)
|
||||
|
||||
if spraymesh.DEBUG_MODE then
|
||||
concommand.Add("spraymesh_debug_place", function()
|
||||
local tr = LocalPlayer():GetEyeTrace()
|
||||
|
||||
local sprayData = {
|
||||
SteamID64 = "DEBUG_" .. util.SHA1(CurTime()),
|
||||
PlayerName = "Debug Spray " .. CurTime(),
|
||||
HitPos = tr.HitPos,
|
||||
HitNormal = tr.HitNormal,
|
||||
TraceNormal = tr.Normal,
|
||||
URL = spraymesh.SPRAY_URL_DEFAULT,
|
||||
CoordDistance = spraymesh.COORD_DIST_DEFAULT,
|
||||
SprayTime = CurTime(),
|
||||
PlaySpraySound = true
|
||||
}
|
||||
|
||||
spraymesh.PlaceSpray(sprayData)
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue