cleanup debug

This commit is contained in:
ZappoMan 2013-12-19 09:59:36 -08:00
parent f7793a0f08
commit b48161ae26
3 changed files with 6 additions and 10 deletions

View file

@ -438,7 +438,7 @@ void Particle::update() {
bool shouldDie = !isInHand && !isStillMoving && isReallyOld;
setShouldDie(shouldDie);
bool wantDebug = true;
bool wantDebug = false;
if (wantDebug) {
printf("Particle::update()... timeElapsed: %f lifeTime:%f editedAgo:%f "
"isInHand:%s isStillMoveing:%s isReallyOld:%s shouldDie:%s\n",

View file

@ -214,8 +214,11 @@ void ParticleCollisionSystem::applyHardCollision(Particle* particle, const glm::
velocity *= 0.f;
}
}
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()));
const bool wantDebug = false;
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.updateParticle(position, particle->getRadius(), particle->getXColor(), velocity,

View file

@ -111,7 +111,6 @@ bool ParticleTree::findNearPointOperation(OctreeElement* element, void* extraDat
}
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 };
lockForRead();
recurseTreeWithOperation(findNearPointOperation, &args);
@ -133,7 +132,6 @@ bool ParticleTree::findByIDOperation(OctreeElement* element, void* extraData) {
// if already found, stop looking
if (args->found) {
printf("ParticleTree::findByIDOperation(id[%d]) already found, ending search...\n",args->id);
return false;
}
@ -142,20 +140,15 @@ bool ParticleTree::findByIDOperation(OctreeElement* element, void* extraData) {
if (foundParticle) {
args->foundParticle = foundParticle;
args->found = true;
printf("ParticleTree::findByIDOperation(id[%d]) FOUND IT particle=%p...\n",args->id, foundParticle);
return false;
}
// keep looking
printf("ParticleTree::findByIDOperation(id[%d]) keep looking\n",args->id);
return true;
}
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 };
lockForRead();
recurseTreeWithOperation(findByIDOperation, &args);