SSBMTonberry / tileson

A modern and helpful cross-platform json-parser for C++, used for parsing Tiled maps.
BSD 2-Clause "Simplified" License
189 stars 29 forks source link

Attributes of classes set as properties return zero where overridden #104

Closed tmpsantos closed 10 months ago

tmpsantos commented 10 months ago

The use of nested classes seems to be broken, this will return 0 if the attribute is overridden:

tilesetClass->get<tson::TiledClass>("Transform").get<float>("Rotation") == 40.);
tmpsantos commented 10 months ago

Made a PR fixing the issue, visually speaking, this is the use case that was not working (added to the test):

image

In this case I'm overriding Rotation, but when I do that, everything returns 0.