// if damage was dealt with a bullet weapon, our effect is blood
// since blood is species dependent, include the species tag
- if(type == WEP_SHOTGUN || type == WEP_UZI || type == WEP_RIFLE)
+ if(type == WEP_SHOTGUN || type == WEP_UZI || type == WEP_RIFLE) // WEAPONTODO: when we kill shells and bullets, what happens to this?
{
if(self.isplayermodel)
{
}
e = spawn();
- setmodel(e, "null"); // necessary to attach and read origin // samual: FIXME: this is weird, is there some better way to do this?
+ setmodel(e, "null"); // necessary to attach and read origin
setattachment(e, self, gettaginfo_name); // attach to the given bone
e.classname = "damage";
e.owner = self;
w_random = prandom();
traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
- if(trace_fraction < 1 && hitwep != WEP_NEX && hitwep != WEP_MINSTANEX)
+ if(trace_fraction < 1 && hitwep != WEP_NEX && hitwep != WEP_VAPORIZER)
w_backoff = trace_plane_normal;
else
w_backoff = -1 * normalize(force);
setorigin(self, w_org + w_backoff * 2); // for sound() calls
- (get_weaponinfo(hitwep)).weapon_func(WR_IMPACTEFFECT);
+ WEP_ACTION(hitwep, WR_IMPACTEFFECT);
}
}
-
-void DamageInfo_Precache()
-{
- float i;
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
- (get_weaponinfo(i)).weapon_func(WR_PRECACHE);
-}