From: Mario Date: Thu, 19 Feb 2015 09:12:31 +0000 (+1100) Subject: Shoot rockets through doors X-Git-Tag: xonotic-v0.8.1~38^2~30 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=50f206abc4e204dd468c2eb810744ff3717d89dc;p=xonotic%2Fxonotic-data.pk3dir.git Shoot rockets through doors --- diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 1d306fede..51236fdbb 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -469,6 +469,7 @@ void Ent_Projectile() if(!(self.count & 0x80)) InterpolateOrigin_Note(); + self.classname = "csqcprojectile"; self.draw = Projectile_Draw; self.entremove = Ent_RemoveProjectile; } diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index 9c5a625e1..3b831a237 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -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; diff --git a/qcsrc/common/triggers/triggers.qc b/qcsrc/common/triggers/triggers.qc index 62306a603..a8a5a03c1 100644 --- a/qcsrc/common/triggers/triggers.qc +++ b/qcsrc/common/triggers/triggers.qc @@ -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)