Add isempty weapon functions to stop the hud selection from crashing.

This commit is contained in:
Marco Cawthorne 2023-01-17 11:58:35 -08:00
parent b43aa239d1
commit 7f848a6fde
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
20 changed files with 46 additions and 20 deletions

View File

@ -88,6 +88,12 @@ w_asscan_hudpic(player pl, int selected, vector pos, float a)
#endif
}
int
w_asscan_isempty(player pl)
{
return 0;
}
weapon_t w_asscan =
{
.name = "asscan",
@ -108,5 +114,6 @@ weapon_t w_asscan =
.pmodel = w_asscan_pmodel,
.deathmsg = w_asscan_deathmsg,
.aimanim = w_asscan_aimanim,
.hudpic = w_asscan_hudpic
.hudpic = w_asscan_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -191,5 +191,6 @@ weapon_t w_autorifle =
.pmodel = w_autorifle_pmodel,
.deathmsg = w_autorifle_deathmsg,
.aimanim = w_autorifle_aimanim,
.hudpic = w_autorifle_hudpic
.hudpic = w_autorifle_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -223,5 +223,6 @@ weapon_t w_crowbar =
.pmodel = w_crowbar_pmodel,
.deathmsg = w_crowbar_deathmsg,
.aimanim = w_crowbar_aimanim,
.hudpic = w_crowbar_hudpic
.hudpic = w_crowbar_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -211,5 +211,6 @@ weapon_t w_dbs =
.pmodel = w_dbs_pmodel,
.deathmsg = w_dbs_deathmsg,
.aimanim = w_dbs_aimanim,
.hudpic = w_dbs_hudpic
.hudpic = w_dbs_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_flamer =
.pmodel = w_flamer_pmodel,
.deathmsg = w_flamer_deathmsg,
.aimanim = w_flamer_aimanim,
.hudpic = w_flamer_hudpic
.hudpic = w_flamer_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_glauncher =
.pmodel = w_glauncher_pmodel,
.deathmsg = w_glauncher_deathmsg,
.aimanim = w_glauncher_aimanim,
.hudpic = w_glauncher_hudpic
.hudpic = w_glauncher_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_grapple =
.pmodel = w_grapple_pmodel,
.deathmsg = w_grapple_deathmsg,
.aimanim = w_grapple_aimanim,
.hudpic = w_grapple_hudpic
.hudpic = w_grapple_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_incendiary =
.pmodel = w_incendiary_pmodel,
.deathmsg = w_incendiary_deathmsg,
.aimanim = w_incendiary_aimanim,
.hudpic = w_incendiary_hudpic
.hudpic = w_incendiary_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_knife =
.pmodel = w_knife_pmodel,
.deathmsg = w_knife_deathmsg,
.aimanim = w_knife_aimanim,
.hudpic = w_knife_hudpic
.hudpic = w_knife_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_medkit =
.pmodel = w_medkit_pmodel,
.deathmsg = w_medkit_deathmsg,
.aimanim = w_medkit_aimanim,
.hudpic = w_medkit_hudpic
.hudpic = w_medkit_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -221,5 +221,6 @@ weapon_t w_nailgun =
.pmodel = w_nailgun_pmodel,
.deathmsg = w_nailgun_deathmsg,
.aimanim = w_nailgun_aimanim,
.hudpic = w_nailgun_hudpic
.hudpic = w_nailgun_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -111,5 +111,6 @@ weapon_t w_pipebomb =
.pmodel = w_pipebomb_pmodel,
.deathmsg = w_pipebomb_deathmsg,
.aimanim = w_pipebomb_aimanim,
.hudpic = w_pipebomb_hudpic
.hudpic = w_pipebomb_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_railgun =
.pmodel = w_railgun_pmodel,
.deathmsg = w_railgun_deathmsg,
.aimanim = w_railgun_aimanim,
.hudpic = w_railgun_hudpic
.hudpic = w_railgun_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -246,5 +246,6 @@ weapon_t w_rpg =
.pmodel = w_rpg_pmodel,
.deathmsg = w_rpg_deathmsg,
.aimanim = w_rpg_aimanim,
.hudpic = w_rpg_hudpic
.hudpic = w_rpg_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -200,5 +200,6 @@ weapon_t w_sbs =
.pmodel = w_sbs_pmodel,
.deathmsg = w_sbs_deathmsg,
.aimanim = w_sbs_aimanim,
.hudpic = w_sbs_hudpic
.hudpic = w_sbs_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_sniper =
.pmodel = w_sniper_pmodel,
.deathmsg = w_sniper_deathmsg,
.aimanim = w_sniper_aimanim,
.hudpic = w_sniper_hudpic
.hudpic = w_sniper_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_supernail =
.pmodel = w_supernail_pmodel,
.deathmsg = w_supernail_deathmsg,
.aimanim = w_supernail_aimanim,
.hudpic = w_supernail_hudpic
.hudpic = w_supernail_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -110,5 +110,6 @@ weapon_t w_tranquil =
.pmodel = w_tranquil_pmodel,
.deathmsg = w_tranquil_deathmsg,
.aimanim = w_tranquil_aimanim,
.hudpic = w_tranquil_hudpic
.hudpic = w_tranquil_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -229,5 +229,6 @@ weapon_t w_umbrella =
.pmodel = w_umbrella_pmodel,
.deathmsg = w_umbrella_deathmsg,
.aimanim = w_umbrella_aimanim,
.hudpic = w_umbrella_hudpic
.hudpic = w_umbrella_hudpic,
.isempty = w_asscan_isempty
};

View File

@ -246,5 +246,6 @@ weapon_t w_wrench =
.pmodel = w_wrench_pmodel,
.deathmsg = w_wrench_deathmsg,
.aimanim = w_wrench_aimanim,
.hudpic = w_wrench_hudpic
.hudpic = w_wrench_hudpic,
.isempty = w_asscan_isempty
};