Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions gamemode/core/hooks/sh_hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,7 @@ function GM:CalcMainActivity(client, velocity)
local animClass = nut.anim.getModelClass(client:GetModel())

if (animClass ~= "player") then
local eyeAngles = client.EyeAngles(client)
local yaw = vectorAngle(velocity)[2]
local normalized = normalizeAngle(yaw - eyeAngles[2])

client.SetPoseParameter(client, "move_yaw", normalized)
client:SetPoseParameter("move_yaw", normalizeAngle(vectorAngle(velocity)[2] - client:EyeAngles()[2]))
end

if (
Expand Down
9 changes: 6 additions & 3 deletions plugins/notices/cl_notice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ nut.notices = nut.notices or {}

-- Move all notices to their proper positions.
local function OrganizeNotices()
local scrW = ScrW()

for k, v in ipairs(nut.notices) do
v:MoveTo(
ScrW() - (v:GetWide() + 4),
scrW - (v:GetWide() + 4),
(k - 1) * (v:GetTall() + 4) + 4,
0.15,
(k / #nut.notices) * 0.25
Expand All @@ -17,10 +19,11 @@ end
function nut.util.notify(message)
local notice = vgui.Create("nutNotice")
local i = table.insert(nut.notices, notice)
local scrW = ScrW()

-- Set up information for the notice.
notice:SetText(message)
notice:SetPos(ScrW(), (i - 1) * (notice:GetTall() + 4) + 4)
notice:SetPos(scrW, (i - 1) * (notice:GetTall() + 4) + 4)
notice:SizeToContentsX()
notice:SetWide(notice:GetWide() + 16)
notice.start = CurTime() + 0.25
Expand All @@ -44,7 +47,7 @@ function nut.util.notify(message)
for k, v in ipairs(nut.notices) do
if (v == notice) then
-- Move the notice off the screen.
notice:MoveTo(ScrW(), notice.y, 0.15, 0.1, nil, function()
notice:MoveTo(scrW, notice.y, 0.15, 0.1, nil, function()
notice:Remove()
end)

Expand Down