From 50f206abc4e204dd468c2eb810744ff3717d89dc Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 19 Feb 2015 20:12:31 +1100 Subject: [PATCH] Shoot rockets through doors --- qcsrc/client/weapons/projectile.qc | 1 + qcsrc/common/triggers/func/door.qc | 2 +- qcsrc/common/triggers/triggers.qc | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) 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) -- 2.39.2