Skip to content

Commit

Permalink
removed debug, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tra committed Mar 26, 2024
1 parent 2c9fcc1 commit a57df98
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 37 deletions.
2 changes: 0 additions & 2 deletions src/game/CAbstractMissile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ void CAbstractMissile::FrameAction() {
}
anActor = hitRec.closestHit->theOwner;
anActor->WasHit(&hitRec, energy);
SDL_Log("hit energy = %d\n", energy);
SecondaryDamage(hitRec.team, hitRec.playerId, ksiMissileHit);
}

Expand Down Expand Up @@ -161,7 +160,6 @@ void CAbstractMissile::Launch(Matrix *startMatrix,
deltaMove[1] = FMul(speed, target->direction[1]);
deltaMove[2] = FMul(speed, target->direction[2]);
}
SDL_Log("plasma delta = %s\n", FormatVector(deltaMove, 3).c_str());

partList[0]->isTransparent = true;
energy = theEnergy;
Expand Down
40 changes: 6 additions & 34 deletions src/game/CAbstractPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,15 +463,9 @@ void CAbstractPlayer::PlaceHUDParts() {
} else {
mt = &viewPortPart->itsTransform;

// if (debug2Flag) {
// theHit.direction[0] = FMul((*mt)[2][0], PLAYERMISSILESPEED) + speed[0];
// theHit.direction[1] = FMul((*mt)[2][1], PLAYERMISSILESPEED) + speed[1];
// theHit.direction[2] = FMul((*mt)[2][2], PLAYERMISSILESPEED) + speed[2];
// } else {
theHit.direction[0] = FMul((*mt)[2][0], PLAYERMISSILESPEED);
theHit.direction[1] = FMul((*mt)[2][1], PLAYERMISSILESPEED);
theHit.direction[2] = FMul((*mt)[2][2], PLAYERMISSILESPEED);
// }
theHit.direction[0] = FMul((*mt)[2][0], PLAYERMISSILESPEED);
theHit.direction[1] = FMul((*mt)[2][1], PLAYERMISSILESPEED);
theHit.direction[2] = FMul((*mt)[2][2], PLAYERMISSILESPEED);

theHit.direction[3] = 0;
NormalizeVector(3, theHit.direction);
Expand Down Expand Up @@ -1688,39 +1682,17 @@ void CAbstractPlayer::GunActions() {
weaponIdent = 0;
} else {
i = gunEnergy[0] < gunEnergy[1];
if (itsManager->Slot() == 0) {
SDL_Log("gun = %d, energy = %d, gunOffset = %s\n", i, gunEnergy[i],
FormatVector(gunOffset, 3).c_str());
}
if (gunEnergy[i] >= activeGunEnergy) {
Vector missileSpeed;

OneMatrix(&m1);
MTranslate(i ? gunOffset[0] : -gunOffset[0], gunOffset[1], gunOffset[2], &m1);
CombineTransforms(&m1, &m2, &viewPortPart->itsTransform);
MTranslate(speed[0], speed[1], speed[2], &m2);
if (itsManager->Slot() == 0) {
// SDL_Log("\nxform[0] = %s\nxform[1] = %s\nxform[2] = %s\n speed = %s\n",
// FormatVector(viewPortPart->itsTransform[0], 4).c_str(),
// FormatVector(viewPortPart->itsTransform[1], 4).c_str(),
// FormatVector(viewPortPart->itsTransform[2], 4).c_str(),
// FormatVector(speed, 3).c_str());
SDL_Log("\nm2[0] = %s\nm2[1] = %s\nm2[2] = %s\n speed = %s, debug2Flag = %d\n",
FormatVector(m2[0], 4).c_str(),
FormatVector(m2[1], 4).c_str(),
FormatVector(m2[2], 4).c_str(),
FormatVector(speed, 3).c_str(), debug2Flag);
}

// if (debug2Flag) {
// theHit.direction[0] = FMul(m2[2][0], PLAYERMISSILESPEED) + speed[0];
// theHit.direction[1] = FMul(m2[2][1], PLAYERMISSILESPEED) + speed[1];
// theHit.direction[2] = FMul(m2[2][2], PLAYERMISSILESPEED) + speed[2];
// } else {
theHit.direction[0] = FMul(m2[2][0], PLAYERMISSILESPEED);
theHit.direction[1] = FMul(m2[2][1], PLAYERMISSILESPEED);
theHit.direction[2] = FMul(m2[2][2], PLAYERMISSILESPEED);
// }
theHit.direction[0] = FMul(m2[2][0], PLAYERMISSILESPEED);
theHit.direction[1] = FMul(m2[2][1], PLAYERMISSILESPEED);
theHit.direction[2] = FMul(m2[2][2], PLAYERMISSILESPEED);

missileSpeed[0] = theHit.direction[0];
missileSpeed[1] = theHit.direction[1];
Expand Down
1 change: 0 additions & 1 deletion src/game/CRealMovers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void CRealMovers::WasHit(RayHitRecord *theHit, Fixed hitEnergy) {

CGlowActors::WasHit(theHit, hitEnergy);

SDL_Log("HIT direction = %s, energy = %d, shields = %d, totalMass = %d\n", FormatVector(theHit->direction, 3).c_str(), hitEnergy, shields, GetTotalMass());
if (shields) {
impulsePower = hitEnergy >> 1;
impulseMotion[0] = FMul(impulsePower, theHit->direction[0]);
Expand Down

0 comments on commit a57df98

Please sign in to comment.