mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +00:00
- revert adding in the sprite/frame support for visual thinkers
This commit is contained in:
parent
a0c1f5b1b7
commit
ccd38afbcb
5 changed files with 5 additions and 28 deletions
|
@ -1006,7 +1006,6 @@ void DVisualThinker::Construct()
|
|||
PT.subsector = nullptr;
|
||||
cursector = nullptr;
|
||||
PT.color = 0xffffff;
|
||||
sprite = -1;
|
||||
AnimatedTexture.SetNull();
|
||||
}
|
||||
|
||||
|
@ -1111,7 +1110,7 @@ void DVisualThinker::Tick()
|
|||
return;
|
||||
|
||||
// There won't be a standard particle for this, it's only for graphics.
|
||||
if (!PT.texture.isValid() && (sprite == -1))
|
||||
if (!PT.texture.isValid())
|
||||
{
|
||||
Printf("No valid texture, destroyed");
|
||||
Destroy();
|
||||
|
@ -1326,5 +1325,3 @@ DEFINE_FIELD(DVisualThinker, PrevRoll);
|
|||
DEFINE_FIELD(DVisualThinker, Translation);
|
||||
DEFINE_FIELD(DVisualThinker, LightLevel);
|
||||
DEFINE_FIELD(DVisualThinker, cursector);
|
||||
DEFINE_FIELD(DVisualThinker, sprite);
|
||||
DEFINE_FIELD(DVisualThinker, frame);
|
||||
|
|
|
@ -37,8 +37,6 @@ public:
|
|||
sector_t *cursector;
|
||||
|
||||
int flags;
|
||||
int sprite; // used to find patch_t and flip value
|
||||
uint8_t frame; // sprite frame to draw
|
||||
|
||||
// internal only variables
|
||||
particle_t PT;
|
||||
|
|
|
@ -414,7 +414,7 @@ bool HWSprite::CalculateVertices(HWDrawInfo* di, FVector3* v, DVector3* vp)
|
|||
const bool drawBillboardFacingCamera = hw_force_cambbpref ? gl_billboard_faces_camera :
|
||||
gl_billboard_faces_camera
|
||||
|| ((actor && (!(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA) && (actor->renderflags2 & RF2_BILLBOARDFACECAMERA)))
|
||||
|| (particle && (!(particle->flags & SPF_NOFACECAMERA) && (particle->flags & SPF_FACECAMERA))));
|
||||
|| (particle && particle->texture.isValid() && (!(particle->flags & SPF_NOFACECAMERA) && (particle->flags & SPF_FACECAMERA))));
|
||||
|
||||
// [Nash] has +ROLLSPRITE
|
||||
const bool drawRollSpriteActor = (actor != nullptr && actor->renderflags & RF_ROLLSPRITE);
|
||||
|
@ -1409,10 +1409,8 @@ void HWSprite::ProcessParticle(HWDrawInfo *di, particle_t *particle, sector_t *s
|
|||
if (!particle || particle->alpha <= 0)
|
||||
return;
|
||||
|
||||
if (spr && spr->PT.texture.isNull() && (spr->sprite == -1))
|
||||
{
|
||||
if (spr && spr->PT.texture.isNull())
|
||||
return;
|
||||
}
|
||||
|
||||
lightlevel = hw_ClampLight(spr ? spr->GetLightLevel(sector) : sector->GetSpriteLight());
|
||||
foglevel = (uint8_t)clamp<short>(sector->lightlevel, 0, 255);
|
||||
|
@ -1485,7 +1483,7 @@ void HWSprite::ProcessParticle(HWDrawInfo *di, particle_t *particle, sector_t *s
|
|||
}
|
||||
else
|
||||
{
|
||||
bool has_texture = particle->texture.isValid() || !!spr;
|
||||
bool has_texture = particle->texture.isValid();
|
||||
bool custom_animated_texture = (particle->flags & SPF_LOCAL_ANIM) && particle->animData.ok;
|
||||
|
||||
int particle_style = has_texture ? 2 : gl_particles_style; // Treat custom texture the same as smooth particles
|
||||
|
@ -1507,19 +1505,6 @@ void HWSprite::ProcessParticle(HWDrawInfo *di, particle_t *particle, sector_t *s
|
|||
else if(has_texture)
|
||||
{
|
||||
lump = particle->texture;
|
||||
if (spr && !lump.isValid())
|
||||
{
|
||||
bool mirror = false;
|
||||
DVector3 thingpos = (DVector3)spr->InterpolatedPosition(vp.TicFrac);
|
||||
DAngle ang = (thingpos - vp.Pos).Angle();
|
||||
if (di->Viewpoint.IsOrtho()) ang = vp.Angles.Yaw;
|
||||
|
||||
bool spriteflip = false; // !!(thing->renderflags & RF_SPRITEFLIP)
|
||||
|
||||
int rot;
|
||||
rot = -1;
|
||||
lump = sprites[spr->sprite].GetSpriteFrame(spr->frame, rot, ang, &mirror, spriteflip);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -30,9 +30,6 @@ Class VisualThinker : Thinker native
|
|||
native void SetRenderStyle(int mode); // see ERenderStyle
|
||||
native bool IsFrozen();
|
||||
|
||||
native SpriteID sprite;
|
||||
native uint8 frame;
|
||||
|
||||
native protected void UpdateSector(); // needs to be called if the thinker is set to a non-ticking statnum and the position is modified (or if Tick is overriden and doesn't call Super.Tick())
|
||||
native protected void UpdateSpriteInfo(); // needs to be called every time the texture is updated if the thinker uses SPF_LOCAL_ANIM and is set to a non-ticking statnum (or if Tick is overriden and doesn't call Super.Tick())
|
||||
|
||||
|
|
Loading…
Reference in a new issue