mirror of
https://github.com/DrBeef/Raze.git
synced 2025-04-01 21:50:51 +00:00
-got rid of some simple int_ppos wrappers.
This commit is contained in:
parent
76569ffd9f
commit
5455ce42c0
3 changed files with 13 additions and 12 deletions
|
@ -1763,7 +1763,7 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerCrawl)
|
||||
{
|
||||
actor->set_int_z(pp->int_ppos().Z + PLAYER_CRAWL_HEIGHT);
|
||||
actor->spr.pos.Z = pp->pos.Z + PLAYER_CRAWL_HEIGHTF;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
}
|
||||
#if 0
|
||||
|
@ -1775,7 +1775,7 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
#endif
|
||||
else if (pp->DoPlayerAction == DoPlayerWade)
|
||||
{
|
||||
actor->set_int_z(pp->int_ppos().Z + PLAYER_HEIGHT);
|
||||
actor->spr.pos.Z = pp->pos.Z + PLAYER_HEIGHTF;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
|
||||
if (pp->WadeDepth > Z(29))
|
||||
|
@ -1786,12 +1786,12 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
else if (pp->DoPlayerAction == DoPlayerDive)
|
||||
{
|
||||
// bobbing and sprite position taken care of in DoPlayerDive
|
||||
actor->set_int_z(pp->int_ppos().Z + Z(10));
|
||||
actor->spr.pos.Z = pp->pos.Z + 10;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerClimb)
|
||||
{
|
||||
actor->set_int_z(pp->int_ppos().Z + Z(17));
|
||||
actor->spr.pos.Z = pp->pos.Z + 17;
|
||||
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
}
|
||||
|
@ -1806,12 +1806,12 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerJump || pp->DoPlayerAction == DoPlayerFall || pp->DoPlayerAction == DoPlayerForceJump)
|
||||
{
|
||||
actor->set_int_z(pp->int_ppos().Z + PLAYER_HEIGHT);
|
||||
actor->spr.pos.Z = pp->pos.Z + PLAYER_HEIGHTF;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerTeleportPause)
|
||||
{
|
||||
actor->set_int_z(pp->int_ppos().Z + PLAYER_HEIGHT);
|
||||
actor->spr.pos.Z = pp->pos.Z + PLAYER_HEIGHTF;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
}
|
||||
else
|
||||
|
@ -3289,7 +3289,7 @@ void DoPlayerClimb(PLAYER* pp)
|
|||
}
|
||||
|
||||
// setsprite to players location
|
||||
plActor->set_int_z(pp->int_ppos().Z + PLAYER_HEIGHT);
|
||||
plActor->spr.pos.Z = pp->pos.Z + PLAYER_HEIGHTF;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
|
||||
if (!SyncInput())
|
||||
|
@ -6055,7 +6055,7 @@ void DoPlayerDeathCrumble(PLAYER* pp)
|
|||
}
|
||||
|
||||
DoPlayerDeathCheckKeys(pp);
|
||||
plActor->set_int_z(pp->int_ppos().Z + PLAYER_DEAD_HEAD_FLOORZ_OFFSET);
|
||||
plActor->spr.pos.Z = pp->pos.Z + PLAYER_DEAD_HEAD_FLOORZ_OFFSET;
|
||||
DoPlayerHeadDebris(pp);
|
||||
}
|
||||
|
||||
|
@ -6108,7 +6108,7 @@ void DoPlayerDeathExplode(PLAYER* pp)
|
|||
}
|
||||
|
||||
DoPlayerDeathCheckKeys(pp);
|
||||
plActor->set_int_z(pp->int_ppos().Z + PLAYER_DEAD_HEAD_FLOORZ_OFFSET);
|
||||
plActor->spr.pos.Z = pp->pos.Z + PLAYER_DEAD_HEAD_FLOORZ_OFFSET;
|
||||
DoPlayerHeadDebris(pp);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#define PLAYER_HEIGHT Z(58)
|
||||
constexpr double PLAYER_HEIGHTF = 58;
|
||||
#define PLAYER_CRAWL_HEIGHT Z(36)
|
||||
constexpr double PLAYER_CRAWL_HEIGHTF = 36;
|
||||
#define PLAYER_SWIM_HEIGHT Z(26)
|
||||
#define PLAYER_DIVE_HEIGHT Z(26)
|
||||
#define PLAYER_DIE_DOWN_HEIGHT Z(4)
|
||||
|
@ -109,7 +110,7 @@ constexpr double PLAYER_HEIGHTF = 58;
|
|||
|
||||
// dead head height - used in DeathFall
|
||||
#define PLAYER_DEATH_HEIGHT (Z(16))
|
||||
#define PLAYER_DEAD_HEAD_FLOORZ_OFFSET (Z(7))
|
||||
constexpr double PLAYER_DEAD_HEAD_FLOORZ_OFFSET = 7;
|
||||
|
||||
//#define PLAYER_NINJA_XREPEAT (56)
|
||||
//#define PLAYER_NINJA_YREPEAT (56)
|
||||
|
|
|
@ -34,12 +34,12 @@ BEGIN_SW_NS
|
|||
|
||||
inline int AngToSprite(DSWActor* actor, DSWActor* other)
|
||||
{
|
||||
return (getangle(actor->int_pos().X - other->int_pos().X, actor->int_pos().Y - other->int_pos().Y));
|
||||
return getangle(actor->spr.pos - other->spr.pos);
|
||||
}
|
||||
|
||||
inline int AngToPlayer(PLAYER* player, DSWActor* other)
|
||||
{
|
||||
return (getangle(player->int_ppos().X - other->int_pos().X, player->int_ppos().Y - other->int_pos().Y));
|
||||
return getangle(player->pos - other->spr.pos);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue