mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 23:26:25 +02:00
tweaks for debugging
This commit is contained in:
parent
a1ec44b8e0
commit
08fbcbaf40
3 changed files with 18 additions and 13 deletions
|
@ -486,7 +486,8 @@ function mousePressEvent(event) {
|
|||
if (clickedOverlay == offButton) {
|
||||
Script.stop();
|
||||
} else if (clickedOverlay == platformButton) {
|
||||
makePlatform(-9.8, 1.0, 5);
|
||||
var platformSize = 3;
|
||||
makePlatform(-9.8, 1.0, platformSize);
|
||||
} else if (clickedOverlay == gridButton) {
|
||||
makeGrid("Box", 1.0, 3);
|
||||
}
|
||||
|
|
|
@ -99,13 +99,15 @@ void EntityMotionState::setWorldTransform(const btTransform& worldTrans) {
|
|||
|
||||
_outgoingPacketFlags = DIRTY_PHYSICS_FLAGS;
|
||||
EntityMotionState::enqueueOutgoingEntity(_entity);
|
||||
|
||||
quint64 now = usecTimestampNow();
|
||||
qDebug() << "EntityMotionState::setWorldTransform()... changed entity:" << _entity->getEntityItemID();
|
||||
qDebug() << " last edited:" << _entity->getLastEdited() << formatUsecTime(now - _entity->getLastEdited()) << "ago";
|
||||
qDebug() << " last simulated:" << _entity->getLastSimulated() << formatUsecTime(now - _entity->getLastSimulated()) << "ago";
|
||||
qDebug() << " last updated:" << _entity->getLastUpdated() << formatUsecTime(now - _entity->getLastUpdated()) << "ago";
|
||||
qDebug() << " last collision:" << EntityItem::lastCollisionTime << formatUsecTime(now - EntityItem::lastCollisionTime) << "ago";
|
||||
|
||||
#ifdef WANT_DEBUG
|
||||
quint64 now = usecTimestampNow();
|
||||
qDebug() << "EntityMotionState::setWorldTransform()... changed entity:" << _entity->getEntityItemID();
|
||||
qDebug() << " last edited:" << _entity->getLastEdited() << formatUsecTime(now - _entity->getLastEdited()) << "ago";
|
||||
qDebug() << " last simulated:" << _entity->getLastSimulated() << formatUsecTime(now - _entity->getLastSimulated()) << "ago";
|
||||
qDebug() << " last updated:" << _entity->getLastUpdated() << formatUsecTime(now - _entity->getLastUpdated()) << "ago";
|
||||
qDebug() << " last collision:" << EntityItem::lastCollisionTime << formatUsecTime(now - EntityItem::lastCollisionTime) << "ago";
|
||||
#endif
|
||||
}
|
||||
|
||||
void EntityMotionState::updateObjectEasy(uint32_t flags, uint32_t frame) {
|
||||
|
@ -240,7 +242,9 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
|
|||
#endif
|
||||
entityPacketSender->queueEditEntityMessage(PacketTypeEntityAddOrEdit, id, properties);
|
||||
} else {
|
||||
qDebug() << "EntityMotionState::sendUpdate()... NOT sending update as requested.";
|
||||
#ifdef WANT_DEBUG
|
||||
qDebug() << "EntityMotionState::sendUpdate()... NOT sending update as requested.";
|
||||
#endif
|
||||
}
|
||||
|
||||
// The outgoing flags only itemized WHAT to send, not WHETHER to send, hence we always set them
|
||||
|
|
|
@ -372,16 +372,16 @@ void PhysicsEngine::computeCollisionEvents() {
|
|||
idB = static_cast<EntityMotionState*>(B)->getEntity()->getEntityItemID();
|
||||
}
|
||||
|
||||
qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
||||
EntityItem::lastCollisionTime = usecTimestampNow();
|
||||
//qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
||||
//EntityItem::lastCollisionTime = usecTimestampNow();
|
||||
|
||||
emit entityCollisionWithEntity(idA, idB, contactItr->second);
|
||||
} else if (B && B->getType() == MOTION_STATE_TYPE_ENTITY) {
|
||||
EntityItemID idA;
|
||||
EntityItemID idB = static_cast<EntityMotionState*>(B)->getEntity()->getEntityItemID();
|
||||
|
||||
qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
||||
EntityItem::lastCollisionTime = usecTimestampNow();
|
||||
//qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
||||
//EntityItem::lastCollisionTime = usecTimestampNow();
|
||||
|
||||
emit entityCollisionWithEntity(idA, idB, contactItr->second);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue