- fixed: calculating open.range requires signed math.

- fixed: FMultiBlockLinesIterator initialized continueup twice but forgot continuedown.
- fixed: One of the debug messages in P_AimLineAttack was missing an if (aimdebug).
This commit is contained in:
Christoph Oelckers 2016-03-05 01:23:27 +01:00
parent b9c72e372b
commit c455c60480
2 changed files with 4 additions and 3 deletions

View file

@ -3991,7 +3991,8 @@ struct aim_t
if (sv_smartaim < 2) if (sv_smartaim < 2)
{ {
// friends don't aim at friends (except players), at least not first // friends don't aim at friends (except players), at least not first
Printf("Hit friend %s at %f,%f,%f\n", th->GetClass()->TypeName.GetChars(), th->X() / 65536., th->Y() / 65536., th->Z() / 65536.); if (aimdebug)
Printf("Hit friend %s at %f,%f,%f\n", th->GetClass()->TypeName.GetChars(), th->X() / 65536., th->Y() / 65536., th->Z() / 65536.);
SetResult(thing_friend, in->frac, th, thingpitch); SetResult(thing_friend, in->frac, th, thingpitch);
} }
} }

View file

@ -265,7 +265,7 @@ void P_LineOpening (FLineOpening &open, AActor *actor, const line_t *linedef,
} }
// avoid overflows in the opening. // avoid overflows in the opening.
open.range = (fixed_t)MIN<QWORD>((QWORD)open.top - open.bottom, FIXED_MAX); open.range = (fixed_t)MIN<SQWORD>((SQWORD)open.top - open.bottom, FIXED_MAX);
} }
@ -874,7 +874,7 @@ void FMultiBlockLinesIterator::startIteratorForGroup(int group)
void FMultiBlockLinesIterator::Reset() void FMultiBlockLinesIterator::Reset()
{ {
continueup = continueup = true; continueup = continuedown = true;
index = -1; index = -1;
portalflags = 0; portalflags = 0;
startIteratorForGroup(basegroup); startIteratorForGroup(basegroup);