force local deactivation on remote deactivation

This commit is contained in:
Andrew Meadows 2017-03-09 17:53:17 -08:00
parent 8ddcae2a15
commit be3012181f

View file

@ -143,6 +143,8 @@ void EntityMotionState::handleEasyChanges(uint32_t& flags) {
flags &= ~Simulation::DIRTY_PHYSICS_ACTIVATION;
_body->setActivationState(WANTS_DEACTIVATION);
_outgoingPriority = 0;
const float ACTIVATION_EXPIRY = 3.0f; // something larger than the 2.0 hard coded in Bullet
_body->setDeactivationTime(ACTIVATION_EXPIRY);
bool verbose = _entity->getName() == "fubar"; // adebug
if (verbose) {
std::cout << (void*)(this) << " " << secTimestampNow() << " adebug flag for deactivation" << std::endl; // adebug