From f4e7d92d0b95f29957f4f011d37bcddb2fe8cd2c Mon Sep 17 00:00:00 2001 From: ExtReMLapin Date: Sat, 24 Aug 2019 23:57:14 +0200 Subject: [PATCH 1/3] cached angle and vectors + small optimizations --- entities/entities/ix_item.lua | 4 +-- entities/entities/ix_money.lua | 4 +-- entities/weapons/ix_hands.lua | 4 ++- gamemode/core/derma/cl_character.lua | 4 ++- gamemode/core/derma/cl_charload.lua | 7 +++-- gamemode/core/derma/cl_dev_icon.lua | 29 +++++++++++-------- gamemode/core/derma/cl_menu.lua | 15 +++++++--- gamemode/core/derma/cl_spawnicon.lua | 4 ++- gamemode/core/hooks/cl_hooks.lua | 3 +- gamemode/core/hooks/sh_hooks.lua | 8 +++-- gamemode/core/libs/sh_business.lua | 6 ++-- gamemode/core/meta/sh_item.lua | 2 +- gamemode/core/sh_util.lua | 13 ++++++--- plugins/act/cl_hooks.lua | 9 ++++-- plugins/mapscene.lua | 2 +- plugins/spawnsaver.lua | 2 +- plugins/thirdperson.lua | 8 +++-- .../vendor/entities/entities/ix_vendor.lua | 3 +- plugins/wepselect.lua | 4 ++- 19 files changed, 85 insertions(+), 46 deletions(-) diff --git a/entities/entities/ix_item.lua b/entities/entities/ix_item.lua index f4416c78e..528b0d405 100644 --- a/entities/entities/ix_item.lua +++ b/entities/entities/ix_item.lua @@ -65,6 +65,8 @@ if (SERVER) then end end + local min, max = Vector(-8, -8, -8), Vector(8, 8, 8) + function ENT:SetItem(itemID) local itemTable = ix.item.instances[itemID] @@ -90,8 +92,6 @@ if (SERVER) then local physObj = self:GetPhysicsObject() if (!IsValid(physObj)) then - local min, max = Vector(-8, -8, -8), Vector(8, 8, 8) - self:PhysicsInitBox(min, max) self:SetCollisionBounds(min, max) end diff --git a/entities/entities/ix_money.lua b/entities/entities/ix_money.lua index 19e5b1a62..47b44e0a4 100644 --- a/entities/entities/ix_money.lua +++ b/entities/entities/ix_money.lua @@ -11,6 +11,8 @@ function ENT:SetupDataTables() self:NetworkVar("Int", 0, "Amount") end + local min, max = Vector(-8, -8, -8), Vector(8, 8, 8) + if (SERVER) then function ENT:Initialize() self:SetModel("models/props_lab/box01a.mdl") @@ -24,8 +26,6 @@ if (SERVER) then physObj:EnableMotion(true) physObj:Wake() else - local min, max = Vector(-8, -8, -8), Vector(8, 8, 8) - self:PhysicsInitBox(min, max) self:SetCollisionBounds(min, max) end diff --git a/entities/weapons/ix_hands.lua b/entities/weapons/ix_hands.lua index c54a35d8d..bdae078e9 100644 --- a/entities/weapons/ix_hands.lua +++ b/entities/weapons/ix_hands.lua @@ -422,6 +422,8 @@ function SWEP:PrimaryAttack() end) end +local viewPunchAngle = Angle(-1.3, 1.8, 0) + function SWEP:SecondaryAttack() if (!IsFirstTimePredicted()) then return @@ -451,7 +453,7 @@ function SWEP:SecondaryAttack() return end - self.Owner:ViewPunch(Angle(-1.3, 1.8, 0)) + self.Owner:ViewPunch(viewPunchAngle) self.Owner:EmitSound("physics/wood/wood_crate_impact_hard"..math.random(2, 3)..".wav") self.Owner:SetAnimation(PLAYER_ATTACK1) diff --git a/gamemode/core/derma/cl_character.lua b/gamemode/core/derma/cl_character.lua index 7bd1a2176..10a10b7be 100644 --- a/gamemode/core/derma/cl_character.lua +++ b/gamemode/core/derma/cl_character.lua @@ -61,6 +61,8 @@ end function PANEL:OnUndim() end +local vectorScale = Vector(1, 1, 0.0001) + function PANEL:Paint(width, height) local amount = self.currentDimAmount local bShouldScale = self.currentScale != 1 @@ -69,7 +71,7 @@ function PANEL:Paint(width, height) -- draw child panels with scaling if needed if (bShouldScale) then matrix = Matrix() - matrix:Scale(Vector(1, 1, 0.0001) * self.currentScale) + matrix:Scale(vectorScale * self.currentScale) matrix:Translate(Vector( ScrW() * 0.5 - (ScrW() * self.currentScale * 0.5), ScrH() * 0.5 - (ScrH() * self.currentScale * 0.5), diff --git a/gamemode/core/derma/cl_charload.lua b/gamemode/core/derma/cl_charload.lua index 3c759924e..503e72d9e 100644 --- a/gamemode/core/derma/cl_charload.lua +++ b/gamemode/core/derma/cl_charload.lua @@ -29,6 +29,9 @@ local function GetCharacter(self) return self.character end +local camPos = Vector(80, 0, 35) +local camAngle = Angle(0, 180, 0) + function PANEL:Init() self.activeCharacter = ClientsideModel(errorModel) self.activeCharacter:SetNoDraw(true) @@ -45,8 +48,8 @@ function PANEL:Init() self.shadeY = 0 self.shadeHeight = 0 - self.cameraPosition = Vector(80, 0, 35) - self.cameraAngle = Angle(0, 180, 0) + self.cameraPosition = camPos + self.cameraAngle = camAngle self.lastPaint = 0 end diff --git a/gamemode/core/derma/cl_dev_icon.lua b/gamemode/core/derma/cl_dev_icon.lua index c97331ff6..870140fba 100644 --- a/gamemode/core/derma/cl_dev_icon.lua +++ b/gamemode/core/derma/cl_dev_icon.lua @@ -437,48 +437,53 @@ function PANEL:BestGuessLayout() end end +local vectorX200 = Vector( 200, 0, 0 ) + function PANEL:FullFrontalLayout() local p = self.prev local ent = p.model:GetEntity() local pos = ent:GetPos() - local campos = pos + Vector( -200, 0, 0 ) + pos:Sub(vectorMinusX200) - ICON_INFO.camPos = campos + ICON_INFO.camPos = pos ICON_INFO.FOV = 45 - ICON_INFO.camAng = (campos * -1):Angle() + ICON_INFO.camAng = (pos * -1):Angle() end function PANEL:AboveLayout() local p = self.prev local ent = p.model:GetEntity() local pos = ent:GetPos() - local campos = pos + Vector( 0, 0, 200 ) + pos:Add(vectorX200) - ICON_INFO.camPos = campos + ICON_INFO.camPos = pos ICON_INFO.FOV = 45 - ICON_INFO.camAng = (campos * -1):Angle() + ICON_INFO.camAng = (pos * -1):Angle() end +local vectorY200 = Vector( 0, 200, 0 ) + function PANEL:RightLayout() local p = self.prev local ent = p.model:GetEntity() local pos = ent:GetPos() - local campos = pos + Vector( 0, 200, 0 ) + pos:Add(vectorY200) - ICON_INFO.camPos = campos + ICON_INFO.camPos = pos ICON_INFO.FOV = 45 - ICON_INFO.camAng = (campos * -1):Angle() + ICON_INFO.camAng = (pos * -1):Angle() end +local angleYawMinus180 = Angle( 0, -180, 0 ) + function PANEL:OriginLayout() local p = self.prev local ent = p.model:GetEntity() local pos = ent:GetPos() - local campos = pos + Vector( 0, 0, 0 ) - ICON_INFO.camPos = campos + ICON_INFO.camPos = pos ICON_INFO.FOV = 45 - ICON_INFO.camAng = Angle( 0, -180, 0 ) + ICON_INFO.camAng = angleYawMinus180 end diff --git a/gamemode/core/derma/cl_menu.lua b/gamemode/core/derma/cl_menu.lua index 9d845558d..3a4595d76 100644 --- a/gamemode/core/derma/cl_menu.lua +++ b/gamemode/core/derma/cl_menu.lua @@ -188,6 +188,8 @@ function PANEL:SetCharacterOverview(bValue, length) end end +local angleYaw180 = Angle(0, 180, 0) + function PANEL:GetOverviewInfo(origin, angles, fov) local originAngles = Angle(0, angles.yaw, angles.roll) local target = LocalPlayer():GetObserverTarget() @@ -204,7 +206,7 @@ function PANEL:GetOverviewInfo(origin, angles, fov) newOrigin = origin - LocalPlayer():OBBCenter() * 0.6 + forward end - local newAngles = originAngles + Angle(0, 180, 0) + local newAngles = originAngles + angleYaw180 newAngles.pitch = 5 newAngles.roll = 0 @@ -309,6 +311,9 @@ function PANEL:OnKeyCodePressed(key) end end +local vectorZ6 = Vector(0, 0, 6) +local angleM456000 = Angle(-45, 60, 0) + function PANEL:Think() if (IsValid(self.projectedTexture)) then local forward = LocalPlayer():GetForward() @@ -318,8 +323,8 @@ function PANEL:Think() right.z = 0 self.projectedTexture:SetBrightness(self.overviewFraction * 4) - self.projectedTexture:SetPos(LocalPlayer():GetPos() + right * 16 - forward * 8 + Vector(0, 0, 6)) - self.projectedTexture:SetAngles(forward:Angle() + Angle(-45, 60, 0)) + self.projectedTexture:SetPos(LocalPlayer():GetPos() + right * 16 - forward * 8 + vectorZ6) + self.projectedTexture:SetAngles(forward:Angle() + angleM456000) self.projectedTexture:Update() end @@ -339,6 +344,8 @@ function PANEL:Think() end end +local vectorZDiv1000 = Vector(1, 1, 0.0001) + function PANEL:Paint(width, height) derma.SkinFunc("PaintMenuBackground", self, width, height, self.currentBlur) @@ -348,7 +355,7 @@ function PANEL:Paint(width, height) local currentScale = Lerp(self.currentAlpha / 255, 0.9, 1) local matrix = Matrix() - matrix:Scale(Vector(1, 1, 0.0001) * currentScale) + matrix:Scale(vectorZDiv1000 * currentScale) matrix:Translate(Vector( ScrW() * 0.5 - (ScrW() * currentScale * 0.5), ScrH() * 0.5 - (ScrH() * currentScale * 0.5), diff --git a/gamemode/core/derma/cl_spawnicon.lua b/gamemode/core/derma/cl_spawnicon.lua index a41c971b2..be933e71b 100644 --- a/gamemode/core/derma/cl_spawnicon.lua +++ b/gamemode/core/derma/cl_spawnicon.lua @@ -15,6 +15,8 @@ function PANEL:Init() end end +local vectorZ64 = Vector(0, 0, 64) + function PANEL:SetModel(model, skin, hidden) BaseClass.SetModel(self, model) @@ -58,7 +60,7 @@ function PANEL:SetModel(model, skin, hidden) end entity:SetIK(false) - entity:SetEyeTarget(Vector(0, 0, 64)) + entity:SetEyeTarget(vectorZ64) end function PANEL:SetHidden(hidden) diff --git a/gamemode/core/hooks/cl_hooks.lua b/gamemode/core/hooks/cl_hooks.lua index 5f7dc35e2..0c138f716 100644 --- a/gamemode/core/hooks/cl_hooks.lua +++ b/gamemode/core/hooks/cl_hooks.lua @@ -418,6 +418,7 @@ local vignetteAlphaDelta = 0 local blurGoal = 0 local blurDelta = 0 local hasVignetteMaterial = vignette != "___error" +local vectorZ768 = Vector(0, 0, 768) timer.Create("ixVignetteChecker", 1, 0, function() local client = LocalPlayer() @@ -425,7 +426,7 @@ timer.Create("ixVignetteChecker", 1, 0, function() if (IsValid(client)) then local data = {} data.start = client:GetPos() - data.endpos = data.start + Vector(0, 0, 768) + data.endpos = data.start + vectorZ768 data.filter = client local trace = util.TraceLine(data) diff --git a/gamemode/core/hooks/sh_hooks.lua b/gamemode/core/hooks/sh_hooks.lua index aea274510..266160d15 100644 --- a/gamemode/core/hooks/sh_hooks.lua +++ b/gamemode/core/hooks/sh_hooks.lua @@ -37,7 +37,7 @@ PLAYER_HOLDTYPE_TRANSLATOR["bugbait"] = "normal" local PLAYER_HOLDTYPE_TRANSLATOR = PLAYER_HOLDTYPE_TRANSLATOR local HOLDTYPE_TRANSLATOR = HOLDTYPE_TRANSLATOR - +local magicVector = Vector(16.5438, -0.1642, -20.5493) function GM:TranslateActivity(client, act) local clientInfo = client:GetTable() local modelClass = clientInfo.ixAnimModelClass or "player" @@ -94,7 +94,7 @@ function GM:TranslateActivity(client, act) local fixVector = clientInfo.ixAnimTable[2] if (isvector(fixVector)) then - client:SetLocalPos(Vector(16.5438, -0.1642, -20.5493)) + client:SetLocalPos(magicVector) end if (isstring(act)) then @@ -490,6 +490,8 @@ do end end +local vectorNul = Vector(0, 0, 0) + function GM:Move(client, moveData) local char = client:GetCharacter() @@ -497,7 +499,7 @@ function GM:Move(client, moveData) if (client:GetNetVar("actEnterAngle")) then moveData:SetForwardSpeed(0) moveData:SetSideSpeed(0) - moveData:SetVelocity(Vector(0, 0, 0)) + moveData:SetVelocity(vectorNul) end if (client:GetMoveType() == MOVETYPE_WALK and moveData:KeyDown(IN_WALK)) then diff --git a/gamemode/core/libs/sh_business.lua b/gamemode/core/libs/sh_business.lua index c5403adbf..042c36948 100644 --- a/gamemode/core/libs/sh_business.lua +++ b/gamemode/core/libs/sh_business.lua @@ -67,6 +67,8 @@ if (SERVER) then end end) + local vectorZ16 = Vector(0, 0, 16) + local vectorZ05 = Vector(0, 0, 0.5) net.Receive("ixShipmentUse", function(length, client) local uniqueID = net.ReadString() local drop = net.ReadBool() @@ -89,7 +91,7 @@ if (SERVER) then end if (drop) then - ix.item.Spawn(uniqueID, entity:GetPos() + Vector(0, 0, 16), function(item, itemEntity) + ix.item.Spawn(uniqueID, entity:GetPos() + vectorZ16, function(item, itemEntity) if (IsValid(client)) then itemEntity.ixSteamID = client:SteamID() itemEntity.ixCharID = client:GetCharacter():GetID() @@ -108,7 +110,7 @@ if (SERVER) then entity.items[uniqueID] = entity.items[uniqueID] - 1 if (entity:GetItemCount() < 1) then - entity:GibBreakServer(Vector(0, 0, 0.5)) + entity:GibBreakServer(vectorZ05) entity:Remove() end end diff --git a/gamemode/core/meta/sh_item.lua b/gamemode/core/meta/sh_item.lua index 30ae82b25..c6771fe17 100644 --- a/gamemode/core/meta/sh_item.lua +++ b/gamemode/core/meta/sh_item.lua @@ -372,7 +372,7 @@ if (SERVER) then -- Spawn the actual item entity. local entity = ents.Create("ix_item") entity:Spawn() - entity:SetAngles(angles or Angle(0, 0, 0)) + entity:SetAngles(angles or angle_zero) -- Make the item represent this item. entity:SetItem(self.id) diff --git a/gamemode/core/sh_util.lua b/gamemode/core/sh_util.lua index 8901126aa..6cf9423ae 100644 --- a/gamemode/core/sh_util.lua +++ b/gamemode/core/sh_util.lua @@ -703,9 +703,10 @@ do local R = debug.getregistry() local VECTOR = R.Vector local CrossProduct = VECTOR.Cross + local vecYMinusOne = Vector(0, -1, 0) function VECTOR:Right(vUp) - if (self[1] == 0 and self[2] == 0) then return Vector(0, -1, 0) end + if (self[1] == 0 and self[2] == 0) then return vecYMinusOne end if (vUp == nil) then vUp = vector_up @@ -967,6 +968,9 @@ do local NUM_TANGENTS = 8 local tangents = {0, 1, 0.57735026919, 0.3639702342, 0.267949192431, 0.1763269807, -0.1763269807, -0.267949192431} + local vec16 = Vector(16,16,16) + local mVec16 = -Vector(16,16,16) + function ix.util.FindUseEntity(player, origin, forward) local tr @@ -1002,8 +1006,8 @@ do tr = util.TraceHull({ start = searchCenter, endpos = searchCenter + down * 72, - mins = -Vector(16,16,16), - maxs = Vector(16,16,16), + mins = mVec16, + maxs = vec16, mask = useableContents, filter = player }) @@ -1480,6 +1484,7 @@ do return entity end + local vecZ16 = Vector(0, 0, 16) function playerMeta:SetRagdolled(state, time, getUpGrace) if (!self:Alive()) then return @@ -1538,7 +1543,7 @@ do if (self:IsStuck()) then entity:DropToFloor() - self:SetPos(entity:GetPos() + Vector(0, 0, 16)) + self:SetPos(entity:GetPos() + vecZ16) local positions = ix.util.FindEmptySpace(self, {entity, self}) diff --git a/plugins/act/cl_hooks.lua b/plugins/act/cl_hooks.lua index 8e8418fd9..7b0360603 100644 --- a/plugins/act/cl_hooks.lua +++ b/plugins/act/cl_hooks.lua @@ -42,6 +42,9 @@ local forwardOffset = 16 local backwardOffset = -32 local heightOffset = Vector(0, 0, 20) local idleHeightOffset = Vector(0, 0, 6) +local vector0064 = Vector(0, 0, 64) +local mVector444 = Vector(-4, -4, -4) +local vector444 = Vector(4, 4, 4) function PLUGIN:CalcView(client, origin) local enterAngle = client:GetNetVar("actEnterAngle") @@ -72,10 +75,10 @@ function PLUGIN:CalcView(client, origin) if (head) then local position = client:GetBonePosition(head) + forward * offset + height local data = { - start = (client:GetBonePosition(head) or Vector(0, 0, 64)) + forward * 8, + start = (client:GetBonePosition(head) or vector0064) + forward * 8, endpos = position + forward * offset, - mins = Vector(-4, -4, -4), - maxs = Vector(4, 4, 4), + mins = mVector444, + maxs = vector444, filter = client } diff --git a/plugins/mapscene.lua b/plugins/mapscene.lua index 274d5468b..b97f1ef4c 100644 --- a/plugins/mapscene.lua +++ b/plugins/mapscene.lua @@ -8,7 +8,7 @@ PLUGIN.scenes = PLUGIN.scenes or {} local x3, y3 = 0, 0 local realOrigin = Vector(0, 0, 0) -local realAngles = Angle(0, 0, 0) +local realAngles = angle_zero local view = {} if (CLIENT) then diff --git a/plugins/spawnsaver.lua b/plugins/spawnsaver.lua index 142b01bec..d493aac8d 100644 --- a/plugins/spawnsaver.lua +++ b/plugins/spawnsaver.lua @@ -31,7 +31,7 @@ function PLUGIN:PlayerLoadedCharacter(client, character, lastChar) if (position[3] and position[3]:lower() == game.GetMap():lower()) then -- Restore the player to that position. client:SetPos(position[1].x and position[1] or client:GetPos()) - client:SetEyeAngles(position[2].p and position[2] or Angle(0, 0, 0)) + client:SetEyeAngles(position[2].p and position[2] or angle_zero) end -- Remove the position data since it is no longer needed. diff --git a/plugins/thirdperson.lua b/plugins/thirdperson.lua index c36d01c25..db37bf3c8 100644 --- a/plugins/thirdperson.lua +++ b/plugins/thirdperson.lua @@ -82,6 +82,8 @@ if (CLIENT) then local view, traceData, traceData2, aimOrigin, crouchFactor, ft, curAng, owner local clmp = math.Clamp crouchFactor = 0 + local vec10 = Vector(10, 10, 10) + local mVec10 = Vector(-10, -10, -10) function PLUGIN:CalcView(client, origin, angles, fov) ft = FrameTime() @@ -95,7 +97,7 @@ if (CLIENT) then crouchFactor = Lerp(ft*5, crouchFactor, 0) end - curAng = owner.camAng or Angle(0, 0, 0) + curAng = owner.camAng or angle_zero view = {} traceData = {} traceData.start = client:GetPos() + client:GetViewOffset() + @@ -105,8 +107,8 @@ if (CLIENT) then traceData.endpos = traceData.start - curAng:Forward() * ix.option.Get("thirdpersonDistance", 50) traceData.filter = client traceData.ignoreworld = bNoclip - traceData.mins = Vector(-10, -10, -10) - traceData.maxs = Vector(10, 10, 10) + traceData.mins = mVec10 + traceData.maxs = vec10 view.origin = util.TraceHull(traceData).HitPos aimOrigin = view.origin view.angles = curAng + client:GetViewPunchAngles() diff --git a/plugins/vendor/entities/entities/ix_vendor.lua b/plugins/vendor/entities/entities/ix_vendor.lua index 175a1bf3a..c72167b61 100644 --- a/plugins/vendor/entities/entities/ix_vendor.lua +++ b/plugins/vendor/entities/entities/ix_vendor.lua @@ -265,9 +265,10 @@ if (SERVER) then self:AddStock(uniqueID, -(value or 1)) end else + local vectorZ84 = Vector(0, 0, 84) function ENT:CreateBubble() self.bubble = ClientsideModel("models/extras/info_speech.mdl", RENDERGROUP_OPAQUE) - self.bubble:SetPos(self:GetPos() + Vector(0, 0, 84)) + self.bubble:SetPos(self:GetPos() + vectorZ84) self.bubble:SetModelScale(0.6, 0) end diff --git a/plugins/wepselect.lua b/plugins/wepselect.lua index 93388b177..9d4911af7 100644 --- a/plugins/wepselect.lua +++ b/plugins/wepselect.lua @@ -27,6 +27,8 @@ if (CLIENT) then end end + local vector110 = Vector(1, 1, 0) + function PLUGIN:HUDPaint() local frameTime = FrameTime() @@ -79,7 +81,7 @@ if (CLIENT) then shiftX + x + math.cos(theta * spacing + math.pi) * radius + radius, y + lastY + math.sin(theta * spacing + math.pi) * radius - ty / 2 , 1)) - matrix:Scale(Vector(1, 1, 0) * scale) + matrix:Scale(vector110 * scale) cam.PushModelMatrix(matrix) ix.util.DrawText(weaponName, 2, ty / 2, color, 0, 1, "ixWeaponSelectFont") From 810d43ee3e1bbcd6b5ee9529dec2898ea2bdd101 Mon Sep 17 00:00:00 2001 From: ExtReMLapin Date: Sun, 25 Aug 2019 00:02:08 +0200 Subject: [PATCH 2/3] using gmod globals --- gamemode/core/hooks/sh_hooks.lua | 4 +--- plugins/mapscene.lua | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gamemode/core/hooks/sh_hooks.lua b/gamemode/core/hooks/sh_hooks.lua index 266160d15..0c46fc8f9 100644 --- a/gamemode/core/hooks/sh_hooks.lua +++ b/gamemode/core/hooks/sh_hooks.lua @@ -490,8 +490,6 @@ do end end -local vectorNul = Vector(0, 0, 0) - function GM:Move(client, moveData) local char = client:GetCharacter() @@ -499,7 +497,7 @@ function GM:Move(client, moveData) if (client:GetNetVar("actEnterAngle")) then moveData:SetForwardSpeed(0) moveData:SetSideSpeed(0) - moveData:SetVelocity(vectorNul) + moveData:SetVelocity(vector_origin) end if (client:GetMoveType() == MOVETYPE_WALK and moveData:KeyDown(IN_WALK)) then diff --git a/plugins/mapscene.lua b/plugins/mapscene.lua index b97f1ef4c..1ea287ef8 100644 --- a/plugins/mapscene.lua +++ b/plugins/mapscene.lua @@ -7,7 +7,7 @@ PLUGIN.description = "Adds areas of the map that are visible during character se PLUGIN.scenes = PLUGIN.scenes or {} local x3, y3 = 0, 0 -local realOrigin = Vector(0, 0, 0) +local realOrigin = vector_origin local realAngles = angle_zero local view = {} From 4a8fd1535149f0555089f76904f9ae7b89dd4d7a Mon Sep 17 00:00:00 2001 From: ExtReMLapin Date: Sun, 25 Aug 2019 00:07:41 +0200 Subject: [PATCH 3/3] woopsie --- gamemode/core/derma/cl_dev_icon.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemode/core/derma/cl_dev_icon.lua b/gamemode/core/derma/cl_dev_icon.lua index 870140fba..4a370d1ee 100644 --- a/gamemode/core/derma/cl_dev_icon.lua +++ b/gamemode/core/derma/cl_dev_icon.lua @@ -443,7 +443,7 @@ function PANEL:FullFrontalLayout() local p = self.prev local ent = p.model:GetEntity() local pos = ent:GetPos() - pos:Sub(vectorMinusX200) + pos:Sub(vectorX200) ICON_INFO.camPos = pos ICON_INFO.FOV = 45