mirror of
https://github.com/nzp-team/quakec.git
synced 2025-01-31 13:40:52 +00:00
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:
parent
c25ad01a79
commit
4a41999915
3 changed files with 26 additions and 6 deletions
|
@ -521,16 +521,21 @@ void() buy_weapon_link_target =
|
||||||
|
|
||||||
void() buy_weapon =
|
void() buy_weapon =
|
||||||
{
|
{
|
||||||
local string weaponname;
|
string weaponname;
|
||||||
InitTrigger ();
|
InitTrigger ();
|
||||||
|
|
||||||
weaponname = GetWeaponModel (self.weapon, 0);
|
weaponname = GetWeaponModel (self.weapon, 0);
|
||||||
if (weaponname != "")
|
if (weaponname != "")
|
||||||
precache_model (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 != "")
|
if (weaponname != "")
|
||||||
precache_model (weaponname);
|
precache_model (weaponname);
|
||||||
|
|
||||||
|
|
||||||
precache_extra (self.weapon);
|
precache_extra (self.weapon);
|
||||||
self.touch = buy_weapon_touch;
|
self.touch = buy_weapon_touch;
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,10 @@ void() use_wall_weapon =
|
||||||
newent.solid=SOLID_NOT;
|
newent.solid=SOLID_NOT;
|
||||||
newent.classname = "wall_weapon";
|
newent.classname = "wall_weapon";
|
||||||
setorigin(newent, self.origin);
|
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);
|
setsize (newent, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||||
newent.angles = self.angles;
|
newent.angles = self.angles;
|
||||||
|
|
||||||
|
@ -272,6 +275,7 @@ void() weapon_wall =
|
||||||
self.frame = self.sequence;
|
self.frame = self.sequence;
|
||||||
self.use = use_wall_weapon;
|
self.use = use_wall_weapon;
|
||||||
self.classname = "weapon_wall";
|
self.classname = "weapon_wall";
|
||||||
|
self.effects = EF_FULLBRIGHT;
|
||||||
//self.effects = EF_WEPLIGHT;
|
//self.effects = EF_WEPLIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2442,9 +2442,20 @@ string(float wep, float gorvmodel) GetWeaponModel =
|
||||||
else
|
else
|
||||||
return ("models/weapons/type/v_type.mdl");
|
return ("models/weapons/type/v_type.mdl");
|
||||||
case W_GRENADE:
|
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:
|
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_DG3:
|
||||||
case W_TESLA:
|
case W_TESLA:
|
||||||
if (gorvmodel)
|
if (gorvmodel)
|
||||||
|
|
Loading…
Reference in a new issue