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

Target objects not correctly cleared when ship destroyed #118

Open
sfiera opened this issue Mar 13, 2015 · 0 comments
Open

Target objects not correctly cleared when ship destroyed #118

sfiera opened this issue Mar 13, 2015 · 0 comments

Comments

@sfiera
Copy link
Member

@sfiera sfiera commented Mar 13, 2015

Original issue 115 created by sfiera on 2012-03-22T03:26:38.000Z:

In DestroyObject() in space-object.cpp, there is a section commented:
// if it's a destination, we keep anyone from thinking they have it as a destination

If (anObject->attributes & kIsDestination), it clears the target of all objects targeted at the destroyed one. This check is wrong; it should be using kCanBeDestination. As a result, if a ship is targeted at a ship which was destroyed, it will end up randomly targeting other objects which acquire the destroyed object's object number (typically projectiles, explosions, etc.).

This bug cannot be fixed without invalidating existing replays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant