Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [bug] Armor grid on enemy ships not getting flipped upside down after spawn  (Read 1694 times)

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile

I have noticed the ships on the opposite side of the map are generated facing up on the first frame, then flipped around but their armor cells do not get the same treatment.

I have found this issue when trying to get the "armor grid" coordinates of a weapon when a ship is deployed to check if it gets disabled due to damage (and trigger an ammo cook off). But for some reason it never triggered for the enemy ships. When manually reducing to 0 the cells supposedly under the weapon, it's cells on the other side of the ship that got removed.

Hard to tell if it could have other consequences but I figured you should know.

[EDIT] Actually I'm not sure if it's the armor grid that doesn't get flipped around or maybe the weapons that do get added upside down then turn around? Something must be the wrong way on the first frame but I can't tell for sure what it is.
« Last Edit: January 10, 2019, 06:13:46 AM by Tartiflette »
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24112
    • View Profile

Hmm - could you paste some of your code? It's hard to tell what's going on.

Enemy ships should not be facing up for the first frame - their facing is set when they get spawned, there's no code to do that later. The armor grid does not care about the ship's facing or location - that is, those are not stored as part of its data, but rather only used to compute the cells at a given location etc - so there should not be any issue with it being "out of sync" with the ship somehow; it doesn't seem possible since its state is not tied to the ship's positional state.
Logged