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

Offline Yankes

  • Commander
  • *****
  • Posts: 3192
    • 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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8595
    • View Profile
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).

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8595
    • View Profile
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)

Offline Skybuck

  • Colonel
  • ****
  • Posts: 223
    • View Profile
Re: Bug fix for parabolic projectile collisions
« Reply #18 on: March 31, 2022, 10:48:27 am »
I have also noticed some bugs/crashes with this parabolic method.

However since replacement of calculateLine to solve exactly these kinds of issues, have not seen pink blobs crash the game anymore, that does not mean there are no bugs with it anymore, but it is remarkable.

See if this issue remains by using this new code for calculateLine or if it disappears:

https://github.com/SkybuckFlying/OpenXcom/tree/FastVoxelTraversalAlgorithmImplementation