]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Shoot rockets through doors
authorMario <zacjardine@y7mail.com>
Thu, 19 Feb 2015 09:12:31 +0000 (20:12 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 19 Feb 2015 09:12:31 +0000 (20:12 +1100)
qcsrc/client/weapons/projectile.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/triggers.qc

index 1d306fede6d6ce8733529821d373a7e16a371a0f..51236fdbba356deaa00b7656cb30c4a26ceda998 100644 (file)
@@ -469,6 +469,7 @@ void Ent_Projectile()
        if(!(self.count & 0x80))
                InterpolateOrigin_Note();
 
+       self.classname = "csqcprojectile";
        self.draw = Projectile_Draw;
        self.entremove = Ent_RemoveProjectile;
 }
index 9c5a625e1ba861995593d1af49fca3145db925a2..3b831a237cdc5e93a0e8019a8a311bec457bf867 100644 (file)
@@ -450,7 +450,7 @@ void door_trigger_touch()
 #ifdef SVQC
                if (!(other.iscreature && !PHYS_DEAD(other)))
 #elif defined(CSQC)
-               if(!(IS_CLIENT(other) && !PHYS_DEAD(other)))
+               if(!((IS_CLIENT(other) || other.classname == "csqcprojectile") && !PHYS_DEAD(other)))
 #endif
                        return;
 
index 62306a6033eb91f6d5bd04eeb6c9370115313796..a8a5a03c183abe12579b792a04530b025975fa63 100644 (file)
@@ -52,6 +52,9 @@ void trigger_common_write(bool withtarget)
        WriteCoord(MSG_ENTITY, self.mins_x);
        WriteCoord(MSG_ENTITY, self.mins_y);
        WriteCoord(MSG_ENTITY, self.mins_z);
+       WriteCoord(MSG_ENTITY, self.maxs_x);
+       WriteCoord(MSG_ENTITY, self.maxs_y);
+       WriteCoord(MSG_ENTITY, self.maxs_z);
 
        WriteCoord(MSG_ENTITY, self.movedir_x);
        WriteCoord(MSG_ENTITY, self.movedir_y);
@@ -251,7 +254,7 @@ void trigger_touch_generic(void() touchfunc)
 {
        entity e;
        for(e = findradius((self.absmin + self.absmax) * 0.5, vlen(self.absmax - self.absmin) * 0.5 + 1); e; e = e.chain)
-       if(e.isplayermodel)
+       if(e.isplayermodel || e.classname == "csqcprojectile")
        {
                vector emin = e.absmin, emax = e.absmax;
                if(self.solid == SOLID_BSP)