mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- u->ret cleanup.
This commit is contained in:
parent
f8a74df87e
commit
057de89b9b
5 changed files with 10 additions and 21 deletions
|
@ -2734,10 +2734,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
}
|
||||
psp->cstat = save_cstat;
|
||||
|
||||
//SetupDriveCrush(pp, x, y);
|
||||
//DriveCrush(pp, x, y);
|
||||
|
||||
if (u->ret)
|
||||
if (u->coll.type != kHitNone)
|
||||
{
|
||||
int vel;
|
||||
|
||||
|
|
|
@ -1018,14 +1018,12 @@ int DoRipperMoveHang(DSWActor* actor)
|
|||
// if cannot move the sprite
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
{
|
||||
switch (TEST(u->ret, HIT_MASK))
|
||||
{
|
||||
case HIT_WALL:
|
||||
if (u->coll.type == kHitWall)
|
||||
{
|
||||
short hit_wall;
|
||||
short w, nw;
|
||||
|
||||
hit_wall = NORM_WALL(u->ret);
|
||||
hit_wall = u->coll.index;
|
||||
|
||||
NewStateGroup(actor, u->ActorActionSet->Special[1]);
|
||||
u->WaitTics = 2 + ((RANDOM_P2(4 << 8) >> 8) * 120);
|
||||
|
@ -1037,7 +1035,6 @@ int DoRipperMoveHang(DSWActor* actor)
|
|||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1019,18 +1019,16 @@ int DoRipper2MoveHang(DSWActor* actor)
|
|||
// if cannot move the sprite
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
{
|
||||
switch (TEST(u->ret, HIT_MASK))
|
||||
{
|
||||
case HIT_WALL:
|
||||
if (u->coll.type == kHitWall)
|
||||
{
|
||||
short hit_wall;
|
||||
short w, nw;
|
||||
|
||||
// Don't keep clinging and going ever higher!
|
||||
if (abs(sp->z - u->targetActor->s().z) > (4000<<4))
|
||||
break;
|
||||
return 0;
|
||||
|
||||
hit_wall = NORM_WALL(u->ret);
|
||||
hit_wall = u->coll.index;
|
||||
|
||||
NewStateGroup(actor, u->ActorActionSet->Special[1]);
|
||||
if (RANDOM_P2(1024<<8)>>8 > 500)
|
||||
|
@ -1045,7 +1043,6 @@ int DoRipper2MoveHang(DSWActor* actor)
|
|||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -3782,7 +3782,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
SetCollision(u, move_sprite(actor->GetSpriteIndex(), nx, ny, nz, u->ceiling_dist, u->floor_dist, 0, locktics));
|
||||
|
||||
|
||||
if (u->ret)
|
||||
if (u->coll.type != kHitNone)
|
||||
{
|
||||
if (!TEST(u->Flags, SPR_JUMPING|SPR_FALLING))
|
||||
ActorLeaveTrack(actor->GetSpriteIndex());
|
||||
|
|
|
@ -8018,7 +8018,7 @@ DoStar(DSWActor* actor)
|
|||
vel = ksqrt(SQ(u->xchange) + SQ(u->ychange));
|
||||
|
||||
if (vel < 500)
|
||||
break; // will be killed below - u->ret != 0
|
||||
break; // will be killed below - hittype != 0
|
||||
|
||||
// 32000 to 96000
|
||||
u->xchange = MulScale(u->xchange, 64000 + (RandomRange(64000) - 32000), 16);
|
||||
|
@ -8860,9 +8860,6 @@ DoGrenade(DSWActor* actor)
|
|||
if (TEST(u->Flags, SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
SpawnBubble(actor);
|
||||
|
||||
////DSPRINTF(ds, "dist %d, u->ret %d", FindDistance3D(u->xchange, u->ychange, u->zchange), u->ret);
|
||||
//MONO_PRINT(ds);
|
||||
|
||||
if (u->ret)
|
||||
{
|
||||
switch (TEST(u->ret, HIT_MASK))
|
||||
|
@ -19252,7 +19249,8 @@ bool TestDontStick(DSWActor* actor, short hit_wall)
|
|||
{
|
||||
ASSERT(actor != nullptr);
|
||||
USERp u = actor->u();
|
||||
hit_wall = NORM_WALL(u->ret);
|
||||
if (u->coll.type != kHitWall) return true; // ain't got a wall here.
|
||||
hit_wall = u->coll.index;
|
||||
}
|
||||
|
||||
wp = &wall[hit_wall];
|
||||
|
|
Loading…
Reference in a new issue