mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- don't use picnum to address gs.actorinfo
This commit is contained in:
parent
b56aa1e1a3
commit
2f78a10ce1
3 changed files with 7 additions and 5 deletions
|
@ -109,7 +109,7 @@ bool RRRAFullbrightHack(tspritetype* t, int k)
|
|||
|
||||
void applyanimations(tspritetype* t, DDukeActor* h, const DVector2& viewVec, DAngle viewang)
|
||||
{
|
||||
if (gs.actorinfo[h->spr.picnum].scriptaddress && !(h->flags2 & SFLAG2_DONTANIMATE))// && (t->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLAB)
|
||||
if (GetActorInfo(h)->scriptaddress && !(h->flags2 & SFLAG2_DONTANIMATE))// && (t->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLAB)
|
||||
{
|
||||
DAngle kang;
|
||||
auto action = h->curAction;
|
||||
|
|
|
@ -1162,10 +1162,6 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
if (bSet) act->spr.cstat = ESpriteFlags::FromInt(lValue);
|
||||
else SetGameVarID(lVar2, act->spr.cstat, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_PICNUM:
|
||||
if (bSet) act->spr.picnum = lValue;
|
||||
else SetGameVarID(lVar2, act->spr.picnum, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_SHADE:
|
||||
if (bSet) act->spr.shade = lValue;
|
||||
else SetGameVarID(lVar2, act->spr.shade, sActor, sPlayer);
|
||||
|
|
|
@ -292,6 +292,12 @@ 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
|
||||
{
|
||||
auto tn = static_cast<PClassActor*>(GetClass())->ActorInfo()->TypeNum;
|
||||
|
|
Loading…
Reference in a new issue