diff --git a/CHANGELOG b/CHANGELOG index df221d2202..fa834df3ff 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -cocos2d-x-3.4 xxx +cocos2d-x-3.4 Jan.30 2015 [FIX] Animate3D: `setSpeed` has not effect if `Animate3D` is used in Sequence [FIX] C++: will crash if built with armeabi-v7a enabled on Android devices that with armeabi-v7a architecture but doesn't support NEON instructions [FIX] C++: may crash if VAO is not supported diff --git a/cocos/network/HttpClient-ios.mm b/cocos/network/HttpClient-ios.mm index 5be5271ffc..9a63e5e265 100644 --- a/cocos/network/HttpClient-ios.mm +++ b/cocos/network/HttpClient-ios.mm @@ -170,6 +170,10 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream //if request type is post or put,set header and data if([requestType isEqual: @"POST"] || [requestType isEqual: @"PUT"]) { + if ([requestType isEqual: @"PUT"]) + { + [nsrequest setValue: @"application/x-www-form-urlencoded" forHTTPHeaderField: @"Content-Type"]; + } /* get custom header data (if set) */ std::vector headers=request->getHeaders(); if(!headers.empty()) @@ -190,8 +194,7 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream char* requestDataBuffer = request->getRequestData(); if (nullptr != requestDataBuffer && 0 != strlen(requestDataBuffer)) { - NSString* requestData = [NSString stringWithUTF8String:requestDataBuffer]; - NSData *postData = [requestData dataUsingEncoding:NSUTF8StringEncoding]; + NSData *postData = [NSData dataWithBytes:requestDataBuffer length:request->getRequestDataSize()]; [nsrequest setHTTPBody:postData]; } } diff --git a/cocos/renderer/CCGroupCommand.cpp b/cocos/renderer/CCGroupCommand.cpp index 576dab111e..24874f4351 100644 --- a/cocos/renderer/CCGroupCommand.cpp +++ b/cocos/renderer/CCGroupCommand.cpp @@ -49,13 +49,12 @@ bool GroupCommandManager::init() int GroupCommandManager::getGroupID() { //Reuse old id - for(auto it = _groupMapping.begin(); it != _groupMapping.end(); ++it) + if (!_unusedIDs.empty()) { - if(!it->second) - { - _groupMapping[it->first] = true; - return it->first; - } + int groupID = *_unusedIDs.rbegin(); + _unusedIDs.pop_back(); + _groupMapping[groupID] = true; + return groupID; } //Create new ID @@ -69,6 +68,7 @@ int GroupCommandManager::getGroupID() void GroupCommandManager::releaseGroupID(int groupID) { _groupMapping[groupID] = false; + _unusedIDs.push_back(groupID); } GroupCommand::GroupCommand() diff --git a/cocos/renderer/CCGroupCommand.h b/cocos/renderer/CCGroupCommand.h index 96fa8f70da..c261234ed8 100644 --- a/cocos/renderer/CCGroupCommand.h +++ b/cocos/renderer/CCGroupCommand.h @@ -26,6 +26,7 @@ #ifndef _CC_GROUPCOMMAND_H_ #define _CC_GROUPCOMMAND_H_ +#include #include #include "base/CCRef.h" @@ -45,6 +46,7 @@ protected: ~GroupCommandManager(); bool init(); std::unordered_map _groupMapping; + std::vector _unusedIDs; }; class CC_DLL GroupCommand : public RenderCommand diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 54838904b9..1b7e437e4d 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -13,6 +13,8 @@ - [Windows](#windows) - [Linux](#linux) - [How to start a new game](#how-to-start-a-new-game) +- [v3.4](#v34) + - [Bugs fixed in v3.4](#bugs-fixed-in-v34) - [v3.4rc1](#v34rc1) - [Highlights of v3.4rc1](#highlights-of-v34rc1) - [Features in detail](#features-in-detail) @@ -39,7 +41,7 @@ # Misc Information -* Full Changelog: https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.4rc0/CHANGELOG +* [Full Changelog](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.4/CHANGELOG) * v3.0 Release Notes can be found here: [v3.0 Release Notes](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.0/docs/RELEASE_NOTES.md) # Requirements @@ -124,6 +126,13 @@ Run ## How to start a new game Please refer to this document: [ReadMe](../README.md) +# v3.4 +##Bugs fixed in v3.4 +* C++: crash on armeabi-v7a arch device which do not support NEON instructions +* GLProgram: crash on low end device with no more than 8 attributes support +* New audio: game freeze if audio played two many times on android +* Node: anchor point has no effects on rotation +* More bugs fixed # v3.4rc1 diff --git a/extensions/assets-manager/AssetsManagerEx.cpp b/extensions/assets-manager/AssetsManagerEx.cpp index 1b6d7a660f..18798a1feb 100644 --- a/extensions/assets-manager/AssetsManagerEx.cpp +++ b/extensions/assets-manager/AssetsManagerEx.cpp @@ -264,9 +264,6 @@ const std::string& AssetsManagerEx::getStoragePath() const void AssetsManagerEx::setStoragePath(const std::string& storagePath) { - if (_storagePath.size() > 0) - _fileUtils->removeDirectory(_storagePath); - _storagePath = storagePath; adjustPath(_storagePath); _fileUtils->createDirectory(_storagePath); diff --git a/tests/lua-tests/src/BugsTest/BugsTest.lua b/tests/lua-tests/src/BugsTest/BugsTest.lua index 648697281c..e20eeddbe6 100644 --- a/tests/lua-tests/src/BugsTest/BugsTest.lua +++ b/tests/lua-tests/src/BugsTest/BugsTest.lua @@ -356,8 +356,6 @@ end --BugTest1159 local function BugTest1159() local pLayer = cc.Layer:create() - - cc.Director:getInstance():setDepthTest(true) local background = cc.LayerColor:create(cc.c4b(255, 0, 255, 255)) pLayer:addChild(background) @@ -398,7 +396,6 @@ local function BugTest1159() scheduler:unscheduleScriptEntry(schedulerEntry) end ]]-- - cc.Director:getInstance():setDepthTest(false) end end diff --git a/tests/lua-tests/src/ParallaxTest/ParallaxTest.lua b/tests/lua-tests/src/ParallaxTest/ParallaxTest.lua index af6d1c160f..c0b834755a 100644 --- a/tests/lua-tests/src/ParallaxTest/ParallaxTest.lua +++ b/tests/lua-tests/src/ParallaxTest/ParallaxTest.lua @@ -145,7 +145,6 @@ end function ParallaxTestMain() cclog("ParallaxMain") Helper.index = 1 - cc.Director:getInstance():setDepthTest(true) local scene = cc.Scene:create() Helper.createFunctionTable = { diff --git a/tools/cocos2d-console b/tools/cocos2d-console index 53130d3397..cd05722966 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit 53130d33970b5d9b15a8f0e4c2632e352a6ade9f +Subproject commit cd05722966edde6116a6096b810a7a5598fe7c0a