mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-04 06:55:48 +00:00
- SW: Replace all pp = Player \+ (.+);
with array accesses.
This commit is contained in:
parent
3cc2aa7af4
commit
3c499b060f
17 changed files with 25 additions and 25 deletions
|
@ -97,7 +97,7 @@ bool GameInterface::CanSave()
|
|||
|
||||
bool GameInterface::StartGame(FNewGameStartup& gs)
|
||||
{
|
||||
SWPlayer* pp = Player + screenpeek;
|
||||
SWPlayer* pp = &Player[screenpeek];
|
||||
int handle = 0;
|
||||
int zero = 0;
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
|
|||
{
|
||||
int tSpriteNum;
|
||||
static int ang = 0;
|
||||
SWPlayer* pp = Player + screenpeek;
|
||||
SWPlayer* pp = &Player[screenpeek];
|
||||
int newshade=0;
|
||||
|
||||
const int DART_PIC = 2526;
|
||||
|
@ -777,7 +777,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
|
|||
// sw if its your playersprite
|
||||
if (Player[screenpeek].GetActor() == tActor)
|
||||
{
|
||||
pp = Player + screenpeek;
|
||||
pp = &Player[screenpeek];
|
||||
if (display_mirror || (pp->Flags & (PF_VIEW_FROM_OUTSIDE|PF_VIEW_FROM_CAMERA)))
|
||||
{
|
||||
if (pp->Flags & (PF_VIEW_FROM_OUTSIDE))
|
||||
|
|
|
@ -557,7 +557,7 @@ void JS_DrawCameras(SWPlayer* pp, const DVector3& campos, double smoothratio)
|
|||
{
|
||||
if (dist < MAXCAMDIST)
|
||||
{
|
||||
SWPlayer* cp = Player + camplayerview;
|
||||
SWPlayer* cp = &Player[camplayerview];
|
||||
|
||||
if (TEST_BOOL11(camactor) && numplayers > 1)
|
||||
{
|
||||
|
|
|
@ -1473,7 +1473,7 @@ int InitFlashBomb(DSWActor* actor)
|
|||
int i;
|
||||
unsigned int stat;
|
||||
short damage;
|
||||
SWPlayer* pp = Player + screenpeek;
|
||||
SWPlayer* pp = &Player[screenpeek];
|
||||
|
||||
PlaySound(DIGI_GASPOP, actor, v3df_dontpan | v3df_doppler);
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ uint8_t CommPlayers = 0;
|
|||
void InitNetPlayerOptions(void)
|
||||
{
|
||||
// short pnum;
|
||||
SWPlayer* pp = Player + myconnectindex;
|
||||
SWPlayer* pp = &Player[myconnectindex];
|
||||
|
||||
strncpy(pp->PlayerName, playername, 31);
|
||||
|
||||
|
|
|
@ -2241,7 +2241,7 @@ void PlayerPanelSetup(void)
|
|||
//for (pp = Player; pp < &Player[numplayers]; pp++)
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
auto pp = Player + pnum;
|
||||
auto pp = &Player[pnum];
|
||||
|
||||
ASSERT(pp->GetActor()->hasU());
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ void GameInterface::SwitchCoopView()
|
|||
}
|
||||
else
|
||||
{
|
||||
SWPlayer* tp = Player + screenpeek;
|
||||
SWPlayer* tp = &Player[screenpeek];
|
||||
DoPlayerDivePalette(tp);
|
||||
DoPlayerNightVisionPalette(tp);
|
||||
}
|
||||
|
|
|
@ -444,7 +444,7 @@ void PlayerUpdateKills(SWPlayer* pp, short value)
|
|||
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
opp = Player + pnum;
|
||||
opp = &Player[pnum];
|
||||
|
||||
// for everyone on the same team
|
||||
if (opp != pp && opp->GetActor()->user.spal == pp->GetActor()->user.spal)
|
||||
|
|
|
@ -6512,7 +6512,7 @@ void MoveSkipSavePos(void)
|
|||
// Save off player
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
pp->Angles.resetCameraAngles();
|
||||
pp->GetActor()->backuploc();
|
||||
|
@ -6775,7 +6775,7 @@ void domovethings(const ticcmd_t* playercmds)
|
|||
extern bool PlayerTrackingMode;
|
||||
extern SWPlayer* GlobPlayerP;
|
||||
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
GlobPlayerP = pp;
|
||||
|
||||
pp->lastinput = pp->input;
|
||||
|
@ -7110,7 +7110,7 @@ void InitMultiPlayerInfo(const DVector3& spawnpos, const DAngle startang)
|
|||
//for (pp = Player; pp < Player + numplayers; pp++)
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
switch (gNet.MultiGameType)
|
||||
{
|
||||
case MULTI_GAME_NONE:
|
||||
|
|
|
@ -581,7 +581,7 @@ int DoSlidor(DSWActor* actor)
|
|||
// go ahead and look for players clip box bounds
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
if (pp->lo_sectp == actor->sector() ||
|
||||
pp->hi_sectp == actor->sector())
|
||||
|
|
|
@ -324,7 +324,7 @@ static void UpdateAmbients()
|
|||
|
||||
if (sdist < 255 && sfx->ResourceId == DIGI_WHIPME)
|
||||
{
|
||||
SWPlayer* pp = Player + screenpeek;
|
||||
SWPlayer* pp = &Player[screenpeek];
|
||||
if (!FAFcansee(spot->spr.pos, spot->sector(), pp->GetActor()->getPosWithOffsetZ(), pp->cursector))
|
||||
{
|
||||
sdist = 255;
|
||||
|
@ -425,7 +425,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
|||
{
|
||||
if (pos != nullptr)
|
||||
{
|
||||
SWPlayer* pp = Player + screenpeek;
|
||||
SWPlayer* pp = &Player[screenpeek];
|
||||
FVector3 campos = GetSoundPos(pp->GetActor() ? pp->GetActor()->getPosWithOffsetZ() : DVector3());
|
||||
DVector3 vPos = {};
|
||||
bool pancheck = false;
|
||||
|
@ -513,7 +513,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
|||
|
||||
void GameInterface::UpdateSounds(void)
|
||||
{
|
||||
SWPlayer* pp = Player + screenpeek;
|
||||
SWPlayer* pp = &Player[screenpeek];
|
||||
SoundListener listener;
|
||||
|
||||
DAngle tang;
|
||||
|
|
|
@ -417,7 +417,7 @@ int DoSpike(DSWActor* actor)
|
|||
// go ahead and look for players clip box bounds
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
if (pp->lo_sectp == actor->sector() ||
|
||||
pp->hi_sectp == actor->sector())
|
||||
|
|
|
@ -597,7 +597,7 @@ void KillActor(DSWActor* actor)
|
|||
// reset it.
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
if (pp->KillerActor != nullptr)
|
||||
{
|
||||
|
|
|
@ -694,7 +694,7 @@ int DoSumoDeathMelt(DSWActor* actor)
|
|||
|
||||
void BossHealthMeter(void)
|
||||
{
|
||||
SWPlayer* pp = Player + myconnectindex;
|
||||
SWPlayer* pp = &Player[myconnectindex];
|
||||
short color=0,metertics,meterunit;
|
||||
int y;
|
||||
extern bool NoMeters;
|
||||
|
|
|
@ -1597,7 +1597,7 @@ PlayerPart:
|
|||
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
// if controlling a sector object
|
||||
if (pp->sop)
|
||||
|
@ -1632,7 +1632,7 @@ PlayerPart:
|
|||
// move the player
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
if (pp->lowActor && pp->lowActor == actor)
|
||||
{
|
||||
|
@ -1715,7 +1715,7 @@ PlayerPart:
|
|||
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
// if player was on a sector object
|
||||
if (pp->sop_riding)
|
||||
|
|
|
@ -483,7 +483,7 @@ int DoVator(DSWActor* actor)
|
|||
// go ahead and look for players clip box bounds
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
|
||||
if (pp->lo_sectp == actor->sector() ||
|
||||
pp->hi_sectp == actor->sector())
|
||||
|
|
|
@ -2547,7 +2547,7 @@ int DoLavaErupt(DSWActor* actor)
|
|||
{
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp = &Player[pnum];
|
||||
if (pp->insector() && (pp->cursector->extra & SECTFX_TRIGGER))
|
||||
{
|
||||
SWSectIterator it(pp->cursector);
|
||||
|
@ -5449,7 +5449,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
|
|||
}
|
||||
else
|
||||
{
|
||||
SWPlayer* pp = Player + screenpeek;
|
||||
SWPlayer* pp = &Player[screenpeek];
|
||||
|
||||
ActorHealth(actor, damage);
|
||||
if (actor->user.Health <= 0)
|
||||
|
|
Loading…
Reference in a new issue