angreifer und verteidiger böse gemixt, speicherfehler

This commit is contained in:
Enno Rehling 2005-02-13 10:05:22 +00:00
parent bb5d4ba98e
commit 924b1d588a
1 changed files with 5 additions and 4 deletions

View File

@ -967,7 +967,6 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
int heiltrank = 0; int heiltrank = 0;
int faerie_level; int faerie_level;
char debugbuf[512]; char debugbuf[512];
double kritchance;
/* Schild */ /* Schild */
void **si; void **si;
@ -1049,7 +1048,9 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
if (type!=AT_COMBATSPELL && type!=AT_SPELL) /* Kein Zauber, normaler Waffenschaden */ if (type!=AT_COMBATSPELL && type!=AT_SPELL) /* Kein Zauber, normaler Waffenschaden */
{ {
kritchance = max((sk * 3 - sd) / 200.0, 0.005); double kritchance = (sk * 3 - sd) / 200.0;
kritchance = max(kritchance, 0.005);
kritchance = min(0.9, kritchance);
while (chance(kritchance)) { while (chance(kritchance)) {
sprintf(debugbuf, sprintf(debugbuf,
@ -1814,7 +1815,7 @@ hits(troop at, troop dt, weapon * awp)
if (dist>1 && (awp == NULL || !fval(awp->type, WTF_MISSILE))) return 0; if (dist>1 && (awp == NULL || !fval(awp->type, WTF_MISSILE))) return 0;
/* mark this person as hit. */ /* mark this person as hit. */
af->person[dt.index].flags |= FL_HIT; df->person[dt.index].flags |= FL_HIT;
if (af->person[at.index].flags & FL_STUNNED) { if (af->person[at.index].flags & FL_STUNNED) {
af->person[at.index].flags &= ~FL_STUNNED; af->person[at.index].flags &= ~FL_STUNNED;