if(self.owner.weaponname == "" || self.owner.deadflag != DEAD_NO)\r
return TRUE;\r
\r
+ float chase;\r
+ chase = other.cvar_chase_active;\r
+\r
if(other.spectatee_status && other.spectatee_status == num_for_edict(other.enemy))\r
other = other.enemy; // also do this for the player we are spectating\r
\r
- if not(other.cvar_chase_active || other.classname == "observer") // the observer check prevents a bug\r
+ if not(chase || other.classname == "observer") // the observer check prevents a bug\r
if(other.predator == self.owner || other.fakepredator == self.owner)\r
{\r
setmodel(self, "");\r
self.effects &~= EF_NODEPTHTEST;\r
if not(self.owner.stat_eaten)\r
setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3"));\r
- else if(cvar("g_vore_neighborprey_distance") && (other.predator == self.owner.predator || other.fakepredator == self.owner.predator) && !(other.cvar_chase_active || other.classname == "observer"))\r
+ else if(cvar("g_vore_neighborprey_distance") && (other.predator == self.owner.predator || other.fakepredator == self.owner.predator) && !(chase || other.classname == "observer"))\r
{\r
setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3")); // allow seeing neighboring prey's weapon model\r
self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST\r
if (self.clip_load >= self.reload_ammo_amount)\r
return;\r
// no ammo, so nothing to load\r
- if(!self.(self.current_ammo) && self.reload_ammo_min)\r
+ if(self.(self.current_ammo) < 1 && self.reload_ammo_min)\r
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)\r
{\r
if(clienttype(self) == CLIENTTYPE_REAL && self.reload_complain < time)\r
self.reload_complain = time + 1;\r
}\r
// switch away if the amount of ammo is not enough to keep using this weapon\r
- if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))\r
+ // disabled since we only have one weapon in VT, so nothing else to switch to if we're out of ammo\r
+ /*if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))\r
{\r
self.clip_load = -1; // reload later\r
W_SwitchToOtherWeapon(self);\r
- }\r
+ }*/\r
return;\r
}\r
\r
\r
// now begin the reloading process\r
\r
+ // weapon reload effects\r
+ if(self.weapon == WEP_GRABBER && self.clip_load >= 0) // only when we first begin reloading\r
+ {\r
+ vector org;\r
+ org = self.origin + self.view_ofs + self.weaponentity.spawnorigin_x * v_forward - self.weaponentity.spawnorigin_y * v_right + self.weaponentity.spawnorigin_z * v_up;\r
+ SpawnCasing (org, ((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1, self);\r
+ pointparticles(particleeffectnum("grabber_reload"), org, '0 0 0', 1);\r
+ }\r
sound (self, CHAN_WEAPON2, self.reload_sound, VOL_BASE, ATTN_NORM);\r
- if(self.weapon == WEP_GRABBER) // spawn grabber casting\r
- SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1, self);\r
\r
// do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon,\r
// then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there,\r