From dee6ee1a737ba933180dc701e518b86e3cdd2552 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 31 Mar 2021 13:42:36 +0200 Subject: [PATCH] Change pSeat references to pSeatLocal where applicable. --- src/client/defs.h | 83 +----------------- src/client/hud.qc | 164 +++++++++++++++++------------------ src/client/init.qc | 10 ++- src/client/nightvision.qc | 14 +-- src/client/player.qc | 105 ---------------------- src/shared/w_ak47.qc | 2 +- src/shared/w_aug.qc | 2 +- src/shared/w_awp.qc | 2 +- src/shared/w_c4bomb.qc | 2 +- src/shared/w_deagle.qc | 2 +- src/shared/w_elites.qc | 2 +- src/shared/w_fiveseven.qc | 2 +- src/shared/w_flashbang.qc | 2 +- src/shared/w_g3sg1.qc | 2 +- src/shared/w_glock18.qc | 2 +- src/shared/w_hegrenade.qc | 2 +- src/shared/w_m3.qc | 2 +- src/shared/w_m4a1.qc | 2 +- src/shared/w_mac10.qc | 2 +- src/shared/w_mp5.qc | 2 +- src/shared/w_p228.qc | 2 +- src/shared/w_p90.qc | 2 +- src/shared/w_para.qc | 2 +- src/shared/w_scout.qc | 2 +- src/shared/w_sg550.qc | 2 +- src/shared/w_sg552.qc | 2 +- src/shared/w_smokegrenade.qc | 2 +- src/shared/w_tmp.qc | 2 +- src/shared/w_ump45.qc | 2 +- src/shared/w_usp45.qc | 2 +- src/shared/w_xm1014.qc | 2 +- 31 files changed, 123 insertions(+), 305 deletions(-) diff --git a/src/client/defs.h b/src/client/defs.h index dd645cd..9f342be 100644 --- a/src/client/defs.h +++ b/src/client/defs.h @@ -50,46 +50,8 @@ var string g_cs_scope6; var string g_cs_scope7; var string g_cs_scope8; -var float SHELL_PISTOL; -var float SHELL_RIFLE; -var float SHELL_RIFLELARGE; - struct { - /* viewmodel stuff */ - entity m_eViewModel; - entity m_eMuzzleflash; - int m_iVMBones; - - void(void) m_pEventCall; - float m_flEventTime; - float m_flEventFrame; - - int m_iLastWeapon; - int m_iOldWeapon; - float m_flBobTime; - float m_flBob; - - /* damage overlay */ - float m_flDamageAlpha; - vector m_vecDamagePos; - - /* +zoomin cmd */ - int m_iZoomed; - float m_flZoomTime; - - /* player fields */ - entity m_ePlayer; - vector m_vecPredictedOrigin; - vector m_vecPredictedOriginOld; - vector m_vecPredictedVelocity; - float m_flPredictedFlags; - - /* camera fields */ - vector m_vecCameraOrigin; - vector m_vecCameraAngle; - float m_flCameraTime; - /* hud.c */ int m_iHealthOld; float m_flHealthAlpha; @@ -104,49 +66,6 @@ struct int m_iPickupWeapon; float m_flPickupAlpha; - /* This is seperated from the other VGUI stuff so we can check scores - * while buying and whatnot */ - int m_iScoresVisible; - int m_iHUDWeaponSelected; - float m_flHUDWeaponSelectTime; - - /* saturn controller */ - int m_iSaturnMenu; - - /* centerprint related */ - float m_flCenterprintAlpha; - float m_flCenterprintTime; - float m_iCenterprintLines; - string m_strCenterprintBuffer[18]; - - /* chat related */ - float m_flPrintTime; - string m_strPrintBuffer[5]; - int m_iPrintLines; - - int m_iInputAttack2; - int m_iInputReload; - int m_iInputUse; - int m_iInputDuck; - float m_flInputBlockTime; - - /* fading */ - float m_flFadeDuration; - float m_flFadeHold; - float m_flFadeMaxAlpha; - float m_flFadeStyle; - float m_flFadeAlpha; - float m_flFadeTime; - vector m_vecFadeColor; - int m_iFadeActive; - entity m_pWeaponFX; - - /* shake */ - float m_flShakeFreq; - float m_flShakeDuration; - float m_flShakeTime; - float m_flShakeAmp; - /* cstrike additions */ float m_iMoneyOld; float m_flMoneyAlpha; @@ -155,7 +74,7 @@ struct float m_flTimeAlpha; vector m_vecMoneyColor; int m_iNightvision; -} g_seats[4], *pSeat; +} g_seatslocal[4], *pSeatLocal; void HUD_DrawAmmo1(void); void HUD_DrawAmmo2(void); diff --git a/src/client/hud.qc b/src/client/hud.qc index 4e9e5b2..4a51275 100644 --- a/src/client/hud.qc +++ b/src/client/hud.qc @@ -162,24 +162,24 @@ HUD_DrawTimer(int spectator) drawsubpic(time_pos, [24,25], g_hud7_spr, [NUMSIZE_X * 6, NUMSIZE_Y * 3], [NUMSIZE_X, NUMSIZE_Y], [1,0,0], fAlpha, DRAWFLAG_ADDITIVE); drawsubpic(time_pos, [24,25], g_hud7_spr, [NUMSIZE_X * 6, NUMSIZE_Y * 3], [NUMSIZE_X, NUMSIZE_Y], g_hud_color, 1 - fAlpha, DRAWFLAG_ADDITIVE); } else { - if (iUnits != pSeat->m_iTimeUnitsOld) { - pSeat->m_flTimeAlpha = 1.0; + if (iUnits != pSeatLocal->m_iTimeUnitsOld) { + pSeatLocal->m_flTimeAlpha = 1.0; } - if (pSeat->m_flTimeAlpha >= HUD_ALPHA) { - pSeat->m_flTimeAlpha -= clframetime * 0.5; + if (pSeatLocal->m_flTimeAlpha >= HUD_ALPHA) { + pSeatLocal->m_flTimeAlpha -= clframetime * 0.5; } else { - pSeat->m_flTimeAlpha = HUD_ALPHA; + pSeatLocal->m_flTimeAlpha = HUD_ALPHA; } - HUD_DrawNumber(iMinutes, time_pos + [48,0], pSeat->m_flTimeAlpha, g_hud_color); - HUD_DrawNumber(iTens, time_pos + [75,0], pSeat->m_flTimeAlpha, g_hud_color); - HUD_DrawNumber(iUnits, time_pos + [95,0], pSeat->m_flTimeAlpha, g_hud_color); + HUD_DrawNumber(iMinutes, time_pos + [48,0], pSeatLocal->m_flTimeAlpha, g_hud_color); + HUD_DrawNumber(iTens, time_pos + [75,0], pSeatLocal->m_flTimeAlpha, g_hud_color); + HUD_DrawNumber(iUnits, time_pos + [95,0], pSeatLocal->m_flTimeAlpha, g_hud_color); - drawsubpic(time_pos + [70,6], [3,3], g_hud7_spr, [0.9375, 0], [0.01171875, 0.01171875], g_hud_color, pSeat->m_flTimeAlpha, DRAWFLAG_ADDITIVE); - drawsubpic(time_pos + [70,16], [3,3], g_hud7_spr, [0.9375, 0], [0.01171875, 0.01171875], g_hud_color, pSeat->m_flTimeAlpha, DRAWFLAG_ADDITIVE); + drawsubpic(time_pos + [70,6], [3,3], g_hud7_spr, [0.9375, 0], [0.01171875, 0.01171875], g_hud_color, pSeatLocal->m_flTimeAlpha, DRAWFLAG_ADDITIVE); + drawsubpic(time_pos + [70,16], [3,3], g_hud7_spr, [0.9375, 0], [0.01171875, 0.01171875], g_hud_color, pSeatLocal->m_flTimeAlpha, DRAWFLAG_ADDITIVE); - drawsubpic(time_pos, [24,25], g_hud7_spr, [NUMSIZE_X * 6, NUMSIZE_Y * 3], [NUMSIZE_X, NUMSIZE_Y], g_hud_color, pSeat->m_flTimeAlpha, DRAWFLAG_ADDITIVE); - pSeat->m_iTimeUnitsOld = iUnits; + drawsubpic(time_pos, [24,25], g_hud7_spr, [NUMSIZE_X * 6, NUMSIZE_Y * 3], [NUMSIZE_X, NUMSIZE_Y], g_hud_color, pSeatLocal->m_flTimeAlpha, DRAWFLAG_ADDITIVE); + pSeatLocal->m_iTimeUnitsOld = iUnits; } } @@ -192,31 +192,31 @@ HUD_DrawMoney(void) money_pos = g_hudmins + [g_hudres[0] - 160, g_hudres[1] - 72]; /* if the money differs from last frame, paint it appropriately */ - if (getstati(STAT_MONEY) > pSeat->m_iMoneyOld) { + if (getstati(STAT_MONEY) > pSeatLocal->m_iMoneyOld) { /* effect already in progress from something else, go add on top of it! */ - if (pSeat->m_flMoneyAlpha > 0) { - pSeat->m_iMoneyDelta += (pSeat->m_iMoneyOld - getstati(STAT_MONEY)); + if (pSeatLocal->m_flMoneyAlpha > 0) { + pSeatLocal->m_iMoneyDelta += (pSeatLocal->m_iMoneyOld - getstati(STAT_MONEY)); } else { - pSeat->m_iMoneyDelta = pSeat->m_iMoneyOld - getstati(STAT_MONEY); + pSeatLocal->m_iMoneyDelta = pSeatLocal->m_iMoneyOld - getstati(STAT_MONEY); } /* make it green for a short time */ - pSeat->m_vecMoneyColor = [0,1,0]; - pSeat->m_flMoneyAlpha = 1.0; - } else if (getstati(STAT_MONEY) < pSeat->m_iMoneyOld) { + pSeatLocal->m_vecMoneyColor = [0,1,0]; + pSeatLocal->m_flMoneyAlpha = 1.0; + } else if (getstati(STAT_MONEY) < pSeatLocal->m_iMoneyOld) { /* same one as above */ - if (pSeat->m_flMoneyAlpha > 0) { - pSeat->m_iMoneyDelta += (pSeat->m_iMoneyOld - getstati(STAT_MONEY)); + if (pSeatLocal->m_flMoneyAlpha > 0) { + pSeatLocal->m_iMoneyDelta += (pSeatLocal->m_iMoneyOld - getstati(STAT_MONEY)); } else { - pSeat->m_iMoneyDelta = pSeat->m_iMoneyOld - getstati(STAT_MONEY); + pSeatLocal->m_iMoneyDelta = pSeatLocal->m_iMoneyOld - getstati(STAT_MONEY); } /* make it red */ - pSeat->m_vecMoneyColor = [1,0,0]; - pSeat->m_flMoneyAlpha = 1.0; - pSeat->m_iMoneyDelta = pSeat->m_iMoneyOld - getstati(STAT_MONEY); + pSeatLocal->m_vecMoneyColor = [1,0,0]; + pSeatLocal->m_flMoneyAlpha = 1.0; + pSeatLocal->m_iMoneyDelta = pSeatLocal->m_iMoneyOld - getstati(STAT_MONEY); } /* maximum alpha is variable. */ - endalpha = pSeat->m_flMoneyAlpha * HUD_ALPHA; + endalpha = pSeatLocal->m_flMoneyAlpha * HUD_ALPHA; /* dollar sign */ drawsubpic( @@ -232,7 +232,7 @@ HUD_DrawMoney(void) /* if the alpha/color effect is active, draw the money twice in their * varying alphas/colors */ - if (pSeat->m_flMoneyAlpha > 0) { + if (pSeatLocal->m_flMoneyAlpha > 0) { /* red/green dollar sign */ drawsubpic( money_pos, @@ -240,27 +240,27 @@ HUD_DrawMoney(void) g_hud7_spr, [192/256, 24/256], [18/256, 26/256], - pSeat->m_vecMoneyColor, + pSeatLocal->m_vecMoneyColor, endalpha, DRAWFLAG_ADDITIVE ); /* draw the +/- symbols depending on whether * or not we made or lost money */ - if (pSeat->m_iMoneyDelta < 0) { - drawsubpic(money_pos + [0,-32], [18,23], g_hud7_spr, [0.8671875, 0.09765625], [0.0703125, 0.08984375], pSeat->m_vecMoneyColor, endalpha, DRAWFLAG_ADDITIVE); + if (pSeatLocal->m_iMoneyDelta < 0) { + drawsubpic(money_pos + [0,-32], [18,23], g_hud7_spr, [0.8671875, 0.09765625], [0.0703125, 0.08984375], pSeatLocal->m_vecMoneyColor, endalpha, DRAWFLAG_ADDITIVE); } else { - drawsubpic(money_pos + [0,-32], [13,23], g_hud7_spr, [0.8203125, 0.09765625], [0.05078125, 0.08984375], pSeat->m_vecMoneyColor, endalpha, DRAWFLAG_ADDITIVE); + drawsubpic(money_pos + [0,-32], [13,23], g_hud7_spr, [0.8203125, 0.09765625], [0.05078125, 0.08984375], pSeatLocal->m_vecMoneyColor, endalpha, DRAWFLAG_ADDITIVE); } /* shift the numbers for reverse drawing */ money_pos[0] += (24 * 5); /* draw the red/green overlay numbers on top of ours */ - HUD_DrawNums(getstati(STAT_MONEY), money_pos, endalpha, pSeat->m_vecMoneyColor); + HUD_DrawNums(getstati(STAT_MONEY), money_pos, endalpha, pSeatLocal->m_vecMoneyColor); /* draw above how much money we've lost/gotten from all this */ - HUD_DrawNums(fabs(pSeat->m_iMoneyDelta), money_pos + [0,-32], endalpha, pSeat->m_vecMoneyColor); + HUD_DrawNums(fabs(pSeatLocal->m_iMoneyDelta), money_pos + [0,-32], endalpha, pSeatLocal->m_vecMoneyColor); } else { money_pos[0] += (24 * 5); } @@ -273,8 +273,8 @@ HUD_DrawMoney(void) g_hud_color ); - pSeat->m_iMoneyOld = getstati(STAT_MONEY); - pSeat->m_flMoneyAlpha = max(0, pSeat->m_flMoneyAlpha - (clframetime * 0.5)); + pSeatLocal->m_iMoneyOld = getstati(STAT_MONEY); + pSeatLocal->m_flMoneyAlpha = max(0, pSeatLocal->m_flMoneyAlpha - (clframetime * 0.5)); } /* health */ @@ -284,14 +284,14 @@ HUD_DrawHealth(void) vector pos; player pl = (player)pSeat->m_ePlayer; - if (pl.health != pSeat->m_iHealthOld) { - pSeat->m_flHealthAlpha = 1.0; + if (pl.health != pSeatLocal->m_iHealthOld) { + pSeatLocal->m_flHealthAlpha = 1.0; } - if (pSeat->m_flHealthAlpha >= HUD_ALPHA) { - pSeat->m_flHealthAlpha -= clframetime * 0.5; + if (pSeatLocal->m_flHealthAlpha >= HUD_ALPHA) { + pSeatLocal->m_flHealthAlpha -= clframetime * 0.5; } else { - pSeat->m_flHealthAlpha = HUD_ALPHA; + pSeatLocal->m_flHealthAlpha = HUD_ALPHA; } pos = g_hudmins + [88, g_hudres[1] - 42]; @@ -303,10 +303,10 @@ HUD_DrawHealth(void) [spr_health[0], spr_health[1]], [spr_health[2], spr_health[3]], g_hud_color, - pSeat->m_flHealthAlpha, + pSeatLocal->m_flHealthAlpha, DRAWFLAG_ADDITIVE ); - HUD_DrawNums(pl.health, pos, pSeat->m_flHealthAlpha, g_hud_color); + HUD_DrawNums(pl.health, pos, pSeatLocal->m_flHealthAlpha, g_hud_color); } else { drawsubpic( pos + [-72,1], @@ -315,13 +315,13 @@ HUD_DrawHealth(void) [spr_health[0], spr_health[1]], [spr_health[2], spr_health[3]], [1,0,0], - pSeat->m_flHealthAlpha, + pSeatLocal->m_flHealthAlpha, DRAWFLAG_ADDITIVE ); - HUD_DrawNums(pl.health, pos, pSeat->m_flHealthAlpha, [1,0,0]); + HUD_DrawNums(pl.health, pos, pSeatLocal->m_flHealthAlpha, [1,0,0]); } - pSeat->m_iHealthOld = pl.health; + pSeatLocal->m_iHealthOld = pl.health; } /* armor/suit charge */ @@ -333,14 +333,14 @@ HUD_DrawArmor(void) pos = g_hudmins + [198, g_hudres[1] - 42]; - if (pl.armor != pSeat->m_iArmorOld) { - pSeat->m_flArmorAlpha = 1.0; + if (pl.armor != pSeatLocal->m_iArmorOld) { + pSeatLocal->m_flArmorAlpha = 1.0; } - if (pSeat->m_flArmorAlpha >= HUD_ALPHA) { - pSeat->m_flArmorAlpha -= clframetime * 0.5; + if (pSeatLocal->m_flArmorAlpha >= HUD_ALPHA) { + pSeatLocal->m_flArmorAlpha -= clframetime * 0.5; } else { - pSeat->m_flArmorAlpha = HUD_ALPHA; + pSeatLocal->m_flArmorAlpha = HUD_ALPHA; } if (pl.g_items & ITEM_HELMET) { @@ -351,7 +351,7 @@ HUD_DrawArmor(void) [spr_suit4[0], spr_suit4[1]], [spr_suit4[2], spr_suit4[3]], g_hud_color, - pSeat->m_flArmorAlpha, + pSeatLocal->m_flArmorAlpha, DRAWFLAG_ADDITIVE ); } else { @@ -362,7 +362,7 @@ HUD_DrawArmor(void) [spr_suit2[0], spr_suit2[1]], [spr_suit2[2], spr_suit2[3]], g_hud_color, - pSeat->m_flArmorAlpha, + pSeatLocal->m_flArmorAlpha, DRAWFLAG_ADDITIVE ); } @@ -377,7 +377,7 @@ HUD_DrawArmor(void) spr_suit3[1]], [spr_suit3[2], spr_suit3[3] * (pl.armor / 100)], g_hud_color, - pSeat->m_flArmorAlpha, + pSeatLocal->m_flArmorAlpha, DRAWFLAG_ADDITIVE ); } else { @@ -389,14 +389,14 @@ HUD_DrawArmor(void) spr_suit1[1]], [spr_suit1[2], spr_suit1[3] * (pl.armor / 100)], g_hud_color, - pSeat->m_flArmorAlpha, + pSeatLocal->m_flArmorAlpha, DRAWFLAG_ADDITIVE ); } } - HUD_DrawNums(pl.armor, pos, pSeat->m_flArmorAlpha, g_hud_color); - pSeat->m_iArmorOld = pl.armor; + HUD_DrawNums(pl.armor, pos, pSeatLocal->m_flArmorAlpha, g_hud_color); + pSeatLocal->m_iArmorOld = pl.armor; } /* magazine/clip ammo */ @@ -406,19 +406,19 @@ HUD_DrawAmmo1(void) player pl = (player)pSeat->m_ePlayer; vector pos; - if (pl.a_ammo1 != pSeat->m_iAmmo1Old) { - pSeat->m_flAmmo1Alpha = 1.0; - pSeat->m_iAmmo1Old = pl.a_ammo1; + if (pl.a_ammo1 != pSeatLocal->m_iAmmo1Old) { + pSeatLocal->m_flAmmo1Alpha = 1.0; + pSeatLocal->m_iAmmo1Old = pl.a_ammo1; } - if (pSeat->m_flAmmo1Alpha >= HUD_ALPHA) { - pSeat->m_flAmmo1Alpha -= clframetime * 0.5; + if (pSeatLocal->m_flAmmo1Alpha >= HUD_ALPHA) { + pSeatLocal->m_flAmmo1Alpha -= clframetime * 0.5; } else { - pSeat->m_flAmmo1Alpha = HUD_ALPHA; + pSeatLocal->m_flAmmo1Alpha = HUD_ALPHA; } pos = g_hudmins + [g_hudres[0] - 152, g_hudres[1] - 42]; - HUD_DrawNums(pl.a_ammo1, pos, pSeat->m_flAmmo1Alpha, g_hud_color); + HUD_DrawNums(pl.a_ammo1, pos, pSeatLocal->m_flAmmo1Alpha, g_hud_color); HUD_DrawSeperator(pos + [30,0]); } @@ -429,19 +429,19 @@ HUD_DrawAmmo2(void) player pl = (player)pSeat->m_ePlayer; vector pos; - if (pl.a_ammo2 != pSeat->m_iAmmo2Old) { - pSeat->m_flAmmo2Alpha = 1.0; - pSeat->m_iAmmo2Old = pl.a_ammo2; + if (pl.a_ammo2 != pSeatLocal->m_iAmmo2Old) { + pSeatLocal->m_flAmmo2Alpha = 1.0; + pSeatLocal->m_iAmmo2Old = pl.a_ammo2; } - if (pSeat->m_flAmmo2Alpha >= HUD_ALPHA) { - pSeat->m_flAmmo2Alpha -= clframetime * 0.5; + if (pSeatLocal->m_flAmmo2Alpha >= HUD_ALPHA) { + pSeatLocal->m_flAmmo2Alpha -= clframetime * 0.5; } else { - pSeat->m_flAmmo2Alpha = HUD_ALPHA; + pSeatLocal->m_flAmmo2Alpha = HUD_ALPHA; } pos = g_hudmins + [g_hudres[0] - 72, g_hudres[1] - 42]; - HUD_DrawNums(pl.a_ammo2, pos, pSeat->m_flAmmo2Alpha, g_hud_color); + HUD_DrawNums(pl.a_ammo2, pos, pSeatLocal->m_flAmmo2Alpha, g_hud_color); } /* special ammo */ @@ -451,19 +451,19 @@ HUD_DrawAmmo3(void) player pl = (player)pSeat->m_ePlayer; vector pos; - if (pl.a_ammo3 != pSeat->m_iAmmo3Old) { - pSeat->m_flAmmo3Alpha = 1.0; - pSeat->m_iAmmo3Old = pl.a_ammo3; + if (pl.a_ammo3 != pSeatLocal->m_iAmmo3Old) { + pSeatLocal->m_flAmmo3Alpha = 1.0; + pSeatLocal->m_iAmmo3Old = pl.a_ammo3; } - if (pSeat->m_flAmmo3Alpha >= HUD_ALPHA) { - pSeat->m_flAmmo3Alpha -= clframetime * 0.5; + if (pSeatLocal->m_flAmmo3Alpha >= HUD_ALPHA) { + pSeatLocal->m_flAmmo3Alpha -= clframetime * 0.5; } else { - pSeat->m_flAmmo3Alpha = HUD_ALPHA; + pSeatLocal->m_flAmmo3Alpha = HUD_ALPHA; } pos = g_hudmins + [g_hudres[0] - 72, g_hudres[1] - 74]; - HUD_DrawNums(pl.a_ammo3, pos, pSeat->m_flAmmo3Alpha, g_hud_color); + HUD_DrawNums(pl.a_ammo3, pos, pSeatLocal->m_flAmmo3Alpha, g_hud_color); } /* ammo bar */ @@ -632,20 +632,20 @@ HUD_DrawNotify(void) { vector pos; - if (pSeat->m_flPickupAlpha <= 0.0f) { + if (pSeatLocal->m_flPickupAlpha <= 0.0f) { return; } pos = g_hudmins + [g_hudres[0] - 192, g_hudres[1] - 128]; - Weapons_HUDPic(pSeat->m_iPickupWeapon, 1, pos, pSeat->m_flPickupAlpha); - pSeat->m_flPickupAlpha -= clframetime; + Weapons_HUDPic(pSeatLocal->m_iPickupWeapon, 1, pos, pSeatLocal->m_flPickupAlpha); + pSeatLocal->m_flPickupAlpha -= clframetime; } void HUD_WeaponPickupNotify(int w) { - pSeat->m_iPickupWeapon = w; - pSeat->m_flPickupAlpha = 1.0f; + pSeatLocal->m_iPickupWeapon = w; + pSeatLocal->m_flPickupAlpha = 1.0f; } /* main entry */ diff --git a/src/client/init.qc b/src/client/init.qc index bf40da1..8c94b97 100644 --- a/src/client/init.qc +++ b/src/client/init.qc @@ -133,9 +133,13 @@ ClientGame_RendererRestart(string rstr) g_cs_scope7 = spriteframe("sprites/bottom.spr", 0, 0.0f); g_cs_scope8 = spriteframe("sprites/bottom_right.spr", 0, 0.0f); - SHELL_PISTOL = getmodelindex("models/pshell.mdl"); - SHELL_RIFLE = getmodelindex("models/rshell.mdl"); - SHELL_RIFLELARGE = getmodelindex("models/rshell_big.mdl"); + precache_model("models/pshell.mdl"); + precache_model("models/rshell.mdl"); + precache_model("models/rshell_big.mdl"); + precache_model("models/shotgunshell.mdl"); + precache_model("sprites/muzzleflash1.spr"); + precache_model("sprites/muzzleflash2.spr"); + precache_model("sprites/muzzleflash3.spr"); Obituary_Precache(); diff --git a/src/client/nightvision.qc b/src/client/nightvision.qc index a9904a9..10403d8 100644 --- a/src/client/nightvision.qc +++ b/src/client/nightvision.qc @@ -20,13 +20,13 @@ Nightvision_Toggle(void) player pl = (player)pSeat->m_ePlayer; if (!(pl.g_items & ITEM_NIGHTVISION)) { - pSeat->m_iNightvision = 0; + pSeatLocal->m_iNightvision = 0; return; } - pSeat->m_iNightvision = 1 - pSeat->m_iNightvision; + pSeatLocal->m_iNightvision = 1 - pSeatLocal->m_iNightvision; - if (pSeat->m_iNightvision) + if (pSeatLocal->m_iNightvision) Sound_Play(self, CHAN_AUTO, "nvg.on"); else Sound_Play(self, CHAN_AUTO, "nvg.off"); @@ -37,11 +37,11 @@ Nightvision_PreFrame(void) { player pl = (player)pSeat->m_ePlayer; - if (!pSeat->m_iNightvision) + if (!pSeatLocal->m_iNightvision) return; if (!(pl.g_items & ITEM_NIGHTVISION)) { - pSeat->m_iNightvision = 0; + pSeatLocal->m_iNightvision = 0; return; } @@ -53,11 +53,11 @@ Nightvision_PostFrame(void) { player pl = (player)pSeat->m_ePlayer; - if (!pSeat->m_iNightvision) + if (!pSeatLocal->m_iNightvision) return; if (!(pl.g_items & ITEM_NIGHTVISION)) { - pSeat->m_iNightvision = 0; + pSeatLocal->m_iNightvision = 0; return; } diff --git a/src/client/player.qc b/src/client/player.qc index 42bacf9..af12e09 100644 --- a/src/client/player.qc +++ b/src/client/player.qc @@ -42,108 +42,3 @@ Player_PreDraw(base_player pl, int thirdperson) } } } - -void -Player_ReceiveEntity(float new) -{ - float fl; - player pl = (player)self; - - if (new == TRUE) { - spawnfunc_player(); - pl.classname = "player"; - pl.solid = SOLID_SLIDEBOX; - pl.drawmask = MASK_ENGINE; - pl.customphysics = Empty; - setsize(pl, VEC_HULL_MIN, VEC_HULL_MAX); - } else { - int i; - //FIXME: splitscreen - if (pl.entnum == player_localentnum) { - //FIXME: splitscreen - pSeat = &g_seats[0]; - for (i = pl.sequence+1; i <= servercommandframe; i++) { - if (!getinputstate(i)) { - break; //erk?... too old? - } - input_sequence = i; - PMove_Run(); - } - - /* any differences in things that are read below are now - * officially from prediction misses. */ - } - } - - pl.sequence = servercommandframe; - - fl = readfloat(); - - /* HACK: we need to make this more reliable */ - if (fl == UPDATE_ALL) { - /* we respawned */ - pl.gravity = __NULL__; - } - - if (fl & PLAYER_MODELINDEX) - pl.modelindex = readshort(); - - if (fl & PLAYER_ORIGIN) { - pl.origin[0] = readcoord(); - pl.origin[1] = readcoord(); - } - - if (fl & PLAYER_ORIGIN_Z) - pl.origin[2] = readcoord(); - if (fl & PLAYER_ANGLES_X) - pl.pitch = readfloat(); - if (fl & PLAYER_ANGLES_Y) - pl.angles[1] = readfloat(); - if (fl & PLAYER_ANGLES_Z) - pl.angles[2] = readfloat(); - - if (fl & PLAYER_VELOCITY) { - pl.velocity[0] = readcoord(); - pl.velocity[1] = readcoord(); - } - - if (fl & PLAYER_VELOCITY_Z) - pl.velocity[2] = readcoord(); - if (fl & PLAYER_FLAGS) { - pl.flags = readfloat(); - pl.gflags = readfloat(); - } - if (fl & PLAYER_WEAPON) - pl.activeweapon = readbyte(); - if (fl & PLAYER_ITEMS) - pl.g_items = (__variant)readfloat(); - if (fl & PLAYER_HEALTH) - pl.health = readbyte(); - if (fl & PLAYER_ARMOR) - pl.armor = readbyte(); - if (fl & PLAYER_MOVETYPE) - pl.movetype = readbyte(); - if (fl & PLAYER_VIEWOFS) - pl.view_ofs[2] = readfloat(); - if (fl & PLAYER_BASEFRAME) { - pl.baseframe = readbyte(); - pl.baseframe1time = 0.0f; - pl.baseframe2time = 0.0f; - } - if (fl & PLAYER_FRAME) - pl.frame = readbyte(); - - if (fl & PLAYER_AMMO1) - pl.a_ammo1 = readbyte(); - if (fl & PLAYER_AMMO2) - pl.a_ammo2 = readbyte(); - if (fl & PLAYER_AMMO3) - pl.a_ammo3 = readbyte(); - - if (fl & PLAYER_CSSHOT) - pl.cs_shotmultiplier = readbyte(); - if (fl & PLAYER_CSSHOTTIME) - pl.cs_shottime = readfloat(); - - setorigin(pl, pl.origin); -} diff --git a/src/shared/w_ak47.qc b/src/shared/w_ak47.qc index 8738f16..674c078 100644 --- a/src/shared/w_ak47.qc +++ b/src/shared/w_ak47.qc @@ -243,7 +243,7 @@ w_ak47_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_aug.qc b/src/shared/w_aug.qc index f626174..115ddc5 100644 --- a/src/shared/w_aug.qc +++ b/src/shared/w_aug.qc @@ -235,7 +235,7 @@ w_aug_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_awp.qc b/src/shared/w_awp.qc index 9096840..5091dfb 100644 --- a/src/shared/w_awp.qc +++ b/src/shared/w_awp.qc @@ -286,7 +286,7 @@ w_awp_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [24/256,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [24/256,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_c4bomb.qc b/src/shared/w_c4bomb.qc index 48c89a3..b481e29 100644 --- a/src/shared/w_c4bomb.qc +++ b/src/shared/w_c4bomb.qc @@ -176,7 +176,7 @@ w_c4bomb_hud(void) #ifdef CLIENT HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_deagle.qc b/src/shared/w_deagle.qc index 33d6f33..ef0dc85 100644 --- a/src/shared/w_deagle.qc +++ b/src/shared/w_deagle.qc @@ -247,7 +247,7 @@ w_deagle_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [24/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [24/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_elites.qc b/src/shared/w_elites.qc index 14753d5..367c231 100644 --- a/src/shared/w_elites.qc +++ b/src/shared/w_elites.qc @@ -310,7 +310,7 @@ w_elites_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_fiveseven.qc b/src/shared/w_fiveseven.qc index e99f229..0e699b1 100644 --- a/src/shared/w_fiveseven.qc +++ b/src/shared/w_fiveseven.qc @@ -215,7 +215,7 @@ w_fiveseven_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [120/256,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [120/256,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_flashbang.qc b/src/shared/w_flashbang.qc index 47d712e..eab4bc1 100644 --- a/src/shared/w_flashbang.qc +++ b/src/shared/w_flashbang.qc @@ -223,7 +223,7 @@ w_flashbang_hud(void) HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_g3sg1.qc b/src/shared/w_g3sg1.qc index 8fea89e..5e222bc 100644 --- a/src/shared/w_g3sg1.qc +++ b/src/shared/w_g3sg1.qc @@ -227,7 +227,7 @@ w_g3sg1_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_glock18.qc b/src/shared/w_glock18.qc index 05fafab..bf65117 100644 --- a/src/shared/w_glock18.qc +++ b/src/shared/w_glock18.qc @@ -285,7 +285,7 @@ w_glock18_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_hegrenade.qc b/src/shared/w_hegrenade.qc index 5c651e1..d593b80 100644 --- a/src/shared/w_hegrenade.qc +++ b/src/shared/w_hegrenade.qc @@ -225,7 +225,7 @@ w_hegrenade_hud(void) HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_m3.qc b/src/shared/w_m3.qc index 1681f65..8f2cf66 100644 --- a/src/shared/w_m3.qc +++ b/src/shared/w_m3.qc @@ -272,7 +272,7 @@ w_m3_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_m4a1.qc b/src/shared/w_m4a1.qc index 848acd7..9a8050d 100644 --- a/src/shared/w_m4a1.qc +++ b/src/shared/w_m4a1.qc @@ -262,7 +262,7 @@ w_m4a1_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_mac10.qc b/src/shared/w_mac10.qc index e96da3f..e2bfa06 100644 --- a/src/shared/w_mac10.qc +++ b/src/shared/w_mac10.qc @@ -210,7 +210,7 @@ w_mac10_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_mp5.qc b/src/shared/w_mp5.qc index ad78465..dd991e0 100644 --- a/src/shared/w_mp5.qc +++ b/src/shared/w_mp5.qc @@ -210,7 +210,7 @@ w_mp5_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_p228.qc b/src/shared/w_p228.qc index 1335601..8cbd07b 100644 --- a/src/shared/w_p228.qc +++ b/src/shared/w_p228.qc @@ -219,7 +219,7 @@ w_p228_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [120/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [120/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_p90.qc b/src/shared/w_p90.qc index 2a3c856..596183e 100644 --- a/src/shared/w_p90.qc +++ b/src/shared/w_p90.qc @@ -210,7 +210,7 @@ w_p90_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [120/256,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [120/256,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_para.qc b/src/shared/w_para.qc index f66366c..d669052 100644 --- a/src/shared/w_para.qc +++ b/src/shared/w_para.qc @@ -206,7 +206,7 @@ w_para_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_scout.qc b/src/shared/w_scout.qc index b739beb..5c0fd02 100644 --- a/src/shared/w_scout.qc +++ b/src/shared/w_scout.qc @@ -251,7 +251,7 @@ w_scout_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_sg550.qc b/src/shared/w_sg550.qc index 7c5f5f5..279e6a5 100644 --- a/src/shared/w_sg550.qc +++ b/src/shared/w_sg550.qc @@ -227,7 +227,7 @@ w_sg550_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_sg552.qc b/src/shared/w_sg552.qc index 11a179d..7dfc91d 100644 --- a/src/shared/w_sg552.qc +++ b/src/shared/w_sg552.qc @@ -235,7 +235,7 @@ w_sg552_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_smokegrenade.qc b/src/shared/w_smokegrenade.qc index bcdb701..30f786e 100644 --- a/src/shared/w_smokegrenade.qc +++ b/src/shared/w_smokegrenade.qc @@ -221,7 +221,7 @@ w_smokegrenade_hud(void) #ifdef CLIENT HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [144/256,96/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [144/256,96/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_tmp.qc b/src/shared/w_tmp.qc index d2c35b8..f5508af 100644 --- a/src/shared/w_tmp.qc +++ b/src/shared/w_tmp.qc @@ -212,7 +212,7 @@ w_tmp_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [48/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_ump45.qc b/src/shared/w_ump45.qc index 1765b79..3507c61 100644 --- a/src/shared/w_ump45.qc +++ b/src/shared/w_ump45.qc @@ -212,7 +212,7 @@ w_ump45_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_usp45.qc b/src/shared/w_usp45.qc index c37f80f..d1a3540 100644 --- a/src/shared/w_usp45.qc +++ b/src/shared/w_usp45.qc @@ -294,7 +294,7 @@ w_usp45_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [96/256,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif } diff --git a/src/shared/w_xm1014.qc b/src/shared/w_xm1014.qc index 6bcaab0..bfba027 100644 --- a/src/shared/w_xm1014.qc +++ b/src/shared/w_xm1014.qc @@ -272,7 +272,7 @@ w_xm1014_hud(void) HUD_DrawAmmo1(); HUD_DrawAmmo2(); vector aicon_pos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 42]; - drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,72/256], [24/256, 24/256], g_hud_color, pSeat->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); + drawsubpic(aicon_pos, [24,24], g_hud7_spr, [0,72/256], [24/256, 24/256], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE); #endif }