- Update to ZDoom r1954:

- Fixed: Sprites and decals that are drawn with addition must fade to black.
- Make TranslateToStartSpot() set the new sector references for a polyobj's
  walls so that P_CheckSwitchRange() will work with them.
- Fixed: An unspecified save_dir will now save to the program directory on
  Windows. (Other operating systems already use the user's home directory
  instead.)
- Fixed: S_EvictAllChannels() must replace the channel's start time with its
  position when evicting sounds, because restarting the sound system causes
  the DSP clock to restart at 0, so start times that were recorded before
  the reset are no longer applicable after the reset.
- Fixed: S_StopChannel() always set the channel's actor to NULL, eliminating
  origin information when resetting the sound system.


git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@586 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-10-30 11:18:39 +00:00
parent 93f3e279e1
commit 99ad961647
14 changed files with 94 additions and 39 deletions

View file

@ -1545,6 +1545,7 @@ static void TranslateToStartSpot (int tag, int originX, int originY)
validcount++;
for (i = 0; i < po->numsegs; i++, tempSeg++, tempPt++)
{
(*tempSeg)->sidedef->Flags |= WALLF_POLYOBJ;
if ((*tempSeg)->linedef->validcount != validcount)
{
(*tempSeg)->linedef->bbox[BOXTOP] -= deltaY;
@ -1565,16 +1566,17 @@ static void TranslateToStartSpot (int tag, int originX, int originY)
(*tempSeg)->v1->x -= deltaX;
(*tempSeg)->v1->y -= deltaY;
}
avg.x += (*tempSeg)->v1->x>>FRACBITS;
avg.y += (*tempSeg)->v1->y>>FRACBITS;
avg.x += (*tempSeg)->v1->x >> FRACBITS;
avg.y += (*tempSeg)->v1->y >> FRACBITS;
// the original Pts are based off the startSpot Pt, and are
// unique to each seg, not each linedef
tempPt->x = (*tempSeg)->v1->x-po->startSpot[0];
tempPt->y = (*tempSeg)->v1->y-po->startSpot[1];
}
// Put polyobj in its subsector.
avg.x /= po->numsegs;
avg.y /= po->numsegs;
sub = R_PointInSubsector (avg.x<<FRACBITS, avg.y<<FRACBITS);
sub = R_PointInSubsector (avg.x << FRACBITS, avg.y << FRACBITS);
if (sub->poly != NULL)
{
I_Error ("PO_TranslateToStartSpot: Multiple polyobjs in a single subsector.\n");