- Fixed: 3DMidtex checks were treating the Null texture as a valid texture.

SVN r1927 (trunk)
This commit is contained in:
Christoph Oelckers 2009-10-17 15:12:18 +00:00
parent 0c39b5c66a
commit dcd4c7fe7a
3 changed files with 5 additions and 18 deletions

View file

@ -1,7 +1,7 @@
October 17, 2009 (Changes by Graf Zahl) October 17, 2009 (Changes by Graf Zahl)
- Fixed: The rail sound used the shooter's position for calculating the sound origin - Fixed: 3DMidtex checks were treating the Null texture as a valid texture.
but should use the camera position instead to get the correct position for - Fixed: The rail sound's position was not clamped to the actual range between
the closest point along the trail. the trail's start and end point.
- Fixed: Explosions no longer caused splashes. - Fixed: Explosions no longer caused splashes.
- Fixed: Copying translations to lower decals had the shade color check wrong. - Fixed: Copying translations to lower decals had the shade color check wrong.
- Fixed: Waggling floors did not moved attached geometry. - Fixed: Waggling floors did not moved attached geometry.

View file

@ -219,6 +219,7 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, fixed_t *ptextop, f
side_t *side = line->sidedef[sideno]; side_t *side = line->sidedef[sideno];
FTextureID texnum = side->GetTexture(side_t::mid); FTextureID texnum = side->GetTexture(side_t::mid);
if (!texnum.isValid()) return false;
FTexture * tex= TexMan(texnum); FTexture * tex= TexMan(texnum);
if (!tex) return false; if (!tex) return false;

View file

@ -476,7 +476,7 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
// Only consider sound in 2D (for now, anyway) // Only consider sound in 2D (for now, anyway)
// [BB] You have to devide by lengthsquared here, not multiply with it. // [BB] You have to devide by lengthsquared here, not multiply with it.
r = ((start.Y - FIXED2FLOAT(viewy)) * (-dir.Y) - (start.X - FIXED2FLOAT(viewx)) * (dir.X)) / lengthsquared; r = ((start.Y - FIXED2FLOAT(mo->y)) * (-dir.Y) - (start.X - FIXED2FLOAT(mo->x)) * (dir.X)) / lengthsquared;
r = clamp<double>(r, 0., 1.); r = clamp<double>(r, 0., 1.);
dirz = dir.Z; dirz = dir.Z;
@ -484,20 +484,6 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
point = start + r * dir; point = start + r * dir;
dir.Z = dirz; dir.Z = dirz;
#if 0
Printf("Start = (%1.4f,%1.4f), End = (%1.4f,%1.4f), Dir =(%1.4f,%1.4f), View = (%1.4f,%1.4f), Point = (%1.4f,%1.4f), r=%1.4f\n",
start.X, start.Y, end.X, end.Y, dir.X, dir.Y, FIXED2FLOAT(viewx), FIXED2FLOAT(viewy),
point.X, point.Y, r);
FVector3 _start = start;
FVector3 _end = end;
FVector3 view(FIXED2FLOAT(viewx), FIXED2FLOAT(viewy), 0);
point.Z = _start.Z = _end.Z = 0;
Printf("S: %1.4f, E: %1.4f, H: %1.4f P: %1.4f\n",
(_start-view).Length(), (_end-view).Length(), (((_start+_end)/2)-view).Length(), (point-view).Length());
#endif
S_Sound (FLOAT2FIXED(point.X), FLOAT2FIXED(point.Y), viewz, S_Sound (FLOAT2FIXED(point.X), FLOAT2FIXED(point.Y), viewz,
CHAN_WEAPON, sound, 1, ATTN_NORM); CHAN_WEAPON, sound, 1, ATTN_NORM);
} }