mirror of
https://github.com/DrBeef/Raze.git
synced 2025-04-05 23:40:55 +00:00
- NewStateGroup wrappers replaced.
This commit is contained in:
parent
a85a1e497f
commit
58749b2770
4 changed files with 23 additions and 40 deletions
|
@ -1836,8 +1836,6 @@ ANIMATOR NullAnimator;
|
|||
|
||||
int Distance(int x1, int y1, int x2, int y2);
|
||||
|
||||
int NewStateGroup_(short SpriteNum, STATEp SpriteGroup[]);
|
||||
int NewStateGroup_(USERp user, STATEp SpriteGroup[]);
|
||||
int NewStateGroup(DSWActor* actor, STATEp SpriteGroup[]);
|
||||
void SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid);
|
||||
//USERp SpawnUser(short SpriteNum, short id, STATEp state);
|
||||
|
|
|
@ -1343,7 +1343,6 @@ int PlayerInitChemBomb(PLAYERp pp)
|
|||
}
|
||||
|
||||
// wu->RotNum = 5;
|
||||
// NewStateGroup_(w, &sg_ChemBomb);
|
||||
SET(wu->Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
SetOwner(pp->Actor(), actorNew);
|
||||
|
|
|
@ -4570,13 +4570,9 @@ int SpawnItemsMatch(short match)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// CTW MODIFICATION
|
||||
//void
|
||||
int
|
||||
// CTW MODIFICATION END
|
||||
NewStateGroup_(short SpriteNum, STATEp StateGroup[])
|
||||
int NewStateGroup(DSWActor* actor, STATEp StateGroup[])
|
||||
{
|
||||
USERp u = User[SpriteNum].Data();
|
||||
USERp u = actor->u();
|
||||
|
||||
//if (Prediction)
|
||||
// return;
|
||||
|
@ -4599,20 +4595,10 @@ NewStateGroup_(short SpriteNum, STATEp StateGroup[])
|
|||
|
||||
// turn anims off because people keep setting them in the
|
||||
// art file
|
||||
RESET(picanm[sprite[SpriteNum].picnum].sf, PICANM_ANIMTYPE_MASK);
|
||||
RESET(picanm[actor->s().picnum].sf, PICANM_ANIMTYPE_MASK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NewStateGroup_(USERp user, STATEp StateGroup[])
|
||||
{
|
||||
return NewStateGroup_(user->SpriteNum, StateGroup);
|
||||
}
|
||||
|
||||
int NewStateGroup(DSWActor* actor, STATEp StateGroup[])
|
||||
{
|
||||
return NewStateGroup_(actor->GetSpriteIndex(), StateGroup);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b)
|
||||
|
|
|
@ -10228,7 +10228,7 @@ SpawnExtraMicroMini(DSWActor* actor)
|
|||
wp->clipdist = sp->clipdist;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_MicroMini[0]);
|
||||
NewStateGroup(&swActors[w], &sg_MicroMini[0]);
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = u->Radius;
|
||||
wu->ceiling_dist = u->ceiling_dist;
|
||||
|
@ -10297,7 +10297,7 @@ DoMicro(DSWActor* actor)
|
|||
if ((u->WaitTics -= MISSILEMOVETICS) <= 0)
|
||||
{
|
||||
SetActorZ(actorNew, &np->pos);
|
||||
NewStateGroup_(Weapon, &sg_MicroMini[0]);
|
||||
NewStateGroup(actor, &sg_MicroMini[0]);
|
||||
sp->xrepeat = sp->yrepeat = 10;
|
||||
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||
SpawnExtraMicroMini(actor);
|
||||
|
@ -14793,7 +14793,7 @@ InitRail(PLAYERp pp)
|
|||
zvel = -MulScale(pp->horizon.horiz.asq16(), HORIZ_MULT + 17, 16);
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rail[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rail[0]);
|
||||
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = RAIL_RADIUS;
|
||||
|
@ -14879,7 +14879,7 @@ InitZillaRail(DSWActor* actor)
|
|||
zvel = (100 * (HORIZ_MULT+17));
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rail[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rail[0]);
|
||||
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = RAIL_RADIUS;
|
||||
|
@ -14994,7 +14994,7 @@ InitRocket(PLAYERp pp)
|
|||
wp->clipdist = 64L>>2;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rocket[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rocket[0]);
|
||||
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = 2000;
|
||||
|
@ -15123,7 +15123,7 @@ InitBunnyRocket(PLAYERp pp)
|
|||
wp->clipdist = 64L>>2;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_BunnyRocket[0]);
|
||||
NewStateGroup(&swActors[w], &sg_BunnyRocket[0]);
|
||||
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = 2000;
|
||||
|
@ -15237,7 +15237,7 @@ InitNuke(PLAYERp pp)
|
|||
wp->pal = wu->spal = 19;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rocket[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rocket[0]);
|
||||
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = NUKE_RADIUS;
|
||||
|
@ -15334,7 +15334,7 @@ InitEnemyNuke(DSWActor* actor)
|
|||
wp->pal = wu->spal = 19;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rocket[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rocket[0]);
|
||||
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = NUKE_RADIUS;
|
||||
|
@ -15444,7 +15444,7 @@ InitMicro(PLAYERp pp)
|
|||
wp->zvel += RandomRange(Z(8)) - Z(5);
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Micro[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Micro[0]);
|
||||
|
||||
wu->WeaponNum = u->WeaponNum;
|
||||
wu->Radius = 200;
|
||||
|
@ -16132,7 +16132,7 @@ InitEnemyRocket(DSWActor* actor)
|
|||
wp->clipdist = 64L>>2;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rocket[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rocket[0]);
|
||||
wu->Radius = 200;
|
||||
SET(wp->cstat, CSTAT_SPRITE_YCENTER);
|
||||
|
||||
|
@ -16221,7 +16221,7 @@ InitEnemyRail(DSWActor* actor)
|
|||
wp->zvel = 0;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rail[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rail[0]);
|
||||
|
||||
wu->Radius = 200;
|
||||
wu->ceiling_dist = Z(1);
|
||||
|
@ -16307,7 +16307,7 @@ InitZillaRocket(DSWActor* actor)
|
|||
wp->clipdist = 64L>>2;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rocket[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rocket[0]);
|
||||
wu->Radius = 200;
|
||||
SET(wp->cstat, CSTAT_SPRITE_YCENTER);
|
||||
|
||||
|
@ -16467,7 +16467,7 @@ InitEnemyCrossbow(DSWActor* actor)
|
|||
wp->clipdist = 64L>>2;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_CrossBolt[0]);
|
||||
NewStateGroup(&swActors[w], &sg_CrossBolt[0]);
|
||||
|
||||
wu->xchange = MOVEx(wp->xvel, wp->ang);
|
||||
wu->ychange = MOVEy(wp->xvel, wp->ang);
|
||||
|
@ -16868,7 +16868,7 @@ InitBoltTrap(DSWActor* actor)
|
|||
SET(wp->cstat, CSTAT_SPRITE_YCENTER);
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rocket[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rocket[0]);
|
||||
wu->Radius = 200;
|
||||
|
||||
wu->xchange = MOVEx(wp->xvel, wp->ang);
|
||||
|
@ -16909,7 +16909,7 @@ InitSpearTrap(short SpriteNum)
|
|||
wp->clipdist = 64L>>2;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_CrossBolt[0]);
|
||||
NewStateGroup(&swActors[w], &sg_CrossBolt[0]);
|
||||
|
||||
wu->xchange = MOVEx(wp->xvel, wp->ang);
|
||||
wu->ychange = MOVEy(wp->xvel, wp->ang);
|
||||
|
@ -17813,7 +17813,7 @@ InitTurretMicro(short SpriteNum, PLAYERp pp)
|
|||
wp->zvel += RandomRange(Z(8)) - Z(5);
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Micro[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Micro[0]);
|
||||
|
||||
wu->WeaponNum = pu->WeaponNum;
|
||||
wu->Radius = 200;
|
||||
|
@ -17986,7 +17986,7 @@ InitTurretRail(short SpriteNum, PLAYERp pp)
|
|||
wp->zvel = -pp->horizon.horiz.asq16() >> 9;
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Rail[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Rail[0]);
|
||||
|
||||
wu->Radius = 200;
|
||||
wu->ceiling_dist = Z(1);
|
||||
|
@ -18822,7 +18822,7 @@ InitGrenade(PLAYERp pp)
|
|||
}
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Grenade[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Grenade[0]);
|
||||
SET(wu->Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
SetOwner(pp->PlayerSprite, w);
|
||||
|
@ -18915,7 +18915,7 @@ InitSpriteGrenade(DSWActor* actor)
|
|||
wu = User[w].Data();
|
||||
|
||||
wu->RotNum = 5;
|
||||
NewStateGroup_(w, &sg_Grenade[0]);
|
||||
NewStateGroup(&swActors[w], &sg_Grenade[0]);
|
||||
SET(wu->Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
if (u->ID == ZOMBIE_RUN_R0)
|
||||
|
@ -19155,7 +19155,7 @@ InitFireball(PLAYERp pp)
|
|||
zvel = -MulScale(pp->horizon.horiz.asq16(), 240, 16);
|
||||
|
||||
//wu->RotNum = 5;
|
||||
//NewStateGroup_(w, &sg_Fireball);
|
||||
//NewStateGroup(&swActors[w], &sg_Fireball);
|
||||
//SET(wu->Flags, SPR_XFLIP_TOGGLE);
|
||||
|
||||
// at certain angles the clipping box was big enough to block the
|
||||
|
|
Loading…
Reference in a new issue