aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.02k stars 540 forks source link

Bugfix net binding destroying random entities #499

Open CDufour909 opened 4 years ago

CDufour909 commented 4 years ago

When a client is deleting netbound entities (for which he is not the authority), this leaves the NetBinding system with pointers to invalid entities in the m_boundEntities. Causing either crashes or deletion of random entities when the authority actually signals destruction of the netreplicated slice.

To remedy this issue, I'm changingthe m_boundEntities vector contents from Entity pointers to Entity Ids.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

AMZN-alexpete commented 4 years ago

Thanks for the fix @CDufour909 ! We're looking over the change and will update this pull request as the status changes.

CDufour909 commented 4 years ago

Hey @AMZN-alexpete, Been using this code for a couple of days and found a bug where authority deleting a single entity in a slice deleting another entity in the same slice instead. So I just updated the PR to include that fix.