Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fighters can attack a ship in another system #190

Closed
tomyeltz opened this issue Dec 3, 2023 · 4 comments
Closed

Fighters can attack a ship in another system #190

tomyeltz opened this issue Dec 3, 2023 · 4 comments
Assignees
Labels
Alpha 7 bug Something isn't working Mac OS X Steam
Milestone

Comments

@tomyeltz
Copy link

tomyeltz commented Dec 3, 2023

Description

Fighters (the objects, not the "Teeny Fighter" ships) don't have a SystemId attribute and therefore can attack ships that are in another system. The fighters appear to swarm around and fire at nothing in their system while the target ship in the other system appears to be taking fire (and damage) from all over with no visible combatants (plenty of tracers, though!).

This can be observed in the attached save file, where a swarm of fighters fly around and shoot at apparently nothing in NG4 while the Bethlehem Steel takes fire in the STARGATE system.

FighersAttackingShipInAnotherSystem.space.zip

Flavour affected

Steam

Operating System

Mac OS X

Version

Alpha 7

Is it something that used to work before?

N/A, multi-system simulation did not exist before Alpha 7

Expected behavior

Fighters should not be aware of ships in another system or attack them.

Actual behavior

Fighters are aware of ships in another system and attack them.

Repro steps

  1. Get two friendly ships
  2. Jump one to another system
  3. Spawn/wait for a hostile ship that can launch fighters in one system
  4. Somehow maneuver the hostile ship/fighters to the coordinates of the ship in the other system and watch the confusing fireworks
@tomyeltz tomyeltz added the bug Something isn't working label Dec 3, 2023
@jknotten jknotten self-assigned this Dec 5, 2023
@jknotten
Copy link
Contributor

jknotten commented Dec 5, 2023

I've just started looking into this one and I was just wondering whether these steps might also cause the problem:

  1. Start with two friendly ships in one system.
  2. Start a battle with a ship with hostile fighters.
  3. Jump your friendly ship that is being targetted by the fighters to another system.
  4. The fighers continuing to target that ship even though it's not there.

The fighters do know which system they're in, this is because the way it's structured is that fighters are world objects that belong to a layer ( a free space layer, when they're launched) and layers have system ids.

@jknotten jknotten added this to the Alpha 8 milestone Dec 5, 2023
@jknotten
Copy link
Contributor

jknotten commented Dec 5, 2023

This should be fixed in Alpha 8.

@tomyeltz
Copy link
Author

tomyeltz commented Dec 5, 2023

You know, I probably should have considered inheritance more strongly since the logistics drones clearly know whether their target is in the same system or not while also lacking a SystemId attribute.

I will see if I can get repro this with the proposed alternative steps. Yep, that works, too.

@tomyeltz
Copy link
Author

Working perfectly. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Alpha 7 bug Something isn't working Mac OS X Steam
Projects
None yet
Development

No branches or pull requests

2 participants