mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- clean out all residual access to yvel in SW.
The game never uses it aside from a sector trigger tag and one special case for the serpent ring.
This commit is contained in:
parent
36f109502d
commit
f495650922
6 changed files with 24 additions and 29 deletions
|
@ -520,10 +520,11 @@ DSWActor* CopySprite(sprt const* tsp, sectortype* newsector)
|
|||
actorNew->spr.xoffset = tsp->xoffset;
|
||||
actorNew->spr.yoffset = tsp->yoffset;
|
||||
actorNew->spr.angle = tsp->angle;
|
||||
actorNew->spr.xvel = tsp->xvel;
|
||||
actorNew->spr.yvel = tsp->yvel;
|
||||
actorNew->spr.xint = tsp->xint;
|
||||
actorNew->spr.yint = tsp->yint;
|
||||
actorNew->spr.inittype = tsp->inittype;
|
||||
actorNew->spr.shade = tsp->shade;
|
||||
// this later also needs to copy the real velocity, because the sprite renderer accesses it. :(
|
||||
|
||||
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
|
||||
|
|
|
@ -2114,8 +2114,8 @@ inline int16_t SP_TAG1(DSWActor* actor) { return actor->spr.hitag; }
|
|||
inline int16_t& SP_TAG2(DSWActor* actor) { return actor->spr.lotag; }
|
||||
inline uint8_t& SP_TAG3(DSWActor* actor) { return actor->spr.clipdist; }
|
||||
inline int16_t& SP_TAG4(DSWActor* actor) { return actor->spr.intangle; } // this may not be transitioned to a real angular type
|
||||
inline int16_t& SP_TAG5(DSWActor* actor) { return actor->spr.xvel; }
|
||||
inline int16_t& SP_TAG6(DSWActor* actor) { return actor->spr.yvel; }
|
||||
inline int16_t& SP_TAG5(DSWActor* actor) { return actor->spr.xint; }
|
||||
inline int16_t& SP_TAG6(DSWActor* actor) { return actor->spr.yint; }
|
||||
inline uint8_t& SP_TAG7(DSWActor* actor) { return MSB_VAR(actor->spr.inittype); }
|
||||
inline uint8_t& SP_TAG8(DSWActor* actor) { return LSB_VAR(actor->spr.inittype); }
|
||||
inline uint8_t& SP_TAG9(DSWActor* actor) { return MSB_VAR(actor->spr.intowner); }
|
||||
|
|
|
@ -437,7 +437,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->user.change.X = actor->user.change.Y = 0;
|
||||
actor->spr.xrepeat = actor->spr.yrepeat = 70 - RandomRange(25);
|
||||
actor->spr.pos.XY() = bldActor->spr.pos.XY();
|
||||
|
@ -1336,7 +1336,7 @@ int InitChemBomb(DSWActor* actor)
|
|||
if (actor->user.ID == MUSHROOM_CLOUD || actor->user.ID == 3121 || actor->user.ID == SUMO_RUN_R0) // 3121 == GRENADE_EXP
|
||||
{
|
||||
actor->user.change.Zero();
|
||||
actorNew->spr.xvel = actorNew->spr.yvel = 0;
|
||||
actorNew->clear_xvel();
|
||||
actorNew->clear_zvel();
|
||||
// Smoke will come out for this many seconds
|
||||
actorNew->user.WaitTics = 40*120;
|
||||
|
|
|
@ -131,7 +131,7 @@ int SetupToiletGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 38;
|
||||
actor->spr.yrepeat = 32;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = TOILETGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -190,7 +190,7 @@ int DoToiletGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -353,7 +353,7 @@ int SetupWashGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 28;
|
||||
actor->spr.yrepeat = 24;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = WASHGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -421,7 +421,7 @@ int DoWashGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -549,7 +549,7 @@ int SetupTrashCan(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 46;
|
||||
actor->spr.yrepeat = 42;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->user.ID = TRASHCAN;
|
||||
|
||||
|
@ -570,7 +570,7 @@ int DoTrashCan(DSWActor* actor)
|
|||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -642,7 +642,7 @@ int SetupPachinkoLight(DSWActor* actor)
|
|||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKOLIGHT_R0;
|
||||
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = TAG_PACHINKOLIGHT;
|
||||
actor->spr.shade = -2;
|
||||
|
@ -733,7 +733,6 @@ int SetupPachinko1(DSWActor* actor)
|
|||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO1;
|
||||
|
||||
actor->spr.yvel = 0;
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = PACHINKO1;
|
||||
|
||||
|
@ -886,7 +885,6 @@ int SetupPachinko2(DSWActor* actor)
|
|||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO2;
|
||||
|
||||
actor->spr.yvel = 0;
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = PACHINKO2;
|
||||
|
||||
|
@ -963,7 +961,6 @@ int SetupPachinko3(DSWActor* actor)
|
|||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO3;
|
||||
|
||||
actor->spr.yvel = 0;
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = PACHINKO3;
|
||||
|
||||
|
@ -1041,7 +1038,6 @@ int SetupPachinko4(DSWActor* actor)
|
|||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKO4;
|
||||
|
||||
actor->spr.yvel = 0;
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = PACHINKO4;
|
||||
|
||||
|
@ -1149,7 +1145,7 @@ int SetupCarGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 29;
|
||||
actor->spr.yrepeat = 25;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = CARGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1200,7 +1196,7 @@ int DoCarGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -1352,7 +1348,7 @@ int SetupMechanicGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 27;
|
||||
actor->spr.yrepeat = 26;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = MECHANICGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1402,7 +1398,7 @@ int DoMechanicGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -1554,7 +1550,7 @@ int SetupSailorGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 28;
|
||||
actor->spr.yrepeat = 26;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = SAILORGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1609,7 +1605,7 @@ int DoSailorGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -1750,7 +1746,7 @@ int SetupPruneGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 33;
|
||||
actor->spr.yrepeat = 28;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = PRUNEGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1816,7 +1812,7 @@ int DoPruneGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->clear_xyvel();
|
||||
actor->clear_xvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -2403,7 +2403,6 @@ void SpriteSetup(void)
|
|||
break;
|
||||
|
||||
case DEMO_CAMERA:
|
||||
actor->spr.yvel = 100;
|
||||
actor->set_int_zvel(100); //attempt horiz control
|
||||
change_actor_stat(actor, STAT_DEMO_CAMERA);
|
||||
break;
|
||||
|
|
|
@ -9134,7 +9134,6 @@ int DoRail(DSWActor* actor)
|
|||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, &s_RailPuff[0][0], actor->sector(), actor->spr.pos, actor->spr.angle, 20);
|
||||
|
||||
actorNew->spr.xvel += (RandomRange(140)-RandomRange(140));
|
||||
actorNew->spr.yvel += (RandomRange(140)-RandomRange(140));
|
||||
actorNew->add_int_zvel( (RandomRange(140)-RandomRange(140)));
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
|
@ -11121,7 +11120,7 @@ int DoSerpRing(DSWActor* actor)
|
|||
}
|
||||
|
||||
// rotate the ring
|
||||
actor->user.slide_ang = NORM_ANGLE(actor->user.slide_ang + actor->spr.yvel);
|
||||
actor->user.slide_ang = NORM_ANGLE(actor->user.slide_ang + actor->spr.yint);
|
||||
|
||||
// rotate the heads
|
||||
if (actor->user.Flags & (SPR_BOUNCE))
|
||||
|
@ -11336,7 +11335,7 @@ int InitSerpRing(DSWActor* actor)
|
|||
actorNew->spr.shade = -20;
|
||||
actorNew->spr.xrepeat = 64;
|
||||
actorNew->spr.yrepeat = 64;
|
||||
actorNew->spr.yvel = 2*RINGMOVETICS;
|
||||
actorNew->spr.yint = 2*RINGMOVETICS;
|
||||
actorNew->set_int_zvel(Z(3));
|
||||
actorNew->spr.pal = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue