]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/damage.qc
Rename minstanex to vaporizer
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / damage.qc
index cc3653db4d2deb21a79aaa188112f83b7e3ae6ec..4526673486c8c92a7ed860e08fe3e5ccb7d4ff6c 100644 (file)
@@ -88,7 +88,7 @@ void DamageEffect(vector hitorg, float dmg, float type, float specnum)
 
        // 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)
                {
@@ -100,7 +100,7 @@ void DamageEffect(vector hitorg, float dmg, float type, float specnum)
        }
 
        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;
@@ -344,19 +344,12 @@ void Ent_DamageInfo(float isNew)
                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);
-}