- minor cleanup

This commit is contained in:
Christoph Oelckers 2023-04-23 11:07:36 +02:00
parent a731db95ae
commit cd2cb8d60e
4 changed files with 5 additions and 11 deletions

View file

@ -109,7 +109,7 @@ bool RRRAFullbrightHack(tspritetype* t, int k)
void applyanimations(tspritetype* t, DDukeActor* h, const DVector2& viewVec, DAngle viewang)
{
if (GetActorInfo(h)->scriptaddress && !(h->flags2 & SFLAG2_DONTANIMATE))// && (t->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLAB)
if (!(h->flags2 & SFLAG2_DONTANIMATE))// && (t->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLAB)
{
DAngle kang;
auto action = h->curAction;
@ -212,8 +212,8 @@ void applyanimations(tspritetype* t, DDukeActor* h, const DVector2& viewVec, DAn
if (h->dispictex.isValid())
h->dispictex = t->spritetexture();
}
else if (display_mirror == 1)
t->cstat |= CSTAT_SPRITE_XFLIP;
if (display_mirror == 1)
t->cstat ^= CSTAT_SPRITE_XFLIP;
}
}
END_DUKE_NS

View file

@ -292,11 +292,6 @@ inline void processinputvel(int snum)
p->sync.svel = (float)velvect.Y;
}
inline ActorInfo* GetActorInfo(DDukeActor* actor)
{
auto cls = static_cast<PClassActor*>(actor->GetClass());
return &gs.actorinfo[cls->ActorInfo()->TypeNum];
}
inline const ActorInfo* DDukeActor::conInfo() const
{

View file

@ -1477,7 +1477,6 @@ static void processweapon(int snum, ESyncBits actions)
// throw away the remaining clip
p->ammo_amount[p->curr_weapon] -=
p->ammo_amount[p->curr_weapon] % aplWeaponClip(p->curr_weapon, snum);
// p->kickback_pic = aplWeaponFireDelay(p->curr_weapon, snum)+1; // animate, but don't shoot...
p->kickback_pic = aplWeaponTotalTime(p->curr_weapon, snum) + 1; // animate, but don't shoot...
actions &= ~SB_FIRE; // not firing...
}
@ -1804,7 +1803,7 @@ void processinput_d(int snum)
}
else
{
if (psectlotag == 2)
if (psectlotag == ST_2_UNDERWATER)
{
p->vel.XY() *= gs.playerfriction - FixedToFloat(0x1400);
p->Angles.StrafeVel *= gs.playerfriction - FixedToFloat(0x1400);

View file

@ -290,7 +290,7 @@ void DDukeActor::Serialize(FSerializer& arc)
arc("cgg", cgg)
("spriteextra", spriteextra)
("picnum", attackertype)
("attackertype", attackertype)
("ang", hitang)
("extra", hitextra)
("owneractor", ownerActor)