- SW: Clean up player accesses in DoGet().

This commit is contained in:
Mitchell Richters 2023-10-04 12:17:11 +11:00
parent 79995ba8ce
commit e39002ddb3

View file

@ -5063,11 +5063,11 @@ KeyMain:
if (pp->HasKey[key_num])
break;
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_KEYMSG + key_num));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_KEYMSG + key_num));
pp->HasKey[key_num] = true;
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_KEY, actor, v3df_dontpan);
// don't kill keys in coop
@ -5083,20 +5083,20 @@ KeyMain:
if (actor->user.spal == PALETTE_PLAYER3)
{
PlayerUpdateArmor(pp, 1000+InventoryDecls[InvDecl_Kevlar].amount);
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Kevlar));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Kevlar));
}
else
{
if (pp->Armor < InventoryDecls[InvDecl_Armor].amount)
{
PlayerUpdateArmor(pp, 1000+InventoryDecls[InvDecl_Armor].amount);
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Armor));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Armor));
}
else
break;
}
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_BIGITEM, actor, v3df_dontpan);
// override for respawn mode
@ -5119,7 +5119,7 @@ KeyMain:
{
bool putbackmax=false;
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_SmMedkit));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_SmMedkit));
if (pp->MaxHealth == 200)
{
@ -5131,7 +5131,7 @@ KeyMain:
if (putbackmax) pp->MaxHealth = 200;
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
// override for respawn mode
@ -5149,11 +5149,11 @@ KeyMain:
pp->MaxHealth = 200;
if (plActor->user.Health < 200)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Booster));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Booster));
PlayerUpdateHealth(pp, InventoryDecls[InvDecl_Booster].amount); // This is for health
// over 100%
// Say something witty
if (pp == getPlayer(myconnectindex))
if (pp->pnum == 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_BIGITEM, actor, v3df_dontpan);
// override for respawn mode
@ -5189,12 +5189,12 @@ KeyMain:
if (!pp->InventoryAmount[INVENTORY_MEDKIT] || pp->InventoryPercent[INVENTORY_MEDKIT] < InventoryDecls[InvDecl_Medkit].amount)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Medkit));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Medkit));
pp->InventoryPercent[INVENTORY_MEDKIT] = InventoryDecls[InvDecl_Medkit].amount;
pp->InventoryAmount[INVENTORY_MEDKIT] = 1;
PlayerUpdateInventory(pp, INVENTORY_MEDKIT);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
// override for respawn mode
@ -5212,12 +5212,12 @@ KeyMain:
if (pp->InventoryAmount[INVENTORY_CHEMBOMB] < InventoryDecls[InvDecl_ChemBomb].amount)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_ChemBomb));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_ChemBomb));
pp->InventoryPercent[INVENTORY_CHEMBOMB] = 0;
pp->InventoryAmount[INVENTORY_CHEMBOMB]++;
PlayerUpdateInventory(pp, INVENTORY_CHEMBOMB);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGet(actor);
}
@ -5227,12 +5227,12 @@ KeyMain:
if (pp->InventoryAmount[INVENTORY_FLASHBOMB] < InventoryDecls[InvDecl_FlashBomb].amount)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_FlashBomb));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_FlashBomb));
pp->InventoryPercent[INVENTORY_FLASHBOMB] = 0;
pp->InventoryAmount[INVENTORY_FLASHBOMB]++;
PlayerUpdateInventory(pp, INVENTORY_FLASHBOMB);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGet(actor);
}
@ -5242,14 +5242,14 @@ KeyMain:
if (pp->InventoryAmount[INVENTORY_CALTROPS] < InventoryDecls[InvDecl_Caltrops].amount)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Caltrops));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Caltrops));
pp->InventoryPercent[INVENTORY_CALTROPS] = 0;
pp->InventoryAmount[INVENTORY_CALTROPS]+=3;
if (pp->InventoryAmount[INVENTORY_CALTROPS] > InventoryDecls[InvDecl_Caltrops].amount)
pp->InventoryAmount[INVENTORY_CALTROPS] = InventoryDecls[InvDecl_Caltrops].amount;
PlayerUpdateInventory(pp, INVENTORY_CALTROPS);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGet(actor);
}
@ -5258,12 +5258,12 @@ KeyMain:
case ICON_NIGHT_VISION:
if (!pp->InventoryAmount[INVENTORY_NIGHT_VISION] || pp->InventoryPercent[INVENTORY_NIGHT_VISION] < InventoryDecls[InvDecl_NightVision].amount)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_NightVision));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_NightVision));
pp->InventoryPercent[INVENTORY_NIGHT_VISION] = InventoryDecls[InvDecl_NightVision].amount;
pp->InventoryAmount[INVENTORY_NIGHT_VISION] = 1;
PlayerUpdateInventory(pp, INVENTORY_NIGHT_VISION);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGet(actor);
}
@ -5271,12 +5271,12 @@ KeyMain:
case ICON_REPAIR_KIT:
if (!pp->InventoryAmount[INVENTORY_REPAIR_KIT] || pp->InventoryPercent[INVENTORY_REPAIR_KIT] < InventoryDecls[InvDecl_RepairKit].amount)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_RepairKit));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_RepairKit));
pp->InventoryPercent[INVENTORY_REPAIR_KIT] = InventoryDecls[InvDecl_RepairKit].amount;
pp->InventoryAmount[INVENTORY_REPAIR_KIT] = 1;
PlayerUpdateInventory(pp, INVENTORY_REPAIR_KIT);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
// don't kill repair kit in coop
@ -5302,12 +5302,12 @@ KeyMain:
case ICON_CLOAK:
if (!pp->InventoryAmount[INVENTORY_CLOAK] || pp->InventoryPercent[INVENTORY_CLOAK] < InventoryDecls[InvDecl_Cloak].amount)
{
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Cloak));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_Cloak));
pp->InventoryPercent[INVENTORY_CLOAK] = InventoryDecls[InvDecl_Cloak].amount;
pp->InventoryAmount[INVENTORY_CLOAK] = 1;
PlayerUpdateInventory(pp, INVENTORY_CLOAK);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGet(actor);
}
@ -5325,10 +5325,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_STAR] >= DamageData[WPN_STAR].max_ammo)
break;
PutStringInfo(getPlayer(pnum), sw_darts? GStrings("TXTS_DARTS") : quoteMgr.GetQuote(QUOTE_WPNSHURIKEN));
PutStringInfo(pp, 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetWeapon(actor);
if (pp->WpnFlags & (BIT(WPN_STAR)))
@ -5352,10 +5352,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_MINE] >= DamageData[WPN_MINE].max_ammo)
break;
//sprintf(ds,"Sticky Bombs");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNSTICKY));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNSTICKY));
PlayerUpdateAmmo(pp, WPN_MINE, DamageData[WPN_MINE].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
ChoosePlayerGetSound(pp);
KillGetWeapon(actor);
@ -5381,11 +5381,11 @@ KeyMain:
if (pp->Flags & (PF_TWO_UZI) && pp->WpnAmmo[WPN_UZI] >= DamageData[WPN_UZI].max_ammo)
break;
//sprintf(ds,"UZI Submachine Gun");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNUZI));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNUZI));
// 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 == getPlayer(myconnectindex))
if (pp->pnum == 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlayerSound(DIGI_DOUBLEUZI, v3df_dontpan|v3df_follow, pp);
}
else
@ -5419,10 +5419,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_UZI] >= DamageData[WPN_UZI].max_ammo)
break;
//sprintf(ds,"UZI Clip");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMOUZI));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_AMMOUZI));
PlayerUpdateAmmo(pp, WPN_UZI, DamageData[WPN_UZI].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetAmmo(actor);
break;
@ -5437,11 +5437,11 @@ KeyMain:
if (pp->WpnFlags & (BIT(WPN_MICRO)) && pp->WpnAmmo[WPN_MICRO] >= DamageData[WPN_MICRO].max_ammo)
break;
//sprintf(ds,"Missile Launcher");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNLAUNCH));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNLAUNCH));
// 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
ChoosePlayerGetSound(pp);
KillGetWeapon(actor);
@ -5460,10 +5460,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_MICRO] >= DamageData[WPN_MICRO].max_ammo)
break;
//sprintf(ds,"Missiles");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMOLAUNCH));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_AMMOLAUNCH));
PlayerUpdateAmmo(pp, WPN_MICRO, DamageData[WPN_MICRO].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetAmmo(actor);
break;
@ -5472,12 +5472,12 @@ KeyMain:
if (pp->WpnRocketNuke != 1)
{
//sprintf(ds,"Nuclear Warhead");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNNUKE));
PutStringInfo(pp, 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
if (StdRandomRange(1000) > 800 && pp == getPlayer(myconnectindex))
if (StdRandomRange(1000) > 800 && pp->pnum == myconnectindex)
PlayerSound(DIGI_ILIKENUKES, v3df_dontpan|v3df_doppler|v3df_follow,pp);
if (pp->CurWpn == pp->Wpn[WPN_MICRO])
{
@ -5504,14 +5504,14 @@ KeyMain:
if (pp->WpnFlags & (BIT(WPN_GRENADE)) && pp->WpnAmmo[WPN_GRENADE] >= DamageData[WPN_GRENADE].max_ammo)
break;
//sprintf(ds,"Grenade Launcher");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNGRENADE));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNGRENADE));
// 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
//ChoosePlayerGetSound(pp);
if (StdRandomRange(1000) > 800 && pp == getPlayer(myconnectindex))
if (StdRandomRange(1000) > 800 && pp->pnum == myconnectindex)
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
KillGetWeapon(actor);
if (pp->WpnFlags & (BIT(WPN_GRENADE)))
@ -5529,10 +5529,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_GRENADE] >= DamageData[WPN_GRENADE].max_ammo)
break;
//sprintf(ds,"Grenade Shells");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMOGRENADE));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_AMMOGRENADE));
PlayerUpdateAmmo(pp, WPN_GRENADE, DamageData[WPN_GRENADE].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetAmmo(actor);
break;
@ -5574,12 +5574,12 @@ KeyMain:
if (pp->WpnFlags & (BIT(WPN_RAIL)) && pp->WpnAmmo[WPN_RAIL] >= DamageData[WPN_RAIL].max_ammo)
break;
//sprintf(ds,"Rail Gun");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNRAILGUN));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNRAILGUN));
PlayerUpdateAmmo(pp, WPN_RAIL, DamageData[WPN_RAIL].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
{
if (StdRandomRange(1000) > 700)
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
@ -5605,10 +5605,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_RAIL] >= DamageData[WPN_RAIL].max_ammo)
break;
//sprintf(ds,"Rail Gun Rods");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMORAILGUN));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_AMMORAILGUN));
PlayerUpdateAmmo(pp, WPN_RAIL, DamageData[WPN_RAIL].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetAmmo(actor);
break;
@ -5622,11 +5622,11 @@ KeyMain:
if (pp->WpnFlags & (BIT(WPN_SHOTGUN)) && pp->WpnAmmo[WPN_SHOTGUN] >= DamageData[WPN_SHOTGUN].max_ammo)
break;
//sprintf(ds,"Riot Gun");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNRIOT));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNRIOT));
// 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
ChoosePlayerGetSound(pp);
KillGetWeapon(actor);
@ -5645,10 +5645,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_SHOTGUN] >= DamageData[WPN_SHOTGUN].max_ammo)
break;
//sprintf(ds,"Shotshells");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMORIOT));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_AMMORIOT));
PlayerUpdateAmmo(pp, WPN_SHOTGUN, DamageData[WPN_SHOTGUN].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetAmmo(actor);
break;
@ -5689,13 +5689,13 @@ KeyMain:
if (pp->WpnFlags & (BIT(WPN_HOTHEAD)) && pp->WpnAmmo[WPN_HOTHEAD] >= DamageData[WPN_HOTHEAD].max_ammo)
break;
//sprintf(ds,"Guardian Head");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNHEAD));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNHEAD));
PlayerUpdateAmmo(pp, WPN_HOTHEAD, DamageData[WPN_HOTHEAD].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
//ChoosePlayerGetSound(pp);
if (StdRandomRange(1000) > 800 && pp == getPlayer(myconnectindex))
if (StdRandomRange(1000) > 800 && pp->pnum == myconnectindex)
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
KillGetWeapon(actor);
if (pp->WpnFlags & (BIT(WPN_HOTHEAD)))
@ -5715,10 +5715,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_HOTHEAD] >= DamageData[WPN_HOTHEAD].max_ammo)
break;
//sprintf(ds,"Firebursts");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMOHEAD));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_AMMOHEAD));
PlayerUpdateAmmo(pp, WPN_HOTHEAD, DamageData[WPN_HOTHEAD].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetAmmo(actor);
break;
@ -5734,13 +5734,13 @@ KeyMain:
if (pp->WpnFlags & (BIT(WPN_HEART)) && pp->WpnAmmo[WPN_HEART] >= DamageData[WPN_HEART].max_ammo)
break;
//sprintf(ds,"Ripper Heart");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_WPNRIPPER));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_WPNRIPPER));
PlayerUpdateAmmo(pp, WPN_HEART, DamageData[WPN_HEART].weapon_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
//ChoosePlayerGetSound(pp);
if (StdRandomRange(1000) > 800 && pp == getPlayer(myconnectindex))
if (StdRandomRange(1000) > 800 && pp->pnum == myconnectindex)
PlayerSound(DIGI_LIKEBIGWEAPONS, v3df_dontpan|v3df_doppler|v3df_follow,pp);
KillGetWeapon(actor);
if (pp->WpnFlags & (BIT(WPN_HEART)))
@ -5762,10 +5762,10 @@ KeyMain:
if (pp->WpnAmmo[WPN_HEART] >= DamageData[WPN_HEART].max_ammo)
break;
//sprintf(ds,"Deathcoils");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMORIPPER));
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_AMMORIPPER));
PlayerUpdateAmmo(pp, WPN_HEART, DamageData[WPN_HEART].ammo_pickup);
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGetAmmo(actor);
break;
@ -5774,10 +5774,10 @@ KeyMain:
if (pp->WpnRocketHeat != 5)
{
//sprintf(ds,"Heat Seeker Card");
PutStringInfo(getPlayer(pnum), quoteMgr.GetQuote(QUOTE_AMMONUKE));
PutStringInfo(pp, 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 == getPlayer(myconnectindex))
if (pp->pnum == myconnectindex)
PlaySound(DIGI_ITEM, actor, v3df_dontpan);
KillGet(actor);