Server: Various Wall Weapon Improvements.

Make all wall weapons fullbright to fix visibility issues. Properly
precache W_BOWIE assets. Use grenade_bag.mdl instead of grenade world
model when using the grenade weapon.
This commit is contained in:
Steam Deck User 2022-12-30 10:55:32 -05:00
parent c25ad01a79
commit 4a41999915
3 changed files with 26 additions and 6 deletions

View file

@ -521,16 +521,21 @@ void() buy_weapon_link_target =
void() buy_weapon =
{
local string weaponname;
string weaponname;
InitTrigger ();
weaponname = GetWeaponModel (self.weapon, 0);
if (weaponname != "")
precache_model (weaponname);
weaponname = GetWeaponModel(self.weapon, 1);
// Use the grenade bag instead for nades
if (self.weapon == W_GRENADE)
weaponname = "models/props/grenade_bag.mdl";
else
weaponname = GetWeaponModel(self.weapon, 1);
if (weaponname != "")
precache_model (weaponname);
precache_extra (self.weapon);
self.touch = buy_weapon_touch;

View file

@ -254,7 +254,10 @@ void() use_wall_weapon =
newent.solid=SOLID_NOT;
newent.classname = "wall_weapon";
setorigin(newent, self.origin);
setmodel (newent, GetWeaponModel(self.sequence + 1, 1));
if (self.sequence + 1 != 26)
setmodel (newent, GetWeaponModel(self.sequence + 1, 1));
else
setmodel(newent, "models/props/grenade_bag.mdl");
setsize (newent, VEC_HULL2_MIN, VEC_HULL2_MAX);
newent.angles = self.angles;
@ -272,6 +275,7 @@ void() weapon_wall =
self.frame = self.sequence;
self.use = use_wall_weapon;
self.classname = "weapon_wall";
self.effects = EF_FULLBRIGHT;
//self.effects = EF_WEPLIGHT;
}

View file

@ -2442,9 +2442,20 @@ string(float wep, float gorvmodel) GetWeaponModel =
else
return ("models/weapons/type/v_type.mdl");
case W_GRENADE:
return ("models/weapons/grenade/g_grenade.mdl");
if (gorvmodel)
return ("models/weapons/grenade/g_grenade.mdl");
else
return ("models/weapons/grenade/v_grenade.mdl");
case W_BETTY:
return ("models/weapons/grenade/g_betty.mdl");
if (gorvmodel)
return ("models/weapons/grenade/g_betty.mdl");
else
return ("models/weapons/grenade/v_betty.mdl");
case W_BOWIE:
if (gorvmodel)
return ("models/weapons/knife/g_bowie.mdl");
else
return ("models/weapons/knife/v_bowie.mdl");
case W_DG3:
case W_TESLA:
if (gorvmodel)