Author Topic: Bug fix for parabolic projectile collisions  (Read 4318 times)

Offline Yankes

  • Commander
  • *****
  • Posts: 2078
    • View Profile
Re: Bug fix for parabolic projectile collisions
« Reply #15 on: September 06, 2016, 06:40:51 pm »
@karadoc I fully understand your logic about finded bugs, but sometime one fix could end up as rewriting some part of code to made everything work again. In my job I had couple times that situation, one fix exposed lot of other bugs in unexpected places. You should think about this "one line fix" as rewriting part of code.
Another thing is that calcualte line is used for tiles too (and there is copy of this function for path finding), one tile off would cause glitches that should be more visible than one vexel off.

@Meridian I will probably grab this code to my brach too (before 3.5) but I think it should end up in master brach.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 4909
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Bug fix for parabolic projectile collisions
« Reply #16 on: September 09, 2016, 09:01:22 pm »
Checking both the bottom tile and the top tile is probably a safer option though.

I decided for this option at the end.
It has a side effect too... but it's harmless... on short distances (cca 3 tiles), you can now throw also one tile above ground (impact of course will be on the ground).

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 4909
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Bug fix for parabolic projectile collisions
« Reply #17 on: December 31, 2017, 12:15:11 pm »
I will be reverting all commits related to arcing shots and throwing from this thread (and related threads).

This vanilla fix should replace them: https://github.com/SupSuper/OpenXcom/commit/ea1cce5375c7d5deacccad435279162eeb88f4f1
(if not, we'll need a new fix anyway)