mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
This is just syntax and formatting
No functional changes. git-svn-id: https://svn.eduke32.com/eduke32@7776 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fa5ff547c8
commit
c96ec9d440
16 changed files with 185 additions and 183 deletions
|
@ -1032,7 +1032,7 @@ static void editorDraw2dSprite(int32_t j, int32_t posxe, int32_t posye, int32_t
|
|||
int32_t x1, y1, x2, y2;
|
||||
int col;
|
||||
|
||||
const spritetype *const spr = &sprite[j];
|
||||
auto const spr = &sprite[j];
|
||||
int16_t const blocking = (spr->cstat&1), hitblocking = (spr->cstat&256);
|
||||
int16_t const flooraligned = (spr->cstat&32), wallaligned = (spr->cstat&16);
|
||||
|
||||
|
|
|
@ -190,8 +190,8 @@ SKIPWALLCHECK:
|
|||
|
||||
while (otherSprite >= 0)
|
||||
{
|
||||
int const nextOther = nextspritestat[otherSprite];
|
||||
spritetype *const pOther = &sprite[otherSprite];
|
||||
int const nextOther = nextspritestat[otherSprite];
|
||||
auto const pOther = &sprite[otherSprite];
|
||||
|
||||
// DEFAULT, ZOMBIEACTOR, MISC
|
||||
if (stati == STAT_DEFAULT || stati == STAT_ZOMBIEACTOR || stati == STAT_MISC || AFLAMABLE(pOther->picnum))
|
||||
|
@ -305,7 +305,7 @@ SKIPWALLCHECK:
|
|||
{
|
||||
if (pOther->picnum == APLAYER)
|
||||
{
|
||||
DukePlayer_t *pPlayer = g_player[P_GetP((uspritetype *)pOther)].ps;
|
||||
auto pPlayer = g_player[P_GetP((uspritetype *)pOther)].ps;
|
||||
|
||||
if (pPlayer->newowner >= 0)
|
||||
G_ClearCameraView(pPlayer);
|
||||
|
@ -426,7 +426,7 @@ int A_GetClipdist(int spriteNum, int clipDist)
|
|||
{
|
||||
if (clipDist < 0)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const isEnemy = A_CheckEnemySprite(pSprite);
|
||||
|
||||
if (A_CheckSpriteFlags(spriteNum, SFLAG_REALCLIPDIST))
|
||||
|
@ -458,7 +458,7 @@ int A_GetClipdist(int spriteNum, int clipDist)
|
|||
|
||||
int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uint32_t clipType, int32_t clipDist)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const isEnemy = A_CheckEnemySprite(pSprite);
|
||||
vec2_t const oldPos = pSprite->pos_as_vec2;
|
||||
|
||||
|
@ -690,7 +690,7 @@ void A_AddToDeleteQueue(int spriteNum)
|
|||
|
||||
void A_SpawnMultiple(int spriteNum, int tileNum, int spawnCnt)
|
||||
{
|
||||
spritetype *pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
|
||||
for (; spawnCnt>0; spawnCnt--)
|
||||
{
|
||||
|
@ -811,11 +811,11 @@ void A_MoveSector(int spriteNum)
|
|||
{
|
||||
// T1,T2 and T3 are used for all the sector moving stuff!!!
|
||||
|
||||
int32_t playerDist;
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int const playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
int const rotateAngle = VM_OnEvent(EVENT_MOVESECTOR, spriteNum, playerNum, playerDist, T3(spriteNum));
|
||||
int originIdx = T2(spriteNum);
|
||||
int32_t playerDist;
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
int const rotateAngle = VM_OnEvent(EVENT_MOVESECTOR, spriteNum, playerNum, playerDist, T3(spriteNum));
|
||||
int originIdx = T2(spriteNum);
|
||||
|
||||
pSprite->x += (pSprite->xvel * (sintable[(pSprite->ang + 512) & 2047])) >> 14;
|
||||
pSprite->y += (pSprite->xvel * (sintable[pSprite->ang & 2047])) >> 14;
|
||||
|
@ -849,7 +849,7 @@ void A_MoveSector(int spriteNum)
|
|||
void G_AddGameLight(int lightRadius, int spriteNum, int zOffset, int lightRange, int lightColor, int lightPrio)
|
||||
{
|
||||
#ifdef POLYMER
|
||||
spritetype *s = &sprite[spriteNum];
|
||||
auto const s = &sprite[spriteNum];
|
||||
|
||||
if (videoGetRenderMode() != REND_POLYMER || pr_lighting != 1)
|
||||
return;
|
||||
|
@ -955,11 +955,11 @@ ACTOR_STATIC void G_MoveZombieActors(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
int32_t playerDist;
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int const playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
int32_t playerDist;
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (sprite[pPlayer->i].extra > 0)
|
||||
{
|
||||
|
@ -1083,8 +1083,8 @@ static FORCE_INLINE void P_Nudge(int playerNum, int spriteNum, int shiftLeft)
|
|||
|
||||
int A_IncurDamage(int const spriteNum)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
actor_t *const pActor = &actor[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
auto const pActor = &actor[spriteNum];
|
||||
|
||||
// dmg->picnum check: safety, since it might have been set to <0 from CON.
|
||||
if (pActor->extra < 0 || pSprite->extra < 0 || pActor->picnum < 0)
|
||||
|
@ -1208,10 +1208,10 @@ void A_MoveDummyPlayers(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const playerNum = P_Get(OW(spriteNum));
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
int const playerSectnum = pPlayer->cursectnum;
|
||||
int const playerNum = P_Get(OW(spriteNum));
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
int const playerSectnum = pPlayer->cursectnum;
|
||||
|
||||
if (pPlayer->on_crane >= 0 || (playerSectnum >= 0 && sector[playerSectnum].lotag != ST_1_ABOVE_WATER) || sprite[pPlayer->i].extra <= 0)
|
||||
{
|
||||
|
@ -1256,9 +1256,9 @@ ACTOR_STATIC void G_MovePlayers(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
DukePlayer_t *const pPlayer = g_player[P_GetP(pSprite)].ps;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
auto const pPlayer = g_player[P_GetP(pSprite)].ps;
|
||||
|
||||
if (pSprite->owner >= 0)
|
||||
{
|
||||
|
@ -1418,8 +1418,8 @@ ACTOR_STATIC void G_MoveFX(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
|
||||
switch (DYNAMICTILEMAP(pSprite->picnum))
|
||||
{
|
||||
|
@ -1436,8 +1436,8 @@ ACTOR_STATIC void G_MoveFX(void)
|
|||
|
||||
case MUSICANDSFX__STATIC:
|
||||
{
|
||||
int32_t const spriteHitag = (uint16_t)pSprite->hitag;
|
||||
DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
int32_t const spriteHitag = (uint16_t)pSprite->hitag;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
|
||||
if (T2(spriteNum) != ud.config.SoundToggle)
|
||||
{
|
||||
|
@ -1554,9 +1554,9 @@ ACTOR_STATIC void G_MoveFallers(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int const sectNum = pSprite->sectnum;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const sectNum = pSprite->sectnum;
|
||||
|
||||
if (T1(spriteNum) == 0)
|
||||
{
|
||||
|
@ -1651,10 +1651,10 @@ ACTOR_STATIC void G_MoveStandables(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
const int nextSprite = nextspritestat[spriteNum];
|
||||
int32_t *const pData = &actor[spriteNum].t_data[0];
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
const int sectNum = pSprite->sectnum;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
auto const pData = &actor[spriteNum].t_data[0];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const sectNum = pSprite->sectnum;
|
||||
|
||||
if (sectNum < 0)
|
||||
DELETE_SPRITE_AND_CONTINUE(spriteNum);
|
||||
|
@ -1838,7 +1838,7 @@ ACTOR_STATIC void G_MoveStandables(void)
|
|||
}
|
||||
else if (pSprite->owner == -2)
|
||||
{
|
||||
DukePlayer_t *const ps = g_player[p].ps;
|
||||
auto const ps = g_player[p].ps;
|
||||
|
||||
ps->opos.x = ps->pos.x = pSprite->x-(sintable[(fix16_to_int(ps->q16ang)+512)&2047]>>6);
|
||||
ps->opos.y = ps->pos.y = pSprite->y-(sintable[fix16_to_int(ps->q16ang)&2047]>>6);
|
||||
|
@ -2424,9 +2424,9 @@ DETONATE:
|
|||
DELETE_SPRITE_AND_CONTINUE(spriteNum);
|
||||
|
||||
{
|
||||
int32_t playerDist;
|
||||
int const p = A_FindPlayer(pSprite, &playerDist);
|
||||
const DukePlayer_t *const ps = g_player[p].ps;
|
||||
int32_t playerDist;
|
||||
int const p = A_FindPlayer(pSprite, &playerDist);
|
||||
auto const ps = g_player[p].ps;
|
||||
|
||||
if (dist(&sprite[ps->i], pSprite) < VIEWSCREEN_ACTIVE_DISTANCE)
|
||||
{
|
||||
|
@ -2665,7 +2665,7 @@ DETONATE:
|
|||
|
||||
ACTOR_STATIC void A_DoProjectileBounce(int const spriteNum)
|
||||
{
|
||||
spritetype * const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int32_t const hitSectnum = pSprite->sectnum;
|
||||
int const firstWall = sector[hitSectnum].wallptr;
|
||||
int const secondWall = wall[firstWall].point2;
|
||||
|
@ -2718,7 +2718,7 @@ ACTOR_STATIC void P_HandleBeingSpitOn(DukePlayer_t * const ps)
|
|||
|
||||
static void A_DoProjectileEffects(int spriteNum, const vec3_t *davect, int radiusDamage)
|
||||
{
|
||||
projectile_t const * const pProj = &SpriteProjectile[spriteNum];
|
||||
auto const pProj = &SpriteProjectile[spriteNum];
|
||||
|
||||
if (pProj->spawns >= 0)
|
||||
{
|
||||
|
@ -2739,7 +2739,7 @@ static void A_DoProjectileEffects(int spriteNum, const vec3_t *davect, int radiu
|
|||
if (!radiusDamage)
|
||||
return;
|
||||
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
pSprite->extra = Proj_GetDamage(pProj);
|
||||
int const dmg = pSprite->extra;
|
||||
A_RadiusDamage(spriteNum, pProj->hitradius, dmg >> 2, dmg >> 1, dmg - (dmg >> 2), dmg);
|
||||
|
@ -2810,10 +2810,11 @@ ACTOR_STATIC void Proj_MoveCustom(int const spriteNum)
|
|||
{
|
||||
int projectileMoved = SpriteProjectile[spriteNum].workslike & PROJECTILE_MOVED;
|
||||
SpriteProjectile[spriteNum].workslike |= PROJECTILE_MOVED;
|
||||
const projectile_t *const pProj = &SpriteProjectile[spriteNum];
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
vec3_t davect;
|
||||
int otherSprite = 0;
|
||||
|
||||
auto const pProj = &SpriteProjectile[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
vec3_t davect;
|
||||
int otherSprite = 0;
|
||||
|
||||
switch (pProj->workslike & PROJECTILE_TYPE_MASK)
|
||||
{
|
||||
|
@ -3071,8 +3072,8 @@ ACTOR_STATIC void G_MoveWeapons(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
|
||||
if (pSprite->sectnum < 0)
|
||||
DELETE_SPRITE_AND_CONTINUE(spriteNum);
|
||||
|
@ -3491,8 +3492,8 @@ ACTOR_STATIC void G_MoveTransports(void)
|
|||
case STAT_PLAYER:
|
||||
if (sprite[sectSprite].owner != -1)
|
||||
{
|
||||
int const playerNum = P_Get(sectSprite);
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
int const playerNum = P_Get(sectSprite);
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
pPlayer->on_warping_sector = 1;
|
||||
|
||||
|
@ -3780,10 +3781,10 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int const sectNum = pSprite->sectnum;
|
||||
int32_t *const pData = actor[spriteNum].t_data;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const sectNum = pSprite->sectnum;
|
||||
auto const pData = actor[spriteNum].t_data;
|
||||
|
||||
int switchPic;
|
||||
|
||||
|
@ -3951,9 +3952,9 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
int32_t playerDist;
|
||||
int const playerNum = A_FindPlayer(pSprite,&playerDist);
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
int32_t playerDist;
|
||||
int const playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
// I'm 50/50 on this being either a typo or a stupid hack
|
||||
if (playerDist < 1596)
|
||||
|
@ -4294,7 +4295,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
|
||||
int32_t playerDist;
|
||||
int const playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (playerDist > 20480)
|
||||
{
|
||||
|
@ -4950,9 +4951,9 @@ DETONATEB:
|
|||
goto next_sprite;
|
||||
}
|
||||
|
||||
int32_t playerDist;
|
||||
int playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
int32_t playerDist;
|
||||
int playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (++pData[2] == 4)
|
||||
pData[2] = 0;
|
||||
|
@ -5096,12 +5097,12 @@ ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5
|
|||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
int32_t playerDist;
|
||||
int32_t *const pData = actor[spriteNum].t_data;
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int sectNum = pSprite->sectnum; // XXX: not const
|
||||
int switchPic;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
int32_t playerDist;
|
||||
auto const pData = actor[spriteNum].t_data;
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int sectNum = pSprite->sectnum; // XXX: not const
|
||||
int switchPic;
|
||||
|
||||
if (sectNum < 0 || pSprite->xrepeat == 0)
|
||||
DELETE_SPRITE_AND_CONTINUE(spriteNum);
|
||||
|
@ -5468,9 +5469,10 @@ ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5
|
|||
|
||||
int32_t playerDist;
|
||||
int const playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
pSprite->z = actor[spriteNum].floorz - 1;
|
||||
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
pSprite->z = actor[spriteNum].floorz - 1;
|
||||
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pData[2] < 32)
|
||||
{
|
||||
|
@ -5663,9 +5665,9 @@ next_sprite:
|
|||
// i: SE spritenum
|
||||
static void HandleSE31(int spriteNum, int setFloorZ, int spriteZ, int SEdir, int zDifference)
|
||||
{
|
||||
const spritetype *pSprite = &sprite[spriteNum];
|
||||
sectortype *const pSector = §or[sprite[spriteNum].sectnum];
|
||||
int32_t *const pData = actor[spriteNum].t_data;
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
auto const pSector = §or[sprite[spriteNum].sectnum];
|
||||
auto const pData = actor[spriteNum].t_data;
|
||||
|
||||
if (klabs(pSector->floorz - spriteZ) < SP(spriteNum))
|
||||
{
|
||||
|
@ -5718,7 +5720,7 @@ static void MaybeTrainKillPlayer(const spritetype *pSprite, int const setOPos)
|
|||
{
|
||||
for (bssize_t TRAVERSE_CONNECT(playerNum))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (sprite[pPlayer->i].extra > 0)
|
||||
{
|
||||
|
@ -5787,11 +5789,11 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
#endif
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
int32_t playerDist;
|
||||
int playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int32_t playerDist;
|
||||
int playerNum = A_FindPlayer(pSprite, &playerDist);
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (VM_OnEvent(EVENT_MOVEEFFECTORS, spriteNum, playerNum, playerDist, 0))
|
||||
{
|
||||
|
@ -5898,7 +5900,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
{
|
||||
for (TRAVERSE_CONNECT(playerNum))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pPlayer->cursectnum == pSprite->sectnum && pPlayer->on_ground == 1)
|
||||
{
|
||||
|
@ -6095,7 +6097,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
for (TRAVERSE_CONNECT(playerNum))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
// might happen when squished into void space
|
||||
if (pPlayer->cursectnum < 0)
|
||||
|
@ -6276,7 +6278,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
for (int TRAVERSE_CONNECT(playerNum))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (sprite[pPlayer->i].sectnum == pSprite->sectnum)
|
||||
{
|
||||
|
@ -6376,7 +6378,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
for (TRAVERSE_CONNECT(playerNum))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pPlayer->cursectnum == pSprite->sectnum && pPlayer->on_ground)
|
||||
{
|
||||
|
@ -6973,8 +6975,8 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
{
|
||||
if (sprite[j].statnum == STAT_PLAYER && sprite[j].owner >= 0)
|
||||
{
|
||||
int const warpPlayer = P_Get(j);
|
||||
DukePlayer_t *const pPlayer = g_player[warpPlayer].ps;
|
||||
int const warpPlayer = P_Get(j);
|
||||
auto const pPlayer = g_player[warpPlayer].ps;
|
||||
|
||||
if (numplayers < 2 && !g_netServer)
|
||||
pPlayer->opos.z = pPlayer->pos.z;
|
||||
|
@ -7032,8 +7034,8 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
{
|
||||
if (sprite[k].statnum == STAT_PLAYER && sprite[k].owner >= 0)
|
||||
{
|
||||
int const warpPlayer = P_Get(k);
|
||||
DukePlayer_t *const pPlayer = g_player[warpPlayer].ps;
|
||||
int const warpPlayer = P_Get(k);
|
||||
auto const pPlayer = g_player[warpPlayer].ps;
|
||||
|
||||
pPlayer->pos.x += sprite[j].x - pSprite->x;
|
||||
pPlayer->pos.y += sprite[j].y - pSprite->y;
|
||||
|
@ -7289,7 +7291,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
for (bssize_t TRAVERSE_CONNECT(playerNum))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pPlayer->cursectnum == pSprite->sectnum && pPlayer->on_ground)
|
||||
{
|
||||
|
@ -7425,7 +7427,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
for (bssize_t TRAVERSE_CONNECT(playerNum))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pPlayer->cursectnum == pSprite->sectnum && pPlayer->on_ground)
|
||||
{
|
||||
|
@ -7535,7 +7537,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
for (TRAVERSE_CONNECT(p))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[p].ps;
|
||||
auto const pPlayer = g_player[p].ps;
|
||||
|
||||
if (pSprite->sectnum == sprite[pPlayer->i].sectnum && pPlayer->on_ground)
|
||||
{
|
||||
|
@ -7650,8 +7652,8 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
{
|
||||
actor[spriteNum].tempang = pSprite->ang;
|
||||
|
||||
int const p = A_FindPlayer(pSprite,&x);
|
||||
DukePlayer_t * const ps = g_player[p].ps;
|
||||
int const p = A_FindPlayer(pSprite, &x);
|
||||
auto const ps = g_player[p].ps;
|
||||
|
||||
if (sprite[ps->i].extra > 0 && myconnectindex == screenpeek)
|
||||
{
|
||||
|
@ -7983,7 +7985,7 @@ next_sprite:
|
|||
//Sloped sin-wave floors!
|
||||
for (SPRITES_OF(STAT_EFFECTOR, spriteNum))
|
||||
{
|
||||
const spritetype *s = &sprite[spriteNum];
|
||||
auto const s = &sprite[spriteNum];
|
||||
|
||||
if (s->lotag == SE_29_WAVES)
|
||||
{
|
||||
|
@ -7991,7 +7993,7 @@ next_sprite:
|
|||
|
||||
if (sc->wallnum == 4)
|
||||
{
|
||||
walltype *const pWall = &wall[sc->wallptr+2];
|
||||
auto const pWall = &wall[sc->wallptr+2];
|
||||
if (pWall->nextsector >= 0)
|
||||
alignflorslope(s->sectnum, pWall->x,pWall->y, sector[pWall->nextsector].floorz);
|
||||
}
|
||||
|
@ -8177,7 +8179,7 @@ static void G_DoEffectorLights(void) // STATNUM 14
|
|||
#ifdef POLYMER
|
||||
static void A_DoLight(int spriteNum)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int savedFires = 0;
|
||||
|
||||
if (((sector[pSprite->sectnum].floorz - sector[pSprite->sectnum].ceilingz) < 16) || pSprite->z > sector[pSprite->sectnum].floorz || pSprite->z > actor[spriteNum].floorz ||
|
||||
|
|
|
@ -4177,7 +4177,7 @@ static void mouseaction_movesprites(int32_t *sumxvect, int32_t *sumyvect, int32_
|
|||
{
|
||||
int32_t xvect,yvect, daxvect,dayvect, ii, spi;
|
||||
int32_t units, gridlock = (eitherCTRL && grid > 0 && grid < 9);
|
||||
spritetype *sp = &sprite[searchwall];
|
||||
auto const sp = &sprite[searchwall];
|
||||
int16_t tsect = sp->sectnum;
|
||||
vec3_t tvec = { sp->x, sp->y, sp->z };
|
||||
|
||||
|
@ -7060,7 +7060,7 @@ paste_ceiling_or_floor:
|
|||
// returns: whether sprite is out of grid
|
||||
static int32_t jump_to_sprite(int32_t spritenum)
|
||||
{
|
||||
const spritetype *spr = &sprite[spritenum];
|
||||
auto const spr = &sprite[spritenum];
|
||||
|
||||
if (pos.x >= -editorgridextent && pos.x <= editorgridextent &&
|
||||
pos.y >= -editorgridextent && pos.y <= editorgridextent)
|
||||
|
|
|
@ -224,7 +224,7 @@ static int8_t cheatbuf[MAXCHEATLEN];
|
|||
|
||||
void G_DoCheats(void)
|
||||
{
|
||||
DukePlayer_t * const pPlayer = g_player[myconnectindex].ps;
|
||||
auto const pPlayer = g_player[myconnectindex].ps;
|
||||
int consoleCheat = 0;
|
||||
int cheatNum;
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ static void M32_drawdebug(void)
|
|||
|
||||
static int32_t G_DoThirdPerson(const DukePlayer_t *pp, vec3_t *vect, int16_t *vsectnum, int16_t ang, int16_t horiz)
|
||||
{
|
||||
spritetype *sp = &sprite[pp->i];
|
||||
auto const sp = &sprite[pp->i];
|
||||
int32_t i, hx, hy;
|
||||
int32_t bakcstat = sp->cstat;
|
||||
hitdata_t hit;
|
||||
|
@ -419,11 +419,11 @@ char ror_protectedsectors[MAXSECTORS];
|
|||
static int32_t drawing_ror = 0;
|
||||
static int32_t ror_sprite = -1;
|
||||
|
||||
static void G_OROR_DupeSprites(const spritetype *sp)
|
||||
static void G_OROR_DupeSprites(spritetype const *sp)
|
||||
{
|
||||
// dupe the sprites touching the portal to the other sector
|
||||
int32_t k;
|
||||
const spritetype *refsp;
|
||||
spritetype const *refsp;
|
||||
|
||||
if ((unsigned)sp->yvel >= (unsigned)g_mostConcurrentPlayers)
|
||||
return;
|
||||
|
@ -462,7 +462,7 @@ static void G_SE40(int32_t smoothratio)
|
|||
int32_t x, y, z;
|
||||
int16_t sect;
|
||||
int32_t level = 0;
|
||||
const spritetype *const sp = &sprite[ror_sprite];
|
||||
auto const sp = &sprite[ror_sprite];
|
||||
const int32_t sprite2 = sp->yvel;
|
||||
|
||||
if ((unsigned)sprite2 >= MAXSPRITES)
|
||||
|
@ -745,7 +745,7 @@ static void G_ReadGLFrame(void)
|
|||
|
||||
void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
int const viewingRange = viewingrange;
|
||||
|
||||
|
@ -788,7 +788,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
|||
|
||||
if (ud.camerasprite >= 0)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[ud.camerasprite];
|
||||
auto const pSprite = &sprite[ud.camerasprite];
|
||||
|
||||
pSprite->yvel = clamp(TrackerCast(pSprite->yvel), -100, 300);
|
||||
|
||||
|
@ -1869,8 +1869,8 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
|
||||
if (sprite[spriteNum].picnum == APLAYER)
|
||||
{
|
||||
int const playerNum = P_Get(spriteNum);
|
||||
const DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
int const playerNum = P_Get(spriteNum);
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
shellAng = fix16_to_int(pPlayer->q16ang) - (krand() & 63) + 8; // Fine tune
|
||||
|
||||
|
@ -3609,7 +3609,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
{
|
||||
auto const t = &tsprite[j];
|
||||
const int32_t i = t->owner;
|
||||
const spritetype *const s = &sprite[i];
|
||||
auto const s = &sprite[i];
|
||||
|
||||
switch (DYNAMICTILEMAP(s->picnum))
|
||||
{
|
||||
|
@ -3749,7 +3749,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
|
||||
Bassert(i >= 0);
|
||||
|
||||
const DukePlayer_t *const ps = (pSprite->statnum != STAT_ACTOR && pSprite->picnum == APLAYER && pSprite->owner >= 0) ? g_player[P_GetP(pSprite)].ps : NULL;
|
||||
auto const ps = (pSprite->statnum != STAT_ACTOR && pSprite->picnum == APLAYER && pSprite->owner >= 0) ? g_player[P_GetP(pSprite)].ps : NULL;
|
||||
if (ps && ps->newowner == -1)
|
||||
{
|
||||
t->x -= mulscale16(65536-smoothratio,ps->pos.x-ps->opos.x);
|
||||
|
@ -3821,7 +3821,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
int16_t const sqb = getangle(sprite[pSprite->owner].x - t->x, sprite[pSprite->owner].y - t->y);
|
||||
|
||||
if (klabs(G_GetAngleDelta(sqa,sqb)) > 512)
|
||||
if (ldist(&sprite[pSprite->owner],(const spritetype *)t) < ldist(&sprite[g_player[screenpeek].ps->i],&sprite[pSprite->owner]))
|
||||
if (ldist(&sprite[pSprite->owner],(spritetype const *)t) < ldist(&sprite[g_player[screenpeek].ps->i],&sprite[pSprite->owner]))
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
}
|
||||
continue;
|
||||
|
@ -3868,7 +3868,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
#if 0
|
||||
if (spritesortcnt < maxspritesonscreen)
|
||||
{
|
||||
spritetype *const newt = &tsprite[spritesortcnt++];
|
||||
auto const newt = &tsprite[spritesortcnt++];
|
||||
|
||||
Bmemcpy(newt, t, sizeof(spritetype));
|
||||
|
||||
|
@ -6010,7 +6010,7 @@ static void G_Startup(void)
|
|||
|
||||
static void P_SetupMiscInputSettings(void)
|
||||
{
|
||||
DukePlayer_t *ps = g_player[myconnectindex].ps;
|
||||
auto ps = g_player[myconnectindex].ps;
|
||||
|
||||
ps->aim_mode = ud.mouseaiming;
|
||||
ps->auto_aim = ud.config.AutoAim;
|
||||
|
@ -6927,7 +6927,7 @@ int G_DoMoveThings(void)
|
|||
)
|
||||
{
|
||||
hitdata_t hitData;
|
||||
DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
|
||||
for (bssize_t TRAVERSE_CONNECT(i))
|
||||
if (g_player[i].ps->holoduke_on != -1)
|
||||
|
|
|
@ -6737,16 +6737,16 @@ void VM_DrawTileGeneric(int32_t x, int32_t y, int32_t zoom, int32_t tilenum, int
|
|||
#if !defined LUNATIC
|
||||
void VM_DrawTile(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t orientation)
|
||||
{
|
||||
DukePlayer_t *pPlayer = g_player[screenpeek].ps;
|
||||
int32_t tilePal = pPlayer->cursectnum >= 0 ? sector[pPlayer->cursectnum].floorpal : 0;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
int32_t tilePal = pPlayer->cursectnum >= 0 ? sector[pPlayer->cursectnum].floorpal : 0;
|
||||
|
||||
VM_DrawTileGeneric(x, y, 65536, tilenum, shade, orientation, tilePal);
|
||||
}
|
||||
|
||||
void VM_DrawTileSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int32_t orientation)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
int32_t tilePal = pPlayer->cursectnum >= 0 ? sector[pPlayer->cursectnum].floorpal : 0;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
int32_t tilePal = pPlayer->cursectnum >= 0 ? sector[pPlayer->cursectnum].floorpal : 0;
|
||||
|
||||
VM_DrawTileGeneric(x, y, 32768, tilenum, shade, orientation, tilePal);
|
||||
}
|
||||
|
|
|
@ -1216,7 +1216,7 @@ static void Gv_AddSystemVars(void)
|
|||
#ifdef LUNATIC
|
||||
for (int i=0; i<MAXPLAYERS; i++)
|
||||
{
|
||||
DukePlayer_t *ps = g_player[i].ps;
|
||||
auto ps = g_player[i].ps;
|
||||
|
||||
ps->pipebombControl = NAM_WW2GI ? PIPEBOMB_TIMER : PIPEBOMB_REMOTE;
|
||||
ps->pipebombLifetime = NAM_GRENADE_LIFETIME;
|
||||
|
|
|
@ -481,8 +481,8 @@ void create_map_snapshot(void)
|
|||
if (!try_match_with_prev(2, Numsprites, temphash))
|
||||
{
|
||||
int32_t i = 0;
|
||||
spritetype *const tspri = (spritetype *)Xmalloc(Numsprites*sizeof(spritetype) + 4);
|
||||
spritetype *spri = tspri;
|
||||
auto const tspri = (spritetype *)Xmalloc(Numsprites*sizeof(spritetype) + 4);
|
||||
auto spri = tspri;
|
||||
|
||||
for (bssize_t j=0; j<MAXSPRITES && i < Numsprites; j++)
|
||||
if (sprite[j].statnum != MAXSTATUS)
|
||||
|
|
|
@ -1843,7 +1843,7 @@ They are separate for purposes of organization.
|
|||
static void Menu_Pre(MenuID_t cm)
|
||||
{
|
||||
int32_t i;
|
||||
DukePlayer_t *ps = g_player[myconnectindex].ps;
|
||||
auto ps = g_player[myconnectindex].ps;
|
||||
|
||||
switch (cm)
|
||||
{
|
||||
|
@ -3072,7 +3072,7 @@ static void Menu_EntryLinkActivate(MenuEntry_t *entry)
|
|||
static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
||||
{
|
||||
int32_t x;
|
||||
DukePlayer_t *ps = g_player[myconnectindex].ps;
|
||||
auto ps = g_player[myconnectindex].ps;
|
||||
|
||||
if (entry == &ME_GAMESETUP_DEMOREC)
|
||||
{
|
||||
|
|
|
@ -295,7 +295,7 @@ static int A_FindTargetSprite(const spritetype *pSprite, int projAng, int projec
|
|||
|
||||
if (pSprite->picnum == APLAYER)
|
||||
{
|
||||
const DukePlayer_t *const ps = g_player[P_GetP(pSprite)].ps;
|
||||
auto const ps = g_player[P_GetP(pSprite)].ps;
|
||||
onScreen = (klabs(scale(SZ(spriteNum)-pSprite->z,10,spriteDist)-fix16_to_int(ps->q16horiz+ps->q16horizoff-F16(100))) < 100);
|
||||
}
|
||||
|
||||
|
@ -472,7 +472,7 @@ static void P_PreFireHitscan(int spriteNum, int playerNum, int projecTile, vec3_
|
|||
int zRange = 256;
|
||||
int aimSprite = GetAutoAimAng(spriteNum, playerNum, projecTile, 5 << 8, 0 + 1, srcVect, 256, zvel, shootAng);
|
||||
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
#ifdef LUNATIC
|
||||
pPlayer->angrange = angRange;
|
||||
|
@ -534,9 +534,9 @@ notarget:
|
|||
// Hitscan weapon fired from actor (sprite s);
|
||||
static void A_PreFireHitscan(const spritetype *pSprite, vec3_t * const srcVect, int32_t * const zvel, int * const shootAng, int const doSpread)
|
||||
{
|
||||
int const playerNum = A_FindPlayer(pSprite, NULL);
|
||||
const DukePlayer_t *pPlayer = g_player[playerNum].ps;
|
||||
int const playerDist = safeldist(pPlayer->i, pSprite);
|
||||
int const playerNum = A_FindPlayer(pSprite, NULL);
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
int const playerDist = safeldist(pPlayer->i, pSprite);
|
||||
|
||||
*zvel = tabledivide32_noinline((pPlayer->pos.z - srcVect->z) << 8, playerDist);
|
||||
|
||||
|
@ -550,7 +550,7 @@ static void A_PreFireHitscan(const spritetype *pSprite, vec3_t * const srcVect,
|
|||
|
||||
static int Proj_DoHitscan(int spriteNum, int32_t const cstatmask, const vec3_t * const srcVect, int zvel, int const shootAng, hitdata_t * const hitData)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
|
||||
pSprite->cstat &= ~cstatmask;
|
||||
zvel = A_GetShootZvel(zvel);
|
||||
|
@ -563,7 +563,7 @@ static int Proj_DoHitscan(int spriteNum, int32_t const cstatmask, const vec3_t *
|
|||
static void Proj_DoRandDecalSize(int const spriteNum, int const projecTile)
|
||||
{
|
||||
const projectile_t *const proj = Proj_GetProjectile(projecTile);
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
|
||||
if (proj->workslike & PROJECTILE_RANDDECALSIZE)
|
||||
pSprite->xrepeat = pSprite->yrepeat = clamp((krand() & proj->xrepeat), pSprite->yrepeat, pSprite->xrepeat);
|
||||
|
@ -812,7 +812,7 @@ static void Proj_HandleKnee(hitdata_t *const hitData, int const spriteNum, int c
|
|||
const projectile_t *const proj, int const inserttile, int const randomDamage, int const spawnTile,
|
||||
int const soundNum)
|
||||
{
|
||||
const DukePlayer_t *const pPlayer = playerNum >= 0 ? g_player[playerNum].ps : NULL;
|
||||
auto const pPlayer = playerNum >= 0 ? g_player[playerNum].ps : NULL;
|
||||
|
||||
int kneeSprite = A_InsertSprite(hitData->sect,hitData->pos.x,hitData->pos.y,hitData->pos.z,
|
||||
inserttile,-15,0,0,shootAng,32,0,spriteNum,4);
|
||||
|
@ -869,9 +869,9 @@ static int A_ShootCustom(int const spriteNum, int const projecTile, int shootAng
|
|||
/* Custom projectiles */
|
||||
hitdata_t hitData;
|
||||
projectile_t *const pProj = Proj_GetProjectile(projecTile);
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const playerNum = (pSprite->picnum == APLAYER) ? P_GetP(pSprite) : -1;
|
||||
DukePlayer_t *const pPlayer = playerNum >= 0 ? g_player[playerNum].ps : NULL;
|
||||
auto const pPlayer = playerNum >= 0 ? g_player[playerNum].ps : NULL;
|
||||
|
||||
#ifdef POLYMER
|
||||
if (videoGetRenderMode() == REND_POLYMER && pProj->flashcolor)
|
||||
|
@ -1365,7 +1365,7 @@ static int32_t A_ShootHardcoded(int spriteNum, int projecTile, int shootAng, vec
|
|||
int const returnSprite = A_InsertSprite(spriteSectnum, startPos.x + (sintable[(348 + shootAng + 512) & 2047] / 448),
|
||||
startPos.y + (sintable[(shootAng + 348) & 2047] / 448), startPos.z - (1 << 8),
|
||||
projecTile, 0, 14, 14, shootAng, vel, Zvel, spriteNum, 4);
|
||||
spritetype *const pReturn = &sprite[returnSprite];
|
||||
auto const pReturn = &sprite[returnSprite];
|
||||
|
||||
pReturn->extra += (krand() & 7);
|
||||
if (projecTile != FREEZEBLAST)
|
||||
|
@ -1571,9 +1571,9 @@ int A_ShootWithZvel(int const spriteNum, int const projecTile, int const forceZv
|
|||
{
|
||||
Bassert(projecTile >= 0);
|
||||
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
int const playerNum = (pSprite->picnum == APLAYER) ? P_GetP(pSprite) : -1;
|
||||
DukePlayer_t *const pPlayer = playerNum >= 0 ? g_player[playerNum].ps : NULL;
|
||||
auto const pPlayer = playerNum >= 0 ? g_player[playerNum].ps : NULL;
|
||||
|
||||
if (forceZvel != SHOOT_HARDCODED_ZVEL)
|
||||
{
|
||||
|
@ -1653,7 +1653,7 @@ int A_ShootWithZvel(int const spriteNum, int const projecTile, int const forceZv
|
|||
|
||||
static void P_DisplaySpit(void)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
int const loogCounter = pPlayer->loogcnt;
|
||||
|
||||
if (loogCounter == 0)
|
||||
|
@ -1867,7 +1867,7 @@ static inline void G_DrawWeaponTileUnfadedWithID(int uniqueID, int weaponX, int
|
|||
static int P_DisplayKnee(int kneeShade)
|
||||
{
|
||||
static int8_t const knee_y[] = { 0, -8, -16, -32, -64, -84, -108, -108, -108, -72, -32, -8 };
|
||||
const DukePlayer_t *const ps = g_player[screenpeek].ps;
|
||||
auto const ps = g_player[screenpeek].ps;
|
||||
|
||||
if (ps->knee_incs == 0)
|
||||
return 0;
|
||||
|
@ -1895,7 +1895,7 @@ static int P_DisplayKnuckles(int knuckleShade)
|
|||
if (WW2GI)
|
||||
return 0;
|
||||
|
||||
const DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
|
||||
if (pPlayer->knuckle_incs == 0)
|
||||
return 0;
|
||||
|
@ -1935,7 +1935,7 @@ void P_SetWeaponGamevars(int playerNum, const DukePlayer_t * const pPlayer)
|
|||
|
||||
static void P_FireWeapon(int playerNum)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (VM_OnEvent(EVENT_DOFIRE, pPlayer->i, playerNum) || pPlayer->weapon_pos != 0)
|
||||
return;
|
||||
|
@ -2002,7 +2002,7 @@ static void P_FireWeapon(int playerNum)
|
|||
|
||||
static void P_DoWeaponSpawn(int playerNum)
|
||||
{
|
||||
const DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
// NOTE: For the 'Spawn' member, 0 means 'none', too (originally so,
|
||||
// i.e. legacy). The check for <0 was added to the check because mod
|
||||
|
@ -2028,7 +2028,7 @@ void P_DisplayScuba(void)
|
|||
{
|
||||
if (g_player[screenpeek].ps->scuba_on)
|
||||
{
|
||||
const DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
|
||||
if (VM_OnEvent(EVENT_DISPLAYSCUBA, pPlayer->i, screenpeek) != 0)
|
||||
return;
|
||||
|
@ -2061,7 +2061,7 @@ static int8_t const access_tip_y [] = {
|
|||
|
||||
static int P_DisplayTip(int tipShade)
|
||||
{
|
||||
const DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
|
||||
if (pPlayer->tipincs == 0)
|
||||
return 0;
|
||||
|
@ -2094,7 +2094,7 @@ static int P_DisplayTip(int tipShade)
|
|||
|
||||
static int P_DisplayAccess(int accessShade)
|
||||
{
|
||||
const DukePlayer_t *const pSprite = g_player[screenpeek].ps;
|
||||
auto const pSprite = g_player[screenpeek].ps;
|
||||
|
||||
if (pSprite->access_incs == 0)
|
||||
return 0;
|
||||
|
@ -2134,8 +2134,8 @@ static int P_DisplayAccess(int accessShade)
|
|||
|
||||
void P_DisplayWeapon(void)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[screenpeek].ps;
|
||||
const uint8_t *const weaponFrame = &pPlayer->kickback_pic;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
auto const weaponFrame = &pPlayer->kickback_pic;
|
||||
|
||||
int currentWeapon;
|
||||
|
||||
|
@ -2884,7 +2884,7 @@ int32_t mouseyaxismode = -1;
|
|||
|
||||
void P_GetInput(int const playerNum)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
ControlInfo info;
|
||||
|
||||
if ((pPlayer->gm & (MODE_MENU|MODE_TYPE)) || (ud.pause_on && !KB_KeyPressed(sc_Pause)))
|
||||
|
@ -3124,7 +3124,7 @@ void P_GetInput(int const playerNum)
|
|||
|
||||
static int32_t P_DoCounters(int playerNum)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
if (IONMAIDEN)
|
||||
|
@ -3326,7 +3326,7 @@ int16_t WeaponPickupSprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATI
|
|||
// this is used for player deaths
|
||||
void P_DropWeapon(int const playerNum)
|
||||
{
|
||||
const DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
int const currentWeapon = PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike);
|
||||
|
||||
if ((unsigned)currentWeapon >= MAX_WEAPONS)
|
||||
|
@ -3589,7 +3589,7 @@ static void P_CheckTouchDamage(DukePlayer_t *pPlayer, int touchObject)
|
|||
|
||||
static int P_CheckFloorDamage(DukePlayer_t *pPlayer, int floorTexture)
|
||||
{
|
||||
spritetype * const pSprite = &sprite[pPlayer->i];
|
||||
auto const pSprite = &sprite[pPlayer->i];
|
||||
|
||||
if ((unsigned)(floorTexture = VM_OnEventWithReturn(EVENT_CHECKFLOORDAMAGE, pPlayer->i, P_Get(pPlayer->i), floorTexture)) >= MAXTILES)
|
||||
return 0;
|
||||
|
@ -3695,8 +3695,8 @@ int P_FindOtherPlayer(int playerNum, int32_t *pDist)
|
|||
|
||||
void P_FragPlayer(int playerNum)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
spritetype *const pSprite = &sprite[pPlayer->i];
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
auto const pSprite = &sprite[pPlayer->i];
|
||||
|
||||
if (g_netClient) // [75] The server should not overwrite its own randomseed
|
||||
randomseed = ticrandomseed;
|
||||
|
@ -3818,10 +3818,10 @@ void P_FragPlayer(int playerNum)
|
|||
|
||||
static void P_ProcessWeapon(int playerNum)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
uint8_t *const weaponFrame = &pPlayer->kickback_pic;
|
||||
int const playerShrunk = (sprite[pPlayer->i].yrepeat < 32);
|
||||
uint32_t playerBits = g_player[playerNum].input->bits;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
uint8_t *const weaponFrame = &pPlayer->kickback_pic;
|
||||
int const playerShrunk = (sprite[pPlayer->i].yrepeat < 32);
|
||||
uint32_t playerBits = g_player[playerNum].input->bits;
|
||||
|
||||
switch (pPlayer->weapon_pos)
|
||||
{
|
||||
|
@ -3891,7 +3891,7 @@ static void P_ProcessWeapon(int playerNum)
|
|||
#ifdef POLYMER
|
||||
if (pPlayer->kickback_pic == 0)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[pPlayer->i];
|
||||
auto const pSprite = &sprite[pPlayer->i];
|
||||
int const glowXOffset = ((sintable[(pSprite->ang + 512) & 2047]) >> 7);
|
||||
int const glowYOffset = ((sintable[(pSprite->ang) & 2047]) >> 7);
|
||||
int const glowRange = 1024 + (sintable[pPlayer->random_club_frame & 2047] >> 3);
|
||||
|
@ -4462,7 +4462,7 @@ void P_UpdatePosWhenViewingCam(DukePlayer_t *pPlayer)
|
|||
|
||||
static void P_DoWater(int const playerNum, int const playerBits, int const floorZ, int const ceilZ)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
// under water
|
||||
pPlayer->pycount += 32;
|
||||
|
@ -4527,7 +4527,7 @@ static void P_DoWater(int const playerNum, int const playerBits, int const floor
|
|||
}
|
||||
static void P_DoJetpack(int const playerNum, int const playerBits, int const playerShrunk, int const sectorLotag, int const floorZ)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
pPlayer->on_ground = 0;
|
||||
pPlayer->jumping_counter = 0;
|
||||
|
@ -4579,8 +4579,8 @@ static void P_DoJetpack(int const playerNum, int const playerBits, int const pla
|
|||
|
||||
static void P_Dead(int const playerNum, int const sectorLotag, int const floorZ, int const ceilZ)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
spritetype *const pSprite = &sprite[pPlayer->i];
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
auto const pSprite = &sprite[pPlayer->i];
|
||||
|
||||
if (ud.recstat == 1 && (!g_netServer && ud.multimode < 2))
|
||||
G_CloseDemoWrite();
|
||||
|
@ -4668,8 +4668,8 @@ void P_ProcessInput(int playerNum)
|
|||
if (g_player[playerNum].playerquitflag == 0)
|
||||
return;
|
||||
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
spritetype *const pSprite = &sprite[pPlayer->i];
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
auto const pSprite = &sprite[pPlayer->i];
|
||||
|
||||
++pPlayer->player_par;
|
||||
|
||||
|
|
|
@ -480,7 +480,7 @@ void G_DrawFrags(void)
|
|||
|
||||
for (TRAVERSE_CONNECT(i))
|
||||
{
|
||||
const DukePlayer_t *ps = g_player[i].ps;
|
||||
auto const ps = g_player[i].ps;
|
||||
minitext(21+(73*(i&3)), 2+((i&28)<<1), g_player[i].user_name, ps->palookup, 2+8+16);
|
||||
Bsprintf(tempbuf, "%d", ps->frag-ps->fraggedself);
|
||||
minitext(17+50+(73*(i&3)), 2+((i&28)<<1), tempbuf, ps->palookup, 2+8+16);
|
||||
|
@ -552,7 +552,7 @@ static inline void rotatesprite_althudr(int32_t sx, int32_t sy, int32_t z, int16
|
|||
|
||||
void G_DrawStatusBar(int32_t snum)
|
||||
{
|
||||
const DukePlayer_t *const p = g_player[snum].ps;
|
||||
auto const p = g_player[snum].ps;
|
||||
int32_t i, j, o, u;
|
||||
int32_t permbit = 0;
|
||||
|
||||
|
|
|
@ -571,7 +571,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
{
|
||||
if (ud.scrollmode && p == screenpeek) continue;
|
||||
|
||||
DukePlayer_t const * const pPlayer = g_player[p].ps;
|
||||
auto const pPlayer = g_player[p].ps;
|
||||
auto const pSprite = (uspriteptr_t)&sprite[pPlayer->i];
|
||||
|
||||
ox = pSprite->x - cposx;
|
||||
|
@ -624,7 +624,7 @@ static void G_PrintCoords(int32_t snum)
|
|||
const int32_t x = g_Debug ? 288 : 0;
|
||||
int32_t y = 0;
|
||||
|
||||
const DukePlayer_t *ps = g_player[snum].ps;
|
||||
auto const ps = g_player[snum].ps;
|
||||
const int32_t sectnum = ps->cursectnum;
|
||||
|
||||
if ((g_gametypeFlags[ud.coop] & GAMETYPE_FRAGBAR))
|
||||
|
@ -898,9 +898,9 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
int32_t i, j;
|
||||
palaccum_t tint = PALACCUM_INITIALIZER;
|
||||
|
||||
DukePlayer_t *const pp = g_player[screenpeek].ps;
|
||||
auto const pp = g_player[screenpeek].ps;
|
||||
#ifdef SPLITSCREEN_MOD_HACKS
|
||||
DukePlayer_t *const pp2 = g_fakeMultiMode==2 ? g_player[1].ps : NULL;
|
||||
auto const pp2 = g_fakeMultiMode==2 ? g_player[1].ps : NULL;
|
||||
#endif
|
||||
int32_t cposx, cposy, cang;
|
||||
|
||||
|
@ -1294,7 +1294,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
// JBF 20040124: display level stats in screen corner
|
||||
if (ud.overhead_on != 2 && ud.levelstats && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[screenpeek].ps->i, screenpeek) == 0)
|
||||
{
|
||||
DukePlayer_t const * const myps = g_player[myconnectindex].ps;
|
||||
auto const myps = g_player[myconnectindex].ps;
|
||||
|
||||
i = 198<<16;
|
||||
|
||||
|
|
|
@ -1049,7 +1049,7 @@ static FORCE_INLINE int32_t text_ypos(void)
|
|||
// both are passed on to gametext
|
||||
void G_PrintGameQuotes(int32_t snum)
|
||||
{
|
||||
const DukePlayer_t *const ps = g_player[snum].ps;
|
||||
auto const ps = g_player[snum].ps;
|
||||
const int32_t reserved_quote = (ps->ftq >= QUOTE_RESERVED && ps->ftq <= QUOTE_RESERVED3);
|
||||
// NOTE: QUOTE_RESERVED4 is not included.
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ int G_CheckActivatorMotion(int lotag)
|
|||
{
|
||||
if (sprite[spriteNum].lotag == lotag)
|
||||
{
|
||||
spritetype *const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
|
||||
for (bssize_t j = g_animateCnt - 1; j >= 0; j--)
|
||||
if (pSprite->sectnum == g_animateSect[j])
|
||||
|
@ -229,7 +229,7 @@ int __fastcall A_FindPlayer(const spritetype *pSprite, int32_t *dist)
|
|||
{
|
||||
if (!g_netServer && ud.multimode < 2)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[myconnectindex].ps;
|
||||
auto const pPlayer = g_player[myconnectindex].ps;
|
||||
|
||||
if (dist)
|
||||
*dist = A_FP_ManhattanDist(pPlayer, pSprite);
|
||||
|
@ -242,7 +242,7 @@ int __fastcall A_FindPlayer(const spritetype *pSprite, int32_t *dist)
|
|||
|
||||
for (bssize_t TRAVERSE_CONNECT(j))
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[j].ps;
|
||||
auto const pPlayer = g_player[j].ps;
|
||||
int32_t playerDist = A_FP_ManhattanDist(pPlayer, pSprite);
|
||||
|
||||
if (playerDist < closestPlayerDist && sprite[pPlayer->i].extra > 0)
|
||||
|
@ -420,7 +420,7 @@ void G_AnimateCamSprite(int smoothRatio)
|
|||
|
||||
if (totalclock >= T1(spriteNum) + ud.camera_time)
|
||||
{
|
||||
DukePlayer_t const *const pPlayer = g_player[screenpeek].ps;
|
||||
auto const pPlayer = g_player[screenpeek].ps;
|
||||
|
||||
if (pPlayer->newowner >= 0)
|
||||
OW(spriteNum) = pPlayer->newowner;
|
||||
|
@ -1010,7 +1010,7 @@ void G_OperateRespawns(int lotag)
|
|||
{
|
||||
for (bssize_t nextSprite, SPRITES_OF_STAT_SAFE(STAT_FX, spriteNum, nextSprite))
|
||||
{
|
||||
spritetype * const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
|
||||
if (pSprite->lotag == lotag && pSprite->picnum == RESPAWN)
|
||||
{
|
||||
|
@ -1940,7 +1940,7 @@ void A_DamageObject_Internal(int spriteNum, int const dmgSrc)
|
|||
|
||||
for (bssize_t j=16; j>0; j--)
|
||||
{
|
||||
spritetype * const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
RANDOMSCRAP(pSprite, spriteNum);
|
||||
}
|
||||
#endif
|
||||
|
@ -2288,7 +2288,7 @@ void A_DamageObject_Internal(int spriteNum, int const dmgSrc)
|
|||
A_PlaySound(GLASS_HEAVYBREAK,spriteNum);
|
||||
for (bssize_t j=16; j>0; j--)
|
||||
{
|
||||
spritetype * const pSprite = &sprite[spriteNum];
|
||||
auto const pSprite = &sprite[spriteNum];
|
||||
RANDOMSCRAP(pSprite, spriteNum);
|
||||
}
|
||||
A_DeleteSprite(spriteNum);
|
||||
|
@ -2377,7 +2377,7 @@ void A_DamageObject_Internal(int spriteNum, int const dmgSrc)
|
|||
|
||||
if (sprite[spriteNum].statnum == STAT_PLAYER)
|
||||
{
|
||||
DukePlayer_t *ps = g_player[P_Get(spriteNum)].ps;
|
||||
auto ps = g_player[P_Get(spriteNum)].ps;
|
||||
|
||||
if (ps->newowner >= 0)
|
||||
G_ClearCameraView(ps);
|
||||
|
@ -2440,7 +2440,7 @@ static int P_CheckDetonatorSpecialCase(DukePlayer_t *const pPlayer, int weaponNu
|
|||
|
||||
void P_HandleSharedKeys(int playerNum)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pPlayer->cheat_phase == 1) return;
|
||||
|
||||
|
@ -3003,7 +3003,7 @@ static void G_ClearCameras(DukePlayer_t *p)
|
|||
|
||||
void P_CheckSectors(int playerNum)
|
||||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pPlayer->cursectnum > -1)
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ void A_DamageObject_Internal(int spriteNum, int dmgSrc);
|
|||
void A_DamageObject(int spriteNum,int dmgSrc);
|
||||
void A_DamageWall_Internal(int spr, int dawallnum, const vec3_t *pos, int weaponNum);
|
||||
void A_DamageWall(int spr,int dawallnum,const vec3_t *pos,int weaponNum);
|
||||
int __fastcall A_FindPlayer(const spritetype *pSprite,int32_t *dist);
|
||||
int __fastcall A_FindPlayer(spritetype const *pSprite,int32_t *dist);
|
||||
void G_AlignWarpElevators(void);
|
||||
int CheckDoorTile(int tileNum);
|
||||
void G_AnimateCamSprite(int smoothRatio);
|
||||
|
|
|
@ -624,7 +624,7 @@ int S_PlaySound3D(int num, int spriteNum, const vec3_t *pos)
|
|||
return -1;
|
||||
}
|
||||
|
||||
const DukePlayer_t *const pPlayer = g_player[myconnectindex].ps;
|
||||
auto const pPlayer = g_player[myconnectindex].ps;
|
||||
|
||||
if (((snd.m & SF_ADULT) && ud.lockout) || (unsigned)spriteNum >= MAXSPRITES || (pPlayer->gm & MODE_MENU) || !FX_VoiceAvailable(snd.pr)
|
||||
|| (pPlayer->timebeforeexit > 0 && pPlayer->timebeforeexit <= GAMETICSPERSEC * 3))
|
||||
|
|
Loading…
Reference in a new issue