From a79586c052ba872460bad641dbbecaf8a3a6ef24 Mon Sep 17 00:00:00 2001 From: "folgerhu@sina.com" Date: Thu, 9 Jul 2015 17:02:12 +0800 Subject: [PATCH] CCTMXXMLParser code negligence --- cocos/2d/CCTMXXMLParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCTMXXMLParser.cpp b/cocos/2d/CCTMXXMLParser.cpp index 1d163af57b..e559550a58 100644 --- a/cocos/2d/CCTMXXMLParser.cpp +++ b/cocos/2d/CCTMXXMLParser.cpp @@ -454,7 +454,7 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts) // Y int y = attributeDict["y"].asInt(); - Vec2 p(x + objectGroup->getPositionOffset().x, _mapSize.height * _tileSize.height - y - objectGroup->getPositionOffset().x - attributeDict["height"].asInt()); + Vec2 p(x + objectGroup->getPositionOffset().x, _mapSize.height * _tileSize.height - y - objectGroup->getPositionOffset().y - attributeDict["height"].asInt()); p = CC_POINT_PIXELS_TO_POINTS(p); dict["x"] = Value(p.x); dict["y"] = Value(p.y);