Merge pull request #132 from WenhaiLin/master

IPV6 compatibility
This commit is contained in:
Wenhai Lin
2016-05-19 09:48:55 +08:00
4 changed files with 12 additions and 12 deletions
+8 -8
View File
@@ -367,7 +367,7 @@ void Sequence::update(float t)
new_t = (t-_split) / (1 - _split );
}
if ( found==1 )
if (found == 1)
{
if( _last == -1 )
{
@@ -1067,7 +1067,7 @@ MoveBy* MoveBy::reverse() const
}
void MoveBy::update(float t)
void MoveBy::update(float dt)
{
if (_target)
{
@@ -1075,9 +1075,11 @@ void MoveBy::update(float t)
auto currentPos = _target->getPosition();
auto diff = currentPos - _previousPosition;
_startPosition = _startPosition + diff;
auto newPos = _startPosition + (_positionDelta * t);
_target->setPosition(newPos);
_previousPosition = newPos;
_previousPosition.x = _startPosition.x + _positionDelta.x * dt;
_previousPosition.y = _startPosition.y + _positionDelta.y * dt;
_target->setPosition(_previousPosition);
#else
_target->setPosition(_startPosition + _positionDelta * t);
#endif // CC_ENABLE_STACKABLE_ACTIONS
@@ -1979,7 +1981,6 @@ void FadeTo::update(float time)
{
_target->setOpacity((GLubyte)(_fromOpacity + (_toOpacity - _fromOpacity) * time));
}
/*_target->setOpacity((GLubyte)(_fromOpacity + (_toOpacity - _fromOpacity) * time));*/
}
//
@@ -2548,10 +2549,9 @@ void ActionFloat::startWithTarget(Node *target)
void ActionFloat::update(float delta)
{
float value = _to - _delta * (1 - delta);
if (_callback)
{
float value = _to - _delta * (1 - delta);
// report back value to caller
_callback(value);
}
+1 -1
View File
@@ -391,7 +391,7 @@ bool Console::listenOnTCP(int port)
bzero(&hints, sizeof(struct addrinfo));
hints.ai_flags = AI_PASSIVE;
hints.ai_family = AF_INET; // AF_UNSPEC: Do we need IPv6 ?
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
@@ -1774,7 +1774,7 @@ static void serverEntryPoint(unsigned int port)
struct addrinfo hints, *result = nullptr, *rp = nullptr;
int s = 0;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_INET; // IPv4
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM; // TCP stream sockets
hints.ai_flags = AI_PASSIVE; // fill in my IP for me
+2 -2
View File
@@ -1,6 +1,6 @@
{
"version":"v3-deps-3",
"zip_file_size":"51659510",
"version":"v3-deps-4",
"zip_file_size":"51525671",
"repo_name":"cocos2d-x-lite-external",
"repo_parent":"https://github.com/WenhaiLin/"
}