summarylogtreecommitdiffstats
path: root/CCPhysicsBody.patch
diff options
context:
space:
mode:
Diffstat (limited to 'CCPhysicsBody.patch')
-rw-r--r--CCPhysicsBody.patch26
1 files changed, 16 insertions, 10 deletions
diff --git a/CCPhysicsBody.patch b/CCPhysicsBody.patch
index f9faaac7301c..d3451769be7b 100644
--- a/CCPhysicsBody.patch
+++ b/CCPhysicsBody.patch
@@ -1,28 +1,34 @@
---- CCPhysicsBody.cpp 2016-12-29 13:42:38.000000000 -0400
-+++ /opt/cocos2d-x-git/cocos/physics/CCPhysicsBody.cpp 2017-01-04 13:22:53.445318965 -0400
-@@ -575,12 +575,6 @@
+--- lel/cocos2d-x-3.14/cocos/physics/CCPhysicsBody.cpp 2016-12-29 13:42:38.000000000 -0400
++++ /opt/cocos2d-x-git/cocos/physics/CCPhysicsBody.cpp 2017-01-08 12:02:19.747686186 -0400
+@@ -575,12 +575,12 @@
void PhysicsBody::setVelocity(const Vec2& velocity)
{
- if (!_dynamic)
-- {
++ if (cpBodyGetType(_cpBody) == CP_BODY_TYPE_STATIC)
+ {
- CCLOG("physics warning: your can't set velocity for a static body.");
-- return;
-- }
++ CCLOG("physics warning: you can't set velocity for a static body.");
+ return;
+ }
-
++
cpBodySetVelocity(_cpBody, PhysicsHelper::point2cpv(velocity));
}
-@@ -601,12 +595,6 @@
+@@ -601,12 +601,12 @@
void PhysicsBody::setAngularVelocity(float velocity)
{
- if (!_dynamic)
-- {
++ if (cpBodyGetType(_cpBody) == CP_BODY_TYPE_STATIC)
+ {
- CCLOG("physics warning: your can't set angular velocity for a static body.");
-- return;
-- }
++ CCLOG("physics warning: you can't set angular velocity for a static body.");
+ return;
+ }
-
++
cpBodySetAngularVelocity(_cpBody, velocity);
}