]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/throwing.qc
Purge most of the weaponentities[0] cases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / throwing.qc
index fe59b5bfbbc3a5f45a494021ad41960df96ac41f..b120c302f246f1f0fcfbaf4bfa0662595e28c520 100644 (file)
@@ -20,7 +20,7 @@ void thrown_wep_think(entity this)
                this.SendFlags |= ISF_LOCATION;
                this.oldorigin = this.origin;
        }
-       this.owner = world;
+       this.owner = NULL;
        float timeleft = this.savenextthink - time;
        if(timeleft > 1)
                SUB_SetFade(this, this.savenextthink - 1, 1);
@@ -165,7 +165,7 @@ bool W_IsWeaponThrowable(entity this, int w)
 }
 
 // toss current weapon
-void W_ThrowWeapon(entity this, vector velo, vector delta, float doreduce)
+void W_ThrowWeapon(entity this, .entity weaponentity, vector velo, vector delta, float doreduce)
 {
        Weapon w = PS(this).m_weapon;
        if (w == WEP_Null)
@@ -174,7 +174,6 @@ void W_ThrowWeapon(entity this, vector velo, vector delta, float doreduce)
                return;
        if(!autocvar_g_weapon_throwable)
                return;
-       .entity weaponentity = weaponentities[0]; // TODO: unhardcode
        if(this.(weaponentity).state != WS_READY)
                return;
        if(!W_IsWeaponThrowable(this, w.m_id))