diff options
Diffstat (limited to 'modules/bullet/rigid_body_bullet.cpp')
-rw-r--r-- | modules/bullet/rigid_body_bullet.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index d611810bfa..dfc9647813 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -320,7 +320,7 @@ void RigidBodyBullet::destroy_kinematic_utilities() { } void RigidBodyBullet::main_shape_changed() { - CRASH_COND(!get_main_shape()) + CRASH_COND(!get_main_shape()); btBody->setCollisionShape(get_main_shape()); set_continuous_collision_detection(is_continuous_collision_detection_enabled()); // Reset } @@ -515,7 +515,7 @@ void RigidBodyBullet::set_param(PhysicsServer::BodyParameter p_param, real_t p_v scratch_space_override_modificator(); break; default: - WARN_PRINTS("Parameter " + itos(p_param) + " not supported by bullet. Value: " + itos(p_value)); + WARN_PRINT("Parameter " + itos(p_param) + " not supported by bullet. Value: " + itos(p_value)); } } @@ -536,7 +536,7 @@ real_t RigidBodyBullet::get_param(PhysicsServer::BodyParameter p_param) const { case PhysicsServer::BODY_PARAM_GRAVITY_SCALE: return gravity_scale; default: - WARN_PRINTS("Parameter " + itos(p_param) + " not supported by bullet"); + WARN_PRINT("Parameter " + itos(p_param) + " not supported by bullet"); return 0; } } @@ -619,7 +619,7 @@ Variant RigidBodyBullet::get_state(PhysicsServer::BodyState p_state) const { case PhysicsServer::BODY_STATE_CAN_SLEEP: return can_sleep; default: - WARN_PRINTS("This state " + itos(p_state) + " is not supported by Bullet"); + WARN_PRINT("This state " + itos(p_state) + " is not supported by Bullet"); return Variant(); } } @@ -795,12 +795,12 @@ Vector3 RigidBodyBullet::get_angular_velocity() const { void RigidBodyBullet::set_transform__bullet(const btTransform &p_global_transform) { if (mode == PhysicsServer::BODY_MODE_KINEMATIC) { - if (space) + if (space && space->get_delta_time() != 0) btBody->setLinearVelocity((p_global_transform.getOrigin() - btBody->getWorldTransform().getOrigin()) / space->get_delta_time()); // The kinematic use MotionState class godotMotionState->moveBody(p_global_transform); } else { - // Is necesasry to avoid wrong location on the rendering side on the next frame + // Is necessary to avoid wrong location on the rendering side on the next frame godotMotionState->setWorldTransform(p_global_transform); } CollisionObjectBullet::set_transform__bullet(p_global_transform); |