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

Access the correct Flags variable for saving maplayers #709

Merged
merged 1 commit into from
Apr 1, 2017

Conversation

H-M-H
Copy link
Member

@H-M-H H-M-H commented Mar 31, 2017

pLayer->m_Flags is not set properly at this point which leads to all layers being treated as normal Layers which then leads to them being saved in a wrong way that crashes the client/server on mapload.

I did not dig too deep into this, I hope someone else can have a look too. It, however, appears to be working now.

This was introduced by 3589ed0

Copy link
Member

@heinrich5991 heinrich5991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered just replacing pLayer->m_Flags by Item.m_Flags?

Looks good to me, just consider the above option. Will merge if you're fine with the current code.

@H-M-H
Copy link
Member Author

H-M-H commented Apr 1, 2017

Yes but as Item.m_Flags is deduced from pLayer->m_<Tele, Speedup...> and just accessing pLayer->m_<Tele, ...> is shorter I did it like this.

@heinrich5991 heinrich5991 merged commit 4a0abf6 into ddnet:master Apr 1, 2017
@heinrich5991
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants