gamemode/server: Fix prop rotation messages appearing without debug log

Also adds the intended angle and player initiating the action
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2018-07-05 06:56:44 +02:00
parent 45925f2029
commit 6a6b8da999
@@ -394,15 +394,23 @@ net.Receive("PlayerEnablePropRotation", function(len, ply)
if (ply:Team() != GAMEMODE.Teams.Hiders) then
return
end
print("Prop Hunt: Enabling Prop Rotation")
angle = net.ReadAngle()
ply:SetNWBool("PropRotation", true)
ply.Data.Prop:ApplyRotation(net.ReadAngle())
ply.Data.Prop:ApplyRotation(angle)
if GAMEMODE.Config:DebugLog() then print("Prop Hunt: Player '"..ply:GetName().."' (SteamID: "..ply:SteamID()..") enabled prop rotation with angle ["..tostring(angle).."].") end
end)
net.Receive("PlayerDisablePropRotation", function(len, ply)
if (ply:Team() != GAMEMODE.Teams.Hiders) then
return
end
print("Prop Hunt: Disabling Prop Rotation")
angle = net.ReadAngle()
ply:SetNWBool("PropRotation", false)
ply.Data.Prop:ApplyRotation(net.ReadAngle())
ply.Data.Prop:ApplyRotation(angle)
if GAMEMODE.Config:DebugLog() then print("Prop Hunt: Player '"..ply:GetName().."' (SteamID: "..ply:SteamID()..") enabled prop rotation with angle ["..tostring(angle).."].") end
end)