Valve & Mods: Fixed Hud_SlotSelect bug in which you could weapons you did
not have in your inventory.
This commit is contained in:
parent
b8621deea5
commit
163ac1993d
5 changed files with 5 additions and 4 deletions
|
@ -125,7 +125,7 @@ void HUD_SlotSelect(int slot)
|
|||
/* weren't in that slot? select the first one then */
|
||||
if (curslot != slot) {
|
||||
for (i = 1; i < g_weapons.length; i++) {
|
||||
if (g_weapons[i].slot == slot) {
|
||||
if (g_weapons[i].slot == slot && pl.g_items & g_weapons[i].id) {
|
||||
pSeat->fHUDWeaponSelected = i;
|
||||
pSeat->fHUDWeaponSelectTime = time + 3;
|
||||
break;
|
||||
|
|
|
@ -131,7 +131,7 @@ void HUD_SlotSelect(int slot)
|
|||
/* weren't in that slot? select the first one then */
|
||||
if (curslot != slot) {
|
||||
for (i = 1; i < g_weapons.length; i++) {
|
||||
if (g_weapons[i].slot == slot) {
|
||||
if (g_weapons[i].slot == slot && pl.g_items & g_weapons[i].id) {
|
||||
pSeat->fHUDWeaponSelected = i;
|
||||
pSeat->fHUDWeaponSelectTime = time + 3;
|
||||
break;
|
||||
|
|
|
@ -133,7 +133,7 @@ void HUD_SlotSelect(int slot)
|
|||
/* weren't in that slot? select the first one then */
|
||||
if (curslot != slot) {
|
||||
for (i = 1; i < g_weapons.length; i++) {
|
||||
if (g_weapons[i].slot == slot) {
|
||||
if (g_weapons[i].slot == slot && pl.g_items & g_weapons[i].id) {
|
||||
pSeat->fHUDWeaponSelected = i;
|
||||
pSeat->fHUDWeaponSelectTime = time + 3;
|
||||
break;
|
||||
|
|
|
@ -125,7 +125,7 @@ void HUD_SlotSelect(int slot)
|
|||
/* weren't in that slot? select the first one then */
|
||||
if (curslot != slot) {
|
||||
for (i = 1; i < g_weapons.length; i++) {
|
||||
if (g_weapons[i].slot == slot) {
|
||||
if (g_weapons[i].slot == slot && pl.g_items & g_weapons[i].id) {
|
||||
pSeat->fHUDWeaponSelected = i;
|
||||
pSeat->fHUDWeaponSelectTime = time + 3;
|
||||
break;
|
||||
|
|
|
@ -110,6 +110,7 @@ Gamerules_Spawn(player pl)
|
|||
|
||||
if (cvar("sv_playerslots") == 1 || cvar("coop") == 1) {
|
||||
if (startspot != "") {
|
||||
print(sprintf("^1Gamerules_Spawn: Startspot is %s\n", startspot));
|
||||
Gamerules_DecodeChangeParms(pl);
|
||||
setorigin(pl, Landmark_GetSpot());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue