From e016a66dc0baf6e648b3e0c07a6978d395f72af2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 27 Sep 2007 14:08:45 +0000 Subject: [PATCH] - Fixed: When I changed the scaling of textures to full fixed point precision I forgot to change the call that draws the automap marker numbers. - Fixed: The chaingun-flash-checking code always checked the first player, not the calling one. - Fixed: Hitscan traces didn't hit actors when entering from above or below SVN r551 (trunk) --- docs/rh-log.txt | 5 +++++ src/am_map.cpp | 2 +- src/g_doom/a_doomweaps.cpp | 2 +- src/p_trace.cpp | 27 +++++++++++++++++++++++---- src/w_wad.cpp | 2 +- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index e76ba18fb6..c5fef5bcc3 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,9 @@ September 27, 2007 (Changes by Graf Zahl) +- Fixed: When I changed the scaling of textures to full fixed point precision + I forgot to change the call that draws the automap marker numbers. +- Fixed: The chaingun-flash-checking code always checked the first player, + not the calling one. +- Fixed: Hitscan traces didn't hit actors when entering from above or below - Fixed: The DECORATE expression evaluator was reading the operator token from the wrong variable in a few places resulting in incorrect calculations. - Fixed: MP3/OGG music always looped because the looping flag was always diff --git a/src/am_map.cpp b/src/am_map.cpp index 8427fe30e1..0951cacb9b 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -2132,7 +2132,7 @@ void AM_drawMarks () { if (markpoints[i].x != -1) { - DrawMarker (TexMan(marknums[i]), markpoints[i].x, markpoints[i].y, -3, 0, 64, 64, 0, FRACUNIT, 0, STYLE_Normal); + DrawMarker (TexMan(marknums[i]), markpoints[i].x, markpoints[i].y, -3, 0, FRACUNIT, FRACUNIT, 0, FRACUNIT, 0, STYLE_Normal); } } } diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 6eec7a687b..99794f8cba 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -334,7 +334,7 @@ void A_FireCGun (AActor *actor) // [RH] Fix for Sparky's messed-up Dehacked patch! Blargh! FState * atk = weapon->FindState(NAME_Fire); - int theflash = clamp (int(players->psprites[ps_weapon].state - atk), 0, 1); + int theflash = clamp (int(player->psprites[ps_weapon].state - atk), 0, 1); if (flash[theflash].sprite.index != flash->sprite.index) { diff --git a/src/p_trace.cpp b/src/p_trace.cpp index ccb48e0a6c..f4a775be2b 100644 --- a/src/p_trace.cpp +++ b/src/p_trace.cpp @@ -307,14 +307,33 @@ static bool PTR_TraceIterator (intercept_t *in) hitz = StartZ + FixedMul (Vz, dist); if (hitz > in->d.thing->z + in->d.thing->height) - { // hit above actor - return true; + { // trace enters above actor + if (Vz >= 0) return true; // Going up: can't hit + + // Does it hit the top of the actor? + dist = StartZ - (in->d.thing->z + in->d.thing->height); + if (dist > MaxDist) return true; + in->frac = FixedDiv(dist, MaxDist); + + hitx = trace.x + FixedMul (Vx, dist); + hity = trace.y + FixedMul (Vy, dist); + hitz = StartZ + FixedMul (Vz, dist); } else if (hitz < in->d.thing->z) - { // hit below actor - return true; + { // trace enters below actor + if (Vz <= 0) return true; // Going down: can't hit + + // Does it hit the bottom of the actor? + dist = in->d.thing->z - StartZ; + if (dist > MaxDist) return true; + in->frac = FixedDiv(dist, MaxDist); + + hitx = trace.x + FixedMul (Vx, dist); + hity = trace.y + FixedMul (Vy, dist); + hitz = StartZ + FixedMul (Vz, dist); } + Results->HitType = TRACE_HitActor; Results->X = hitx; Results->Y = hity; diff --git a/src/w_wad.cpp b/src/w_wad.cpp index 345e22e861..854cfd3f84 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -1078,7 +1078,7 @@ void FWadCollection::InitHashChains (void) bool FWadCollection::IsMarker (const FWadCollection::LumpRecord *lump, const char *marker) const { - if (lump->namespc != ns_global) + if (lump->namespc != ns_global || (lump->flags & LUMPF_ZIPFILE)) { return false; }