Index: src/explosion.cc =================================================================== RCS file: /cvsroot/atanks/atanks/src/explosion.cc,v retrieving revision 1.12 diff -u -r1.12 explosion.cc --- src/explosion.cc 1 Feb 2004 23:29:28 -0000 1.12 +++ src/explosion.cc 10 Oct 2004 20:14:03 -0000 @@ -159,7 +159,7 @@ } if (distance <= (radius + TANKHEIGHT/2) && tank->l > 0) { _global->updateMenu = 1; - tank->damage = (int) ((float) damage * ((float) 1 - ((fabs (distance) / (float)radius) / 2)) * player->damageMultiplier); + tank->damage = (int) ((player ? (float) damage * player->damageMultiplier : (float) damage) * ((float) 1 - ((fabs (distance) / (float)radius) / 2))); tank->creditTo = player; tank->applyDamage (); @@ -253,7 +253,7 @@ if (a > 1 && a <= EXPLODEFRAMES + 1) { int startCirc = (radius / EXPLODEFRAMES) * a; circlefill (_env->terrain, (int)x, (int)y, startCirc, PINK); - circle (dest, (int)x, (int)y, startCirc, player->color); + circle (dest, (int)x, (int)y, startCirc, player ? player->color : WHITE); setUpdateArea ((int)x - (radius + 1), (int)y - (radius + 1), (radius + 1) * 2, (radius + 1) * 2); } } else if ((type >= RIOT_CHARGE) && (type <= RIOT_BLAST)) { @@ -261,7 +261,7 @@ double sx = x - _global->slope[angle][0] * 15; double sy = y - _global->slope[angle][1] * 15; int startCirc = (radius / EXPLODEFRAMES) * a; - triangle (dest, (int)sx, (int)sy, (int)(sx + _global->slope[(angle + 45) % 360][0] * startCirc), (int)(sy + _global->slope[(angle + 45) % 360][1] * startCirc),(int)(sx + _global->slope[(angle + 315) % 360][0] * startCirc),(int)(sy + _global->slope[(angle + 315) % 360][1] * startCirc), player->color); + triangle (dest, (int)sx, (int)sy, (int)(sx + _global->slope[(angle + 45) % 360][0] * startCirc), (int)(sy + _global->slope[(angle + 45) % 360][1] * startCirc),(int)(sx + _global->slope[(angle + 315) % 360][0] * startCirc),(int)(sy + _global->slope[(angle + 315) % 360][1] * startCirc), player ? player->color : WHITE); setUpdateArea ((int)sx - (startCirc + 1), (int)sy - (startCirc + 1), (startCirc + 1) * 2, (startCirc + 1) * 2); } } else { Index: src/beam.cc =================================================================== RCS file: /cvsroot/atanks/atanks/src/beam.cc,v retrieving revision 1.6 diff -u -r1.6 beam.cc --- src/beam.cc 4 Feb 2004 23:34:33 -0000 1.6 +++ src/beam.cc 10 Oct 2004 20:14:03 -0000 @@ -167,7 +167,7 @@ if (targetX > ltank->x - TANKWIDTH - radius && targetX < ltank->x + TANKWIDTH + radius && targetY > ltank->y - radius && targetY < ltank->y + TANKHEIGHT + radius && ltank->l > 0) { //hitSomething = 1; ltank->requireUpdate (); - ltank->damage += damage * player->damageMultiplier; + ltank->damage += player ? damage * player->damageMultiplier : damage; ltank->creditTo = player; if (destroy) ltank->applyDamage ();