Skip to content

Commit

Permalink
Adjust error check for ballistic computers
Browse files Browse the repository at this point in the history
Was using the wrong position to check dot normal against incase the simulation went past the target
  • Loading branch information
LiddulBOFH committed Oct 1, 2024
1 parent b377cfc commit c238703
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/entities/acf_turret_computer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ do -- Metamethods and other important stuff
Debug.Cross(Sim.StartPos + Sim.NextPos, 15, 8, Color(0, 255, 0), true)

return self:AdjustSimulation()
elseif Dir:Dot((Point - Sim.NextPos):GetNormalized()) < 0 then
elseif Dir:Dot((Point - Sim.Pos):GetNormalized()) < 0 then
Debug.Cross(Sim.StartPos + Sim.Pos, 30, 8, Color(255, 0, 0), true)

return self:AdjustSimulation()
Expand Down

0 comments on commit c238703

Please sign in to comment.