mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 13:01:48 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
155efb249a
4 changed files with 12 additions and 12 deletions
|
@ -6246,7 +6246,7 @@ void P_CreateSecNodeList(AActor *thing)
|
|||
void AActor::UpdateRenderSectorList()
|
||||
{
|
||||
static const double SPRITE_SPACE = 64.;
|
||||
if (Pos() != OldRenderPos)
|
||||
if (Pos() != OldRenderPos && !(flags & MF_NOSECTOR))
|
||||
{
|
||||
sector_t *sec = Sector;
|
||||
double lasth = -FLT_MAX;
|
||||
|
|
|
@ -499,6 +499,7 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
|
|||
}
|
||||
}
|
||||
}
|
||||
UpdateRenderSectorList();
|
||||
}
|
||||
|
||||
void AActor::SetOrigin(double x, double y, double z, bool moving)
|
||||
|
|
|
@ -1295,6 +1295,7 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
|
|||
FTexture* tex;
|
||||
vissprite_t* vis;
|
||||
static vissprite_t avis[NUMPSPRITES];
|
||||
vissprite_t tempvis;
|
||||
bool noaccel;
|
||||
|
||||
assert(pspnum >= 0 && pspnum < NUMPSPRITES);
|
||||
|
@ -1325,7 +1326,6 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
|
|||
|
||||
tx -= tex->GetScaledLeftOffset() << FRACBITS;
|
||||
x1 = (centerxfrac + FixedMul (tx, pspritexscale)) >>FRACBITS;
|
||||
VisPSpritesX1[pspnum] = x1;
|
||||
|
||||
// off the right side
|
||||
if (x1 > viewwidth)
|
||||
|
@ -1339,14 +1339,12 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
|
|||
return;
|
||||
|
||||
// store information in a vissprite
|
||||
vis = &avis[pspnum];
|
||||
vis = &tempvis;
|
||||
vis->renderflags = owner->renderflags;
|
||||
vis->floorclip = 0;
|
||||
|
||||
|
||||
vis->texturemid = int(((BASEYCENTER<<FRACBITS) - sy) * tex->Scale.Y) + (tex->TopOffset << FRACBITS);
|
||||
|
||||
|
||||
if (camera->player && (RenderTarget != screen ||
|
||||
viewheight == RenderTarget->GetHeight() ||
|
||||
(RenderTarget->GetWidth() > 320 && !st_scale)))
|
||||
|
@ -1395,6 +1393,7 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
|
|||
vis->startfrac += vis->xiscale*(vis->x1-x1);
|
||||
|
||||
noaccel = false;
|
||||
FDynamicColormap *colormap_to_use = NULL;
|
||||
if (pspnum <= ps_flash)
|
||||
{
|
||||
vis->Style.Alpha = float(owner->Alpha);
|
||||
|
@ -1491,11 +1490,11 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
|
|||
{
|
||||
noaccel = true;
|
||||
}
|
||||
VisPSpritesBaseColormap[pspnum] = mybasecolormap;
|
||||
colormap_to_use = mybasecolormap;
|
||||
}
|
||||
else
|
||||
{
|
||||
VisPSpritesBaseColormap[pspnum] = basecolormap;
|
||||
colormap_to_use = basecolormap;
|
||||
vis->Style.colormap = basecolormap->Maps;
|
||||
vis->Style.RenderStyle = STYLE_Normal;
|
||||
}
|
||||
|
@ -1508,7 +1507,10 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
|
|||
style.CheckFuzz();
|
||||
if (style.BlendOp != STYLEOP_Fuzz)
|
||||
{
|
||||
VisPSprites[pspnum] = vis;
|
||||
VisPSpritesX1[pspnum] = x1;
|
||||
VisPSpritesBaseColormap[pspnum] = colormap_to_use;
|
||||
VisPSprites[pspnum] = &avis[pspnum];
|
||||
avis[pspnum] = *vis;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1685,9 +1687,6 @@ void R_DrawRemainingPlayerSprites()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// R_SortVisSprites
|
||||
//
|
||||
|
|
|
@ -2090,7 +2090,7 @@ FMOD_MODE FMODSoundRenderer::SetChanHeadSettings(SoundListener *listener, FMOD::
|
|||
}
|
||||
return oldmode;
|
||||
}
|
||||
else if (cpos == pos)
|
||||
else if ((cpos - pos).LengthSquared() < (0.0004 * 0.0004))
|
||||
{ // Head relative
|
||||
return (oldmode & ~FMOD_3D) | FMOD_2D;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue