SEModCommunity / SE-Community-Mod-API

Space Engineers Community Modding API
GNU Lesser General Public License v3.0
60 stars 47 forks source link

OnCubeGridCreated repeats indefinatly for some objects. #141

Closed DraygoKorvan closed 9 years ago

DraygoKorvan commented 9 years ago

http://forums.keenswh.com/post/show_single_post?pid=1284179325&postcount=293

For some reason my utils plugin is being passed the same set of entity Id's over and over. I'm sure the intention is oncubegridcreated is called only once per cubegrid.

This error message may be the reason why:

http://forums.keenswh.com/post/show_single_post?pid=1284180283&postcount=295

Tyrsis commented 9 years ago

This is due to m_entityEventsBuffer not being cleared after it's added to the m_entityEvents when the resource lock is removed and the buffer is added to the list. In EntityEvents.cs line 90, add m_entityEventsBuffer.Clear(); after the AddList() and test locally, should fix your issue in your local version. Will require chess to fix though.

chessmaster42 commented 9 years ago

Thanks for the extra info. I see the problem now but it's weird that it hasn't come up until now. I'll have it fixed in the next dev build.

chessmaster42 commented 9 years ago

Fixed in 6870317887e0f2a91267e289d0591e49defb5144

Will be released in a dev build soon.

DraygoKorvan commented 9 years ago

fixed