mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 03:40:20 +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) {
|
if (clickedOverlay == offButton) {
|
||||||
Script.stop();
|
Script.stop();
|
||||||
} else if (clickedOverlay == platformButton) {
|
} else if (clickedOverlay == platformButton) {
|
||||||
makePlatform(-9.8, 1.0, 5);
|
var platformSize = 3;
|
||||||
|
makePlatform(-9.8, 1.0, platformSize);
|
||||||
} else if (clickedOverlay == gridButton) {
|
} else if (clickedOverlay == gridButton) {
|
||||||
makeGrid("Box", 1.0, 3);
|
makeGrid("Box", 1.0, 3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,13 +99,15 @@ void EntityMotionState::setWorldTransform(const btTransform& worldTrans) {
|
||||||
|
|
||||||
_outgoingPacketFlags = DIRTY_PHYSICS_FLAGS;
|
_outgoingPacketFlags = DIRTY_PHYSICS_FLAGS;
|
||||||
EntityMotionState::enqueueOutgoingEntity(_entity);
|
EntityMotionState::enqueueOutgoingEntity(_entity);
|
||||||
|
|
||||||
quint64 now = usecTimestampNow();
|
#ifdef WANT_DEBUG
|
||||||
qDebug() << "EntityMotionState::setWorldTransform()... changed entity:" << _entity->getEntityItemID();
|
quint64 now = usecTimestampNow();
|
||||||
qDebug() << " last edited:" << _entity->getLastEdited() << formatUsecTime(now - _entity->getLastEdited()) << "ago";
|
qDebug() << "EntityMotionState::setWorldTransform()... changed entity:" << _entity->getEntityItemID();
|
||||||
qDebug() << " last simulated:" << _entity->getLastSimulated() << formatUsecTime(now - _entity->getLastSimulated()) << "ago";
|
qDebug() << " last edited:" << _entity->getLastEdited() << formatUsecTime(now - _entity->getLastEdited()) << "ago";
|
||||||
qDebug() << " last updated:" << _entity->getLastUpdated() << formatUsecTime(now - _entity->getLastUpdated()) << "ago";
|
qDebug() << " last simulated:" << _entity->getLastSimulated() << formatUsecTime(now - _entity->getLastSimulated()) << "ago";
|
||||||
qDebug() << " last collision:" << EntityItem::lastCollisionTime << formatUsecTime(now - EntityItem::lastCollisionTime) << "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) {
|
void EntityMotionState::updateObjectEasy(uint32_t flags, uint32_t frame) {
|
||||||
|
@ -240,7 +242,9 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
|
||||||
#endif
|
#endif
|
||||||
entityPacketSender->queueEditEntityMessage(PacketTypeEntityAddOrEdit, id, properties);
|
entityPacketSender->queueEditEntityMessage(PacketTypeEntityAddOrEdit, id, properties);
|
||||||
} else {
|
} 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
|
// 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();
|
idB = static_cast<EntityMotionState*>(B)->getEntity()->getEntityItemID();
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
//qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
||||||
EntityItem::lastCollisionTime = usecTimestampNow();
|
//EntityItem::lastCollisionTime = usecTimestampNow();
|
||||||
|
|
||||||
emit entityCollisionWithEntity(idA, idB, contactItr->second);
|
emit entityCollisionWithEntity(idA, idB, contactItr->second);
|
||||||
} else if (B && B->getType() == MOTION_STATE_TYPE_ENTITY) {
|
} else if (B && B->getType() == MOTION_STATE_TYPE_ENTITY) {
|
||||||
EntityItemID idA;
|
EntityItemID idA;
|
||||||
EntityItemID idB = static_cast<EntityMotionState*>(B)->getEntity()->getEntityItemID();
|
EntityItemID idB = static_cast<EntityMotionState*>(B)->getEntity()->getEntityItemID();
|
||||||
|
|
||||||
qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
//qDebug() << "entityCollisionWithEntity()... idA:" << idA << "idB:" << idB << "*******************************";
|
||||||
EntityItem::lastCollisionTime = usecTimestampNow();
|
//EntityItem::lastCollisionTime = usecTimestampNow();
|
||||||
|
|
||||||
emit entityCollisionWithEntity(idA, idB, contactItr->second);
|
emit entityCollisionWithEntity(idA, idB, contactItr->second);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue