diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index 0faf77f28..7d9820b5a 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -1012,7 +1012,7 @@ int DoBunnyQuickJump(DSWActor* actor) int choose_snd; static const int fagsnds[] = {DIGI_FAGRABBIT1,DIGI_FAGRABBIT2,DIGI_FAGRABBIT3}; - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) { choose_snd = StdRandomRange(2<<8)>>8; if (FAFcansee(ActorVectOfTop(actor),actor->sector(),pp->GetActor()->getPosWithOffsetZ(), pp->cursector) && Facing(actor, actor->user.targetActor)) @@ -1027,7 +1027,7 @@ int DoBunnyQuickJump(DSWActor* actor) int choose_snd; static const int straightsnds[] = {DIGI_RABBITHUMP1,DIGI_RABBITHUMP2, DIGI_RABBITHUMP3,DIGI_RABBITHUMP4}; - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) { choose_snd = StdRandomRange(3<<8)>>8; if (FAFcansee(ActorVectOfTop(actor), actor->sector(), pp->GetActor()->getPosWithOffsetZ(), pp->cursector) && Facing(actor, actor->user.targetActor)) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index b1d6db514..e5567f932 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1215,7 +1215,7 @@ void RestorePortalState() void drawscreen(SWPlayer* pp, double interpfrac, bool sceneonly) { // prediction player if prediction is on, else regular player - SWPlayer* camerapp = (PredictionOn && CommEnabled && pp == Player+myconnectindex) ? ppp : pp; + SWPlayer* camerapp = (PredictionOn && CommEnabled && pp == &Player[myconnectindex]) ? ppp : pp; PreDraw(); PreUpdatePanel(interpfrac); @@ -1305,7 +1305,7 @@ void drawscreen(SWPlayer* pp, double interpfrac, bool sceneonly) MarkSectorSeen(pp->cursector); - if ((automapMode != am_off) && pp == Player+myconnectindex) + if ((automapMode != am_off) && pp == &Player[myconnectindex]) { SWSpriteIterator it; while (auto actor = it.Next()) diff --git a/source/games/sw/src/inv.cpp b/source/games/sw/src/inv.cpp index 56c29fdb5..9ed889979 100644 --- a/source/games/sw/src/inv.cpp +++ b/source/games/sw/src/inv.cpp @@ -182,7 +182,7 @@ void UseInventoryMedkit(SWPlayer* pp) //percent PlayerUpdateInventory(pp, pp->InventoryNum); - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) { if (amt >= 30) PlayerSound(DIGI_GETMEDKIT, v3df_follow|v3df_dontpan,pp); @@ -315,7 +315,7 @@ void UseInventoryCloak(SWPlayer* pp) plActor->spr.shade = 100; PlaySound(DIGI_GASPOP, pp, v3df_none); - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(DIGI_IAMSHADOW, v3df_follow|v3df_dontpan,pp); } diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index c39662058..fa6c110a8 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -221,7 +221,7 @@ void DoPlayerChooseYell(SWPlayer* pp) choose_snd = StdRandomRange(MAX_YELLSOUNDS); - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(PlayerYellVocs[choose_snd], v3df_follow|v3df_dontpan,pp); } @@ -1084,7 +1084,7 @@ void InitWeaponSword(SWPlayer* pp) PlaySound(DIGI_SWORD_UP, pp, v3df_follow|v3df_dontpan); - if (pp == Player+myconnectindex && PlayClock > 0) + if (pp == &Player[myconnectindex] && PlayClock > 0) { rnd_num = StdRandomRange(1024); if (rnd_num > 900) @@ -1539,7 +1539,7 @@ void InitWeaponStar(SWPlayer* pp) pSetState(psp, psp->PresentState); PlaySound(DIGI_PULL, pp, v3df_follow|v3df_dontpan); - if (StdRandomRange(1000) > 900 && pp == Player+myconnectindex) + if (StdRandomRange(1000) > 900 && pp == &Player[myconnectindex]) { if (!sw_darts) PlayerSound(DIGI_ILIKESHURIKEN, v3df_follow|v3df_dontpan,pp); @@ -4761,7 +4761,7 @@ void pMicroRest(PANEL_SPRITE* psp) pp->InitingNuke = false; pp->NukeInitialized = true; - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) { choose_voc = StdRandomRange(1024); if (choose_voc > 600) diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 969af1bad..fc204a7b7 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -4302,7 +4302,7 @@ void DoPlayerDiveMeter(SWPlayer* pp) if (NoMeters) return; // Don't draw bar from other players - if (pp != Player+myconnectindex) return; + if (pp != &Player[myconnectindex]) return; if (!(pp->Flags & (PF_DIVING|PF_DIVING_IN_LAVA))) return; diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 256234e3c..79f86a8ca 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -1088,7 +1088,7 @@ void DoSoundSpotMatch(short match, short sound_num, short sound_type) if (pp) { - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(snd2play, v3df_dontpan|v3df_follow,pp); } } @@ -1536,7 +1536,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating) actor->user.FlagOwner = 1; actor->user.WaitTics = SEC(4); - if (pp != Player+myconnectindex) return true; + if (pp != &Player[myconnectindex]) return true; choose_snd = StdRandomRange(1000); if (actor->spr.lotag == CARGIRL_R0) @@ -2104,7 +2104,7 @@ bool NearThings(SWPlayer* pp) // Check player's current sector for triggered sound if (pp->cursector->hitag == PLAYER_SOUNDEVENT_TAG) { - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(pp->cursector->lotag, v3df_follow|v3df_dontpan,pp); return false; } @@ -2121,7 +2121,7 @@ bool NearThings(SWPlayer* pp) // Go through list of cases if (actor->spr.hitag == PLAYER_SOUNDEVENT_TAG) { - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(actor->spr.lotag, v3df_follow|v3df_dontpan,pp); } return false; // Return false so he doesn't grunt @@ -2132,7 +2132,7 @@ bool NearThings(SWPlayer* pp) // Check player's current sector for triggered sound if (near.hitWall->hitag == PLAYER_SOUNDEVENT_TAG) { - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(near.hitWall->lotag, v3df_follow|v3df_dontpan,pp); return false; // We are playing a sound so don't return true } @@ -2160,7 +2160,7 @@ bool NearThings(SWPlayer* pp) if (hit.hitWall != nullptr) { // Near a plain old vanilla wall. Can't do anything but grunt. - if (!(hit.hitWall->extra & WALLFX_DONT_STICK) && pp == Player+myconnectindex) + if (!(hit.hitWall->extra & WALLFX_DONT_STICK) && pp == &Player[myconnectindex]) { if (StdRandomRange(1000) > 970) PlayerSound(DIGI_HITTINGWALLS, v3df_follow|v3df_dontpan,pp); diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index e79dea786..f9e5bc261 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -4891,7 +4891,7 @@ void ChoosePlayerGetSound(SWPlayer* pp) { int choose_snd=0; - if (pp != Player+myconnectindex) return; + if (pp != &Player[myconnectindex]) return; choose_snd = StdRandomRange((MAX_GETSOUNDS-1)<<8)>>8; @@ -5067,7 +5067,7 @@ KeyMain: pp->HasKey[key_num] = true; SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_KEY, actor, v3df_dontpan); // don't kill keys in coop @@ -5096,7 +5096,7 @@ KeyMain: break; } SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_BIGITEM, actor, v3df_dontpan); // override for respawn mode @@ -5131,7 +5131,7 @@ KeyMain: if (putbackmax) pp->MaxHealth = 200; SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); // override for respawn mode @@ -5153,7 +5153,7 @@ KeyMain: PlayerUpdateHealth(pp, InventoryDecls[InvDecl_Booster].amount); // This is for health // over 100% // Say something witty - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) { int cookie = StdRandomRange(MAX_FORTUNES); // print to the console, and the user quote display. @@ -5168,7 +5168,7 @@ KeyMain: } SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_BIGITEM, actor, v3df_dontpan); // override for respawn mode @@ -5194,7 +5194,7 @@ KeyMain: pp->InventoryAmount[INVENTORY_MEDKIT] = 1; PlayerUpdateInventory(pp, INVENTORY_MEDKIT); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); // override for respawn mode @@ -5217,7 +5217,7 @@ KeyMain: pp->InventoryAmount[INVENTORY_CHEMBOMB]++; PlayerUpdateInventory(pp, INVENTORY_CHEMBOMB); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGet(actor); } @@ -5232,7 +5232,7 @@ KeyMain: pp->InventoryAmount[INVENTORY_FLASHBOMB]++; PlayerUpdateInventory(pp, INVENTORY_FLASHBOMB); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGet(actor); } @@ -5249,7 +5249,7 @@ KeyMain: pp->InventoryAmount[INVENTORY_CALTROPS] = InventoryDecls[InvDecl_Caltrops].amount; PlayerUpdateInventory(pp, INVENTORY_CALTROPS); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGet(actor); } @@ -5263,7 +5263,7 @@ KeyMain: pp->InventoryAmount[INVENTORY_NIGHT_VISION] = 1; PlayerUpdateInventory(pp, INVENTORY_NIGHT_VISION); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGet(actor); } @@ -5276,7 +5276,7 @@ KeyMain: pp->InventoryAmount[INVENTORY_REPAIR_KIT] = 1; PlayerUpdateInventory(pp, INVENTORY_REPAIR_KIT); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); // don't kill repair kit in coop @@ -5307,7 +5307,7 @@ KeyMain: pp->InventoryAmount[INVENTORY_CLOAK] = 1; PlayerUpdateInventory(pp, INVENTORY_CLOAK); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGet(actor); } @@ -5328,7 +5328,7 @@ KeyMain: PutStringInfo(Player+pnum, sw_darts? GStrings("TXTS_DARTS") : quoteMgr.GetQuote(QUOTE_WPNSHURIKEN)); PlayerUpdateAmmo(pp, WPN_STAR, DamageData[WPN_STAR].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetWeapon(actor); if (pp->WpnFlags & (BIT(WPN_STAR))) @@ -5355,7 +5355,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_WPNSTICKY)); PlayerUpdateAmmo(pp, WPN_MINE, DamageData[WPN_MINE].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); ChoosePlayerGetSound(pp); KillGetWeapon(actor); @@ -5385,7 +5385,7 @@ KeyMain: // pp->WpnAmmo[WPN_UZI] += 50; PlayerUpdateAmmo(pp, WPN_UZI, DamageData[WPN_UZI].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetWeapon(actor); @@ -5397,7 +5397,7 @@ KeyMain: { pp->Flags |= (PF_TWO_UZI); pp->WpnUziType = 0; // Let it come up - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(DIGI_DOUBLEUZI, v3df_dontpan|v3df_follow, pp); } else @@ -5422,7 +5422,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMOUZI)); PlayerUpdateAmmo(pp, WPN_UZI, DamageData[WPN_UZI].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetAmmo(actor); break; @@ -5441,7 +5441,7 @@ KeyMain: // pp->WpnAmmo[WPN_MICRO] += 5; PlayerUpdateAmmo(pp, WPN_MICRO, DamageData[WPN_MICRO].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); ChoosePlayerGetSound(pp); KillGetWeapon(actor); @@ -5463,7 +5463,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMOLAUNCH)); PlayerUpdateAmmo(pp, WPN_MICRO, DamageData[WPN_MICRO].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetAmmo(actor); break; @@ -5475,9 +5475,9 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_WPNNUKE)); pp->WpnRocketNuke =uint8_t(DamageData[DMG_NUCLEAR_EXP].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); - if (StdRandomRange(1000) > 800 && pp == Player+myconnectindex) + if (StdRandomRange(1000) > 800 && pp == &Player[myconnectindex]) PlayerSound(DIGI_ILIKENUKES, v3df_dontpan|v3df_doppler|v3df_follow,pp); if (pp->CurWpn == pp->Wpn[WPN_MICRO]) { @@ -5508,10 +5508,10 @@ KeyMain: // pp->WpnAmmo[WPN_GRENADE] += 6; PlayerUpdateAmmo(pp, WPN_GRENADE, DamageData[WPN_GRENADE].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); //ChoosePlayerGetSound(pp); - if (StdRandomRange(1000) > 800 && pp == Player+myconnectindex) + if (StdRandomRange(1000) > 800 && pp == &Player[myconnectindex]) PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp); KillGetWeapon(actor); if (pp->WpnFlags & (BIT(WPN_GRENADE))) @@ -5532,7 +5532,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMOGRENADE)); PlayerUpdateAmmo(pp, WPN_GRENADE, DamageData[WPN_GRENADE].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetAmmo(actor); break; @@ -5577,9 +5577,9 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_WPNRAILGUN)); PlayerUpdateAmmo(pp, WPN_RAIL, DamageData[WPN_RAIL].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) { if (StdRandomRange(1000) > 700) PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp); @@ -5608,7 +5608,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMORAILGUN)); PlayerUpdateAmmo(pp, WPN_RAIL, DamageData[WPN_RAIL].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetAmmo(actor); break; @@ -5626,7 +5626,7 @@ KeyMain: // pp->WpnAmmo[WPN_SHOTGUN] += 10; PlayerUpdateAmmo(pp, WPN_SHOTGUN, DamageData[WPN_SHOTGUN].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); ChoosePlayerGetSound(pp); KillGetWeapon(actor); @@ -5648,7 +5648,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMORIOT)); PlayerUpdateAmmo(pp, WPN_SHOTGUN, DamageData[WPN_SHOTGUN].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetAmmo(actor); break; @@ -5692,10 +5692,10 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_WPNHEAD)); PlayerUpdateAmmo(pp, WPN_HOTHEAD, DamageData[WPN_HOTHEAD].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); //ChoosePlayerGetSound(pp); - if (StdRandomRange(1000) > 800 && pp == Player+myconnectindex) + if (StdRandomRange(1000) > 800 && pp == &Player[myconnectindex]) PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp); KillGetWeapon(actor); if (pp->WpnFlags & (BIT(WPN_HOTHEAD))) @@ -5718,7 +5718,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMOHEAD)); PlayerUpdateAmmo(pp, WPN_HOTHEAD, DamageData[WPN_HOTHEAD].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetAmmo(actor); break; @@ -5737,10 +5737,10 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_WPNRIPPER)); PlayerUpdateAmmo(pp, WPN_HEART, DamageData[WPN_HEART].weapon_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); //ChoosePlayerGetSound(pp); - if (StdRandomRange(1000) > 800 && pp == Player+myconnectindex) + if (StdRandomRange(1000) > 800 && pp == &Player[myconnectindex]) PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp); KillGetWeapon(actor); if (pp->WpnFlags & (BIT(WPN_HEART))) @@ -5765,7 +5765,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMORIPPER)); PlayerUpdateAmmo(pp, WPN_HEART, DamageData[WPN_HEART].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGetAmmo(actor); break; @@ -5777,7 +5777,7 @@ KeyMain: PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_AMMONUKE)); pp->WpnRocketHeat = uint8_t(DamageData[DMG_NUCLEAR_EXP].ammo_pickup); SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlaySound(DIGI_ITEM, actor, v3df_dontpan); KillGet(actor); diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index 81c520267..719d7a17a 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -706,7 +706,7 @@ void BossHealthMeter(void) if (!(currentLevel->gameflags & (LEVEL_SW_BOSSMETER_SERPENT | LEVEL_SW_BOSSMETER_SUMO | LEVEL_SW_BOSSMETER_ZILLA))) return; // Don't draw bar for other players - if (pp != Player+myconnectindex) + if (pp != &Player[myconnectindex]) return; // all enemys diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 2c84f9b16..474333ccc 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -4655,7 +4655,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) { SWPlayer* pp = weapActor->user.PlayerP; - if (weapActor->user.WeaponNum == WPN_FIST && StdRandomRange(1000)>500 && pp == Player+myconnectindex) + if (weapActor->user.WeaponNum == WPN_FIST && StdRandomRange(1000)>500 && pp == &Player[myconnectindex]) { int choosesnd = StdRandomRange(6); @@ -4674,7 +4674,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) //PlayerSound(TauntAIVocs[choosesnd],&pp->posx, // &pp->posy,&pp->posy,v3df_dontpan|v3df_follow,pp); } - else if (weapActor->user.WeaponNum == WPN_SWORD && StdRandomRange(1000)>500 && pp == Player+myconnectindex) + else if (weapActor->user.WeaponNum == WPN_SWORD && StdRandomRange(1000)>500 && pp == &Player[myconnectindex]) { short choose_snd; @@ -4762,7 +4762,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) { choosesnd=StdRandomRange(MAX_TAUNTAI<<8)>>8; - if (pp == Player+myconnectindex) + if (pp == &Player[myconnectindex]) PlayerSound(TauntAIVocs[choosesnd],v3df_dontpan|v3df_follow,pp); } } @@ -5456,7 +5456,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor) { int choosesnd=0; // Random chance of taunting the AI's here - if (StdRandomRange(1024) > 512 && pp == Player+myconnectindex) + if (StdRandomRange(1024) > 512 && pp == &Player[myconnectindex]) { choosesnd=RandomRange(MAX_TAUNTAI); PlayerSound(TauntAIVocs[choosesnd],v3df_dontpan|v3df_follow,pp);