FAForever / fa

Lua code for FAF
223 stars 230 forks source link

Refactor collision beams #6065

Closed lL1l1 closed 4 months ago

lL1l1 commented 4 months ago

Description of the proposed changes

Testing done on the proposed changes

Spawned all units with beams and made sure there are no errors when firing: Land/air units: ``` CreateUnitAtMouse('xrb0304', 0, 3.26, -4.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, 3.26, -0.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, 3.26, -6.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, 3.26, -2.52, -0.00000) CreateUnitAtMouse('url0402', 0, 13.26, 7.48, -0.00000) CreateUnitAtMouse('ual0401', 0, 8.26, 7.48, -0.00000) CreateUnitAtMouse('xab1401', 0, -6.74, -2.52, -0.00000) CreateUnitAtMouse('uaa0310', 0, -20.24, 0.97, -0.00000) CreateUnitAtMouse('xrb0304', 0, 3.26, 1.48, -0.00000) CreateUnitAtMouse('xrb0304', 0, -0.74, -4.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, -0.74, -6.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, 1.26, 1.48, -0.00000) CreateUnitAtMouse('xrb0304', 0, -0.74, -2.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, 1.26, -0.52, -0.00000) CreateUnitAtMouse('xea0002', 0, 1.04, 9.47, -0.00197) CreateUnitAtMouse('url0001', 0, -5.74, 7.48, -0.00000) CreateUnitAtMouse('xrb0304', 0, -0.74, 1.48, -0.00000) CreateUnitAtMouse('xrb0304', 0, -0.74, -0.52, -0.00000) CreateUnitAtMouse('xsb2301', 0, -8.74, 7.48, -0.00000) CreateUnitAtMouse('xrb0304', 0, 1.26, -6.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, 1.26, -2.52, -0.00000) CreateUnitAtMouse('xrb0304', 0, 1.26, -4.52, -0.00000) ``` Naval units: ``` CreateUnitAtMouse('xss0201', 0, 5.25, -0.25, 0.34907) CreateUnitAtMouse('xes0307', 0, -5.25, 0.25, 0.48869) ```

Additional context

Next I want to create a scorching beam class so that I don't have to copy code across 7 beams to fix the bug where ground splats appear when hitting naval units with beams, since that's my original goal here.

Checklist