dvdvideo1234 / TrackAssemblyTool

A Garry's mod tool for assembing a prop-segmented track
GNU Affero General Public License v3.0
21 stars 2 forks source link

Remove POA needles indexing #57

Closed dvdvideo1234 closed 3 months ago

dvdvideo1234 commented 7 months ago

This will use the vector and angle unpack method to basically transform

  stSpawn.HPnt:SetUnpacked(hdPOA.P[cvX], hdPOA.P[cvY], hdPOA.P[cvZ])
  stSpawn.HOrg:SetUnpacked(hdPOA.O[cvX], hdPOA.O[cvY], hdPOA.O[cvZ])
  stSpawn.HAng:SetUnpacked(hdPOA.A[caP], hdPOA.A[caY], hdPOA.A[caR])

to become

  stSpawn.HPnt:SetUnpacked(hdPOA.P:Get())
  stSpawn.HOrg:SetUnpacked(hdPOA.O:Get())
  stSpawn.HAng:SetUnpacked(hdPOA.A:Get())
dvdvideo1234 commented 7 months ago

Hey, @Grocel

With this modification I was able to remove the different indexing nonsense. The method POA:Get() works like Vector:Unpack()

dvdvideo1234 commented 6 months ago

This PR is big as it is intended to be. Next PR may remove NewXY 2D point creation and just use vectors X/Y coordinates.