mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
cleanup debug
This commit is contained in:
parent
f7793a0f08
commit
b48161ae26
3 changed files with 6 additions and 10 deletions
|
@ -438,7 +438,7 @@ void Particle::update() {
|
||||||
bool shouldDie = !isInHand && !isStillMoving && isReallyOld;
|
bool shouldDie = !isInHand && !isStillMoving && isReallyOld;
|
||||||
setShouldDie(shouldDie);
|
setShouldDie(shouldDie);
|
||||||
|
|
||||||
bool wantDebug = true;
|
bool wantDebug = false;
|
||||||
if (wantDebug) {
|
if (wantDebug) {
|
||||||
printf("Particle::update()... timeElapsed: %f lifeTime:%f editedAgo:%f "
|
printf("Particle::update()... timeElapsed: %f lifeTime:%f editedAgo:%f "
|
||||||
"isInHand:%s isStillMoveing:%s isReallyOld:%s shouldDie:%s\n",
|
"isInHand:%s isStillMoveing:%s isReallyOld:%s shouldDie:%s\n",
|
||||||
|
|
|
@ -214,8 +214,11 @@ void ParticleCollisionSystem::applyHardCollision(Particle* particle, const glm::
|
||||||
velocity *= 0.f;
|
velocity *= 0.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("ParticleCollisionSystem::applyHardCollision() particle id:%d new velocity:%f,%f,%f inHand:%s\n",
|
const bool wantDebug = false;
|
||||||
particle->getID(), velocity.x, velocity.y, velocity.z, debug::valueOf(particle->getInHand()));
|
if (wantDebug) {
|
||||||
|
printf("ParticleCollisionSystem::applyHardCollision() particle id:%d new velocity:%f,%f,%f inHand:%s\n",
|
||||||
|
particle->getID(), velocity.x, velocity.y, velocity.z, debug::valueOf(particle->getInHand()));
|
||||||
|
}
|
||||||
|
|
||||||
ParticleEditHandle particleEditHandle(_packetSender, _particles, particle->getID());
|
ParticleEditHandle particleEditHandle(_packetSender, _particles, particle->getID());
|
||||||
particleEditHandle.updateParticle(position, particle->getRadius(), particle->getXColor(), velocity,
|
particleEditHandle.updateParticle(position, particle->getRadius(), particle->getXColor(), velocity,
|
||||||
|
|
|
@ -111,7 +111,6 @@ bool ParticleTree::findNearPointOperation(OctreeElement* element, void* extraDat
|
||||||
}
|
}
|
||||||
|
|
||||||
const Particle* ParticleTree::findClosestParticle(glm::vec3 position, float targetRadius) {
|
const Particle* ParticleTree::findClosestParticle(glm::vec3 position, float targetRadius) {
|
||||||
// First, look for the existing particle in the tree..
|
|
||||||
FindNearPointArgs args = { position, targetRadius, false, NULL, FLT_MAX };
|
FindNearPointArgs args = { position, targetRadius, false, NULL, FLT_MAX };
|
||||||
lockForRead();
|
lockForRead();
|
||||||
recurseTreeWithOperation(findNearPointOperation, &args);
|
recurseTreeWithOperation(findNearPointOperation, &args);
|
||||||
|
@ -133,7 +132,6 @@ bool ParticleTree::findByIDOperation(OctreeElement* element, void* extraData) {
|
||||||
|
|
||||||
// if already found, stop looking
|
// if already found, stop looking
|
||||||
if (args->found) {
|
if (args->found) {
|
||||||
printf("ParticleTree::findByIDOperation(id[%d]) already found, ending search...\n",args->id);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,20 +140,15 @@ bool ParticleTree::findByIDOperation(OctreeElement* element, void* extraData) {
|
||||||
if (foundParticle) {
|
if (foundParticle) {
|
||||||
args->foundParticle = foundParticle;
|
args->foundParticle = foundParticle;
|
||||||
args->found = true;
|
args->found = true;
|
||||||
printf("ParticleTree::findByIDOperation(id[%d]) FOUND IT particle=%p...\n",args->id, foundParticle);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep looking
|
// keep looking
|
||||||
printf("ParticleTree::findByIDOperation(id[%d]) keep looking\n",args->id);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Particle* ParticleTree::findParticleByID(uint32_t id) {
|
const Particle* ParticleTree::findParticleByID(uint32_t id) {
|
||||||
|
|
||||||
printf("ParticleTree::findParticleByID(id[%d])\n",id);
|
|
||||||
// First, look for the existing particle in the tree..
|
|
||||||
FindByIDArgs args = { id, false, NULL };
|
FindByIDArgs args = { id, false, NULL };
|
||||||
lockForRead();
|
lockForRead();
|
||||||
recurseTreeWithOperation(findByIDOperation, &args);
|
recurseTreeWithOperation(findByIDOperation, &args);
|
||||||
|
|
Loading…
Reference in a new issue