mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- SW: eighth batch of spr.pos wraps.
This commit is contained in:
parent
1101a8c9e8
commit
6a5384f39e
9 changed files with 33 additions and 33 deletions
|
@ -660,7 +660,7 @@ int DoActorJump(DSWActor* actor)
|
|||
}
|
||||
|
||||
// adjust height by jump speed
|
||||
actor->spr.pos.Z += actor->user.jump_speed * ACTORMOVETICS;
|
||||
actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS);
|
||||
|
||||
// if player gets to close the ceiling while jumping
|
||||
int minh = actor->user.hiz + (tileHeight(actor->spr.picnum) << 8);
|
||||
|
@ -715,7 +715,7 @@ int DoActorFall(DSWActor* actor)
|
|||
actor->user.jump_speed += actor->user.jump_grav * ACTORMOVETICS;
|
||||
|
||||
// adjust player height by jump speed
|
||||
actor->spr.pos.Z += actor->user.jump_speed * ACTORMOVETICS;
|
||||
actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS);
|
||||
|
||||
// Stick like glue when you hit the ground
|
||||
if (actor->spr.pos.Z > actor->user.loz)
|
||||
|
@ -826,7 +826,7 @@ int DoJump(DSWActor* actor)
|
|||
}
|
||||
|
||||
// adjust height by jump speed
|
||||
actor->spr.pos.Z += actor->user.jump_speed * ACTORMOVETICS;
|
||||
actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS);
|
||||
|
||||
// if player gets to close the ceiling while jumping
|
||||
int minh = actor->user.hiz + (tileHeight(actor->spr.picnum) << 8);
|
||||
|
@ -864,7 +864,7 @@ int DoFall(DSWActor* actor)
|
|||
actor->user.jump_speed += actor->user.jump_grav * ACTORMOVETICS;
|
||||
|
||||
// adjust player height by jump speed
|
||||
actor->spr.pos.Z += actor->user.jump_speed * ACTORMOVETICS;
|
||||
actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS);
|
||||
|
||||
// Stick like glue when you hit the ground
|
||||
if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist)
|
||||
|
|
|
@ -455,7 +455,7 @@ void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SET* action, PERSONALITY* perso
|
|||
|
||||
if (depth && labs(actor->spr.pos.Z - actor->user.loz) < Z(8))
|
||||
{
|
||||
actor->spr.pos.Z += Z(depth);
|
||||
actor->add_int_z(Z(depth));
|
||||
actor->user.loz = actor->spr.pos.Z;
|
||||
actor->backupz();
|
||||
}
|
||||
|
|
|
@ -265,18 +265,18 @@ int DoWallBloodDrip(DSWActor* actor)
|
|||
if (actor->spr.pos.Z > actor->user.pos.Y && actor->spr.pos.Z < actor->user.pos.Z)
|
||||
{
|
||||
actor->spr.zvel += 300;
|
||||
actor->spr.pos.Z += actor->spr.zvel;
|
||||
actor->add_int_z(actor->spr.zvel);
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->spr.zvel = (300+RandomRange(2300)) >> 1;
|
||||
actor->spr.pos.Z += actor->spr.zvel;
|
||||
actor->add_int_z(actor->spr.zvel);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->spr.zvel = (300+RandomRange(2300)) >> 1;
|
||||
actor->spr.pos.Z += actor->spr.zvel;
|
||||
actor->add_int_z(actor->spr.zvel);
|
||||
}
|
||||
|
||||
if (actor->spr.pos.Z >= actor->user.loz)
|
||||
|
@ -357,7 +357,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
if (actor->spr.xvel <= 2)
|
||||
{
|
||||
// special stuff for blood worm
|
||||
actor->spr.pos.Z += (actor->user.change.Z >> 1);
|
||||
actor->add_int_z((actor->user.change.Z >> 1));
|
||||
|
||||
getzsofslopeptr(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y, &cz, &fz);
|
||||
// pretend like we hit a sector
|
||||
|
@ -1838,7 +1838,7 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
|
|||
|
||||
int BloodSprayFall(DSWActor* actor)
|
||||
{
|
||||
actor->spr.pos.Z += 1500;
|
||||
actor->add_int_z(1500);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2185,13 +2185,13 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
|
||||
if (actor->user.PlayerP)
|
||||
{
|
||||
actorNew->spr.pos.Z += int(-actor->user.PlayerP->horizon.horiz.asbuildf() * HORIZ_MULT * (1. / 3.));
|
||||
actorNew->add_int_z(int(-actor->user.PlayerP->horizon.horiz.asbuildf() * HORIZ_MULT * (1. / 3.)));
|
||||
}
|
||||
|
||||
switch (actorNew->user.ID)
|
||||
{
|
||||
case UZI_SHELL:
|
||||
actorNew->spr.pos.Z -= Z(13);
|
||||
actorNew->add_int_z(-Z(13));
|
||||
|
||||
if (ShellNum == -3)
|
||||
{
|
||||
|
@ -2217,7 +2217,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 13;
|
||||
break;
|
||||
case SHOT_SHELL:
|
||||
actorNew->spr.pos.Z -= Z(13);
|
||||
actorNew->add_int_z(-Z(13));
|
||||
actorNew->spr.ang = actor->spr.ang;
|
||||
HelpMissileLateral(actorNew,2500);
|
||||
actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang+512);
|
||||
|
|
|
@ -5991,7 +5991,7 @@ void DoPlayerDeathDrown(PLAYER* pp)
|
|||
{
|
||||
pp->pos.Z += Z(2);
|
||||
if (MoveSkip2 == 0)
|
||||
actor->spr.pos.Z += Z(4);
|
||||
actor->add_int_z(Z(4));
|
||||
|
||||
// Stick like glue when you hit the ground
|
||||
if (pp->pos.Z > pp->loz - PLAYER_DEATH_HEIGHT)
|
||||
|
|
|
@ -238,7 +238,7 @@ int SetupSkull(DSWActor* actor)
|
|||
|
||||
actor->user.loz = actor->spr.pos.Z;
|
||||
// leave 8 pixels above the ground
|
||||
actor->spr.pos.Z += ActorSizeToTop(actor) - Z(3);;
|
||||
actor->add_int_z(ActorSizeToTop(actor) - Z(3));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -623,7 +623,7 @@ int SetupBetty(DSWActor* actor)
|
|||
|
||||
actor->user.loz = actor->spr.pos.Z;
|
||||
// leave 8 pixels above the ground
|
||||
actor->spr.pos.Z += ActorSizeToTop(actor) - Z(3);;
|
||||
actor->add_int_z(ActorSizeToTop(actor) - Z(3));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2427,7 +2427,7 @@ void SpriteSetup(void)
|
|||
if (SP_TAG9(actor) == 0)
|
||||
SP_TAG9(actor) = 10;
|
||||
|
||||
actor->spr.pos.Z += Z(30);
|
||||
actor->add_int_z(Z(30));
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -6548,12 +6548,12 @@ Collision move_ground_missile(DSWActor* actor, int xchange, int ychange, int cei
|
|||
{
|
||||
if (actor->user.z_tgt > actor->spr.pos.Z)
|
||||
{
|
||||
actor->spr.pos.Z += Z(30);
|
||||
actor->add_int_z(Z(30));
|
||||
return retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->spr.pos.Z -= Z(30);
|
||||
actor->add_int_z(-Z(30));
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3353,7 +3353,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
if (bos_z > actor->user.loz)
|
||||
{
|
||||
actor->user.pos.Y = (bos_z - actor->spr.pos.Z);
|
||||
actor->spr.pos.Z -= actor->user.pos.Y;
|
||||
actor->add_int_z(-actor->user.pos.Y);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3512,7 +3512,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
|
||||
ActorLeaveTrack(actor);
|
||||
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
||||
actor->spr.pos.Z += actor->user.pos.Y;
|
||||
actor->add_int_z(actor->user.pos.Y);
|
||||
|
||||
DoActorSetSpeed(actor, SLOW_SPEED);
|
||||
actor->user.ActorActionFunc = NinjaJumpActionFunc;
|
||||
|
|
|
@ -318,7 +318,7 @@ void MoveSpritesWithSector(sectortype* sect, int z_amt, bool type)
|
|||
}
|
||||
}
|
||||
|
||||
actor->spr.pos.Z += z_amt;
|
||||
actor->add_int_z(z_amt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3709,7 +3709,7 @@ AutoShrap:
|
|||
break;
|
||||
case Vomit1:
|
||||
shrap_bounce = false;
|
||||
actor->spr.pos.Z -= Z(4);
|
||||
actor->add_int_z(-Z(4));
|
||||
shrap_xsize = actor->user.pos.X = 12 + (RANDOM_P2(32<<8)>>8);
|
||||
shrap_ysize = actor->user.pos.Y = 12 + (RANDOM_P2(32<<8)>>8);
|
||||
actor->user.Counter = (RANDOM_P2(2048<<5)>>5);
|
||||
|
@ -3724,7 +3724,7 @@ AutoShrap:
|
|||
break;
|
||||
case EMP:
|
||||
shrap_bounce = false;
|
||||
actor->spr.pos.Z -= Z(4);
|
||||
actor->add_int_z(-Z(4));
|
||||
//actor->spr.ang = NORM_ANGLE(actor->spr.ang + 1024);
|
||||
shrap_xsize = actor->user.pos.X = 5 + (RANDOM_P2(4<<8)>>8);
|
||||
shrap_ysize = actor->user.pos.Y = 5 + (RANDOM_P2(4<<8)>>8);
|
||||
|
@ -3743,7 +3743,7 @@ AutoShrap:
|
|||
|
||||
if (shrap_rand_zamt)
|
||||
{
|
||||
actor->spr.pos.Z += Z(RandomRange(shrap_rand_zamt) - (shrap_rand_zamt/2));
|
||||
actor->add_int_z(Z(RandomRange(shrap_rand_zamt) - (shrap_rand_zamt/2)));
|
||||
}
|
||||
|
||||
actor->spr.pal = actor->user.spal = uint8_t(shrap_pal);
|
||||
|
@ -4447,13 +4447,13 @@ bool WeaponMoveHit(DSWActor* actor)
|
|||
|
||||
int DoUziSmoke(DSWActor* actor)
|
||||
{
|
||||
actor->spr.pos.Z -= 200; // !JIM! Make them float up
|
||||
actor->add_int_z(-200); // !JIM! Make them float up
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DoShotgunSmoke(DSWActor* actor)
|
||||
{
|
||||
actor->spr.pos.Z -= 200; // !JIM! Make them float up
|
||||
actor->add_int_z(-200); // !JIM! Make them float up
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -7382,7 +7382,7 @@ int DoStar(DSWActor* actor)
|
|||
SpawnBubble(actor);
|
||||
}
|
||||
|
||||
actor->spr.pos.Z += 128 * MISSILEMOVETICS;
|
||||
actor->add_int_z(128 * MISSILEMOVETICS);
|
||||
|
||||
DoActorZrange(actor);
|
||||
MissileWaterAdjust(actor);
|
||||
|
@ -14626,7 +14626,7 @@ int InitCoolgFire(DSWActor* actor)
|
|||
int DoCoolgDrip(DSWActor* actor)
|
||||
{
|
||||
actor->user.Counter += 220;
|
||||
actor->spr.pos.Z += actor->user.Counter;
|
||||
actor->add_int_z(actor->user.Counter);
|
||||
|
||||
if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist)
|
||||
{
|
||||
|
@ -17162,7 +17162,7 @@ int DoVehicleSmoke(DSWActor* actor)
|
|||
|
||||
int DoWaterSmoke(DSWActor* actor)
|
||||
{
|
||||
actor->spr.pos.Z -= actor->spr.zvel;
|
||||
actor->add_int_z(-actor->spr.zvel);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -17225,7 +17225,7 @@ int SpawnSmokePuff(DSWActor* actor)
|
|||
|
||||
int DoBubble(DSWActor* actor)
|
||||
{
|
||||
actor->spr.pos.Z -= actor->spr.zvel;
|
||||
actor->add_int_z(-actor->spr.zvel);
|
||||
actor->spr.zvel += 32;
|
||||
|
||||
if (actor->spr.zvel > 768)
|
||||
|
@ -17508,7 +17508,7 @@ int QueueFloorBlood(DSWActor* actor)
|
|||
spawnedActor->spr.clipdist = 0;
|
||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||
spawnedActor->spr.pos = actor->spr.pos;
|
||||
spawnedActor->spr.pos.Z += Z(1);
|
||||
spawnedActor->add_int_z(Z(1));
|
||||
spawnedActor->spr.ang = RANDOM_P2(2048); // Just make it any old angle
|
||||
spawnedActor->spr.shade -= 5; // Brighten it up just a bit
|
||||
|
||||
|
@ -17838,7 +17838,7 @@ int DoWallBlood(DSWActor* actor)
|
|||
if (actor->spr.yrepeat < 80)
|
||||
{
|
||||
actor->spr.yrepeat++;
|
||||
actor->spr.pos.Z += 128;
|
||||
actor->add_int_z(128);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue