diff --git a/src/client/hud.qc b/src/client/hud.qc index 7e69065..45a0247 100644 --- a/src/client/hud.qc +++ b/src/client/hud.qc @@ -292,7 +292,7 @@ HUD_Draw(void) Damage_Draw(); HUD_DamageNotify_Draw(); HUD_DrawHealth(); - HUD_DrawWeaponSelect(); + pSeatLocal->weaponSelectionHUD.Draw(); } void diff --git a/src/client/init.qc b/src/client/init.qc index d2d328f..b8ff84b 100644 --- a/src/client/init.qc +++ b/src/client/init.qc @@ -25,6 +25,12 @@ void ClientGame_Init(float apilevel, string enginename, float engineversion) { Obituary_Init(); + + registercommand("lastinv"); + registercommand("invnext"); + registercommand("invprev"); + + pSeatLocal->weaponSelectionHUD = spawn(HLWeaponSelect); } void diff --git a/src/client/progs.src b/src/client/progs.src index 2942c3a..0c3e982 100644 --- a/src/client/progs.src +++ b/src/client/progs.src @@ -32,6 +32,7 @@ entities.qc ../../../valve/src/client/hud_dmgnotify.qc ../../../valve/src/client/hud_ammonotify.qc ../../../valve/src/client/hud_itemnotify.qc +../../../valve/src/client/HLWeaponSelect.qc hud.qc hud_weaponselect.qc ../../../valve/src/client/hud_sprite.qc diff --git a/zpak001.pk3dir/decls/def/weapons/aicore.def b/zpak001.pk3dir/decls/def/weapons/aicore.def index 0e9b53f..9652f8b 100644 --- a/zpak001.pk3dir/decls/def/weapons/aicore.def +++ b/zpak001.pk3dir/decls/def/weapons/aicore.def @@ -11,5 +11,5 @@ entityDef weapon_aicore "model_view" "models/v_aicore.mdl" "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" - "hudSlot" "1" + "hudSlotPos" "1" } diff --git a/zpak001.pk3dir/decls/def/weapons/beamgun.def b/zpak001.pk3dir/decls/def/weapons/beamgun.def index 154d605..edf7ac7 100644 --- a/zpak001.pk3dir/decls/def/weapons/beamgun.def +++ b/zpak001.pk3dir/decls/def/weapons/beamgun.def @@ -12,5 +12,5 @@ entityDef weapon_beamgun "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "70" - "hudSlot" "5" + "hudSlotPos" "5" } diff --git a/zpak001.pk3dir/decls/def/weapons/chemicalgun.def b/zpak001.pk3dir/decls/def/weapons/chemicalgun.def index 61c8ec4..2fc818d 100644 --- a/zpak001.pk3dir/decls/def/weapons/chemicalgun.def +++ b/zpak001.pk3dir/decls/def/weapons/chemicalgun.def @@ -12,5 +12,5 @@ entityDef weapon_SPchemicalgun "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "80" - "hudSlot" "8" + "hudSlotPos" "8" } diff --git a/zpak001.pk3dir/decls/def/weapons/dml.def b/zpak001.pk3dir/decls/def/weapons/dml.def index ddd506b..251c9e2 100644 --- a/zpak001.pk3dir/decls/def/weapons/dml.def +++ b/zpak001.pk3dir/decls/def/weapons/dml.def @@ -12,5 +12,5 @@ entityDef weapon_dml "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "40" - "hudSlot" "6" + "hudSlotPos" "6" } diff --git a/zpak001.pk3dir/decls/def/weapons/fists.def b/zpak001.pk3dir/decls/def/weapons/fists.def index 50a41e8..4d1aa63 100644 --- a/zpak001.pk3dir/decls/def/weapons/fists.def +++ b/zpak001.pk3dir/decls/def/weapons/fists.def @@ -12,7 +12,7 @@ entityDef weapon_fists "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "10" - "hudSlot" "0" + "hudSlotPos" "0" "def_fireInfo" "fireInfo_fists" "def_altFireInfo" "fireInfo_knife" diff --git a/zpak001.pk3dir/decls/def/weapons/gausspistol.def b/zpak001.pk3dir/decls/def/weapons/gausspistol.def index c2715fa..fec246e 100644 --- a/zpak001.pk3dir/decls/def/weapons/gausspistol.def +++ b/zpak001.pk3dir/decls/def/weapons/gausspistol.def @@ -12,7 +12,7 @@ entityDef weapon_gausspistol "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "30" - "hudSlot" "2" + "hudSlotPos" "2" "def_fireInfo" "fireInfo_gausscharge" "inv_ammo_gauss" "20" diff --git a/zpak001.pk3dir/decls/def/weapons/grenade.def b/zpak001.pk3dir/decls/def/weapons/grenade.def index adb7d04..9b6cb4a 100644 --- a/zpak001.pk3dir/decls/def/weapons/grenade.def +++ b/zpak001.pk3dir/decls/def/weapons/grenade.def @@ -12,5 +12,5 @@ entityDef weapon_dmlGrenade "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "20" - "hudSlot" "7" + "hudSlotPos" "7" } diff --git a/zpak001.pk3dir/decls/def/weapons/minigun.def b/zpak001.pk3dir/decls/def/weapons/minigun.def index 22e39c5..f656c79 100644 --- a/zpak001.pk3dir/decls/def/weapons/minigun.def +++ b/zpak001.pk3dir/decls/def/weapons/minigun.def @@ -12,7 +12,7 @@ entityDef weapon_minigun "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "60" - "hudSlot" "4" + "hudSlotPos" "4" "def_fireInfo" "fireInfo_minigun" "def_altFireInfo" "fireInfo_minigun_spinning" diff --git a/zpak001.pk3dir/decls/def/weapons/shotgun.def b/zpak001.pk3dir/decls/def/weapons/shotgun.def index db404dd..0404106 100644 --- a/zpak001.pk3dir/decls/def/weapons/shotgun.def +++ b/zpak001.pk3dir/decls/def/weapons/shotgun.def @@ -12,7 +12,7 @@ entityDef weapon_shotgun "snd_acquire" "weapon.pickup" "snd_respawn" "item.respawn" "weight" "50" - "hudSlot" "3" + "hudSlotPos" "3" "def_fireInfo" "fireInfo_shotgun" "snd_fire" "weapon_shotgun.fire"