aboutsummaryrefslogtreecommitdiff
path: root/gamemode/client/cam.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/client/cam.lua')
-rw-r--r--gamemode/client/cam.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/gamemode/client/cam.lua b/gamemode/client/cam.lua
new file mode 100644
index 0000000..26ff6f2
--- /dev/null
+++ b/gamemode/client/cam.lua
@@ -0,0 +1,32 @@
+local Off = Vector(0,0,10)
+
+OverrideDefaultGFCamera(function(ply, origin, angles, fov)
+ local Bg = ply:GetRagdollEntity()
+
+ if (IsValid(Bg)) then
+ local view = {
+ origin = Bg:GetPos()-angles:Forward()*80+Off,
+ angles = angles,
+ }
+
+ return view
+ else
+ local Pig = ply:GetPigeon()
+
+ if (IsValid(Pig)) then
+ local view = {
+ origin = Pig:GetPos()-angles:Forward()*80+Off,
+ angles = angles,
+ }
+
+ return view
+ elseif (!ply:Alive() and ply.DeathPos) then
+ local view = {
+ origin = ply.DeathPos-angles:Forward()*80+Off,
+ angles = angles,
+ }
+
+ return view
+ end
+ end
+end) \ No newline at end of file