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:
@@ -394,15 +394,23 @@ net.Receive("PlayerEnablePropRotation", function(len, ply)
|
|||||||
if (ply:Team() != GAMEMODE.Teams.Hiders) then
|
if (ply:Team() != GAMEMODE.Teams.Hiders) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
print("Prop Hunt: Enabling Prop Rotation")
|
|
||||||
|
angle = net.ReadAngle()
|
||||||
|
|
||||||
ply:SetNWBool("PropRotation", true)
|
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)
|
end)
|
||||||
net.Receive("PlayerDisablePropRotation", function(len, ply)
|
net.Receive("PlayerDisablePropRotation", function(len, ply)
|
||||||
if (ply:Team() != GAMEMODE.Teams.Hiders) then
|
if (ply:Team() != GAMEMODE.Teams.Hiders) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
print("Prop Hunt: Disabling Prop Rotation")
|
|
||||||
|
angle = net.ReadAngle()
|
||||||
|
|
||||||
ply:SetNWBool("PropRotation", false)
|
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)
|
end)
|
||||||
Reference in New Issue
Block a user