From 7498c71ee50ef8e5512879324e7fc64cfc3f270b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 31 Jul 2001 17:08:59 +0000 Subject: [PATCH] fix the field stuck test and rename CONTENT_* to CONTENTS_* to match the server source. --- ai.qc | 8 ++++---- client.qc | 18 +++++++++--------- custom.qc | 4 ++-- defs.qc | 2 +- defs.qh | 12 ++++++------ demoman.qc | 2 +- demon.qc | 2 +- engineer.qc | 12 ++++++------ field.qc | 6 ++---- hook.qc | 2 +- jobs.qc | 2 +- misc.qc | 2 +- often.qc | 2 +- player.qc | 6 +++--- pyro.qc | 2 +- sbitems.qc | 16 ++++++++-------- security.qc | 16 ++++++++-------- sentry.qc | 12 ++++++------ spy.qc | 4 ++-- teleport.qc | 2 +- tesla.qc | 20 ++++++++++---------- tfortmap.qc | 22 +++++++++++----------- weapons.qc | 8 ++++---- 23 files changed, 90 insertions(+), 92 deletions(-) diff --git a/ai.qc b/ai.qc index ecb0e75..747d579 100644 --- a/ai.qc +++ b/ai.qc @@ -81,7 +81,7 @@ float(float v) anglemod = void(entity test) AI_Check_Contents = { //CH demons (and other ai) can be hurt by liquids //- OfN completely changed! - if (pointcontents(test.origin) == CONTENT_EMPTY && IsMonsterNonArmy(self) && self.health < self.max_health) + if (pointcontents(test.origin) == CONTENTS_EMPTY && IsMonsterNonArmy(self) && self.health < self.max_health) { // Heal it if (self.dmgtime < time) { @@ -114,7 +114,7 @@ void(entity test) AI_Check_Contents = //TF_T_Damage (self, world, world, 5, 0, TF_TD_ELECTRICITY); } } - if (pointcontents(test.origin) == CONTENT_LAVA) + if (pointcontents(test.origin) == CONTENTS_LAVA) { // do damage if (self.dmgtime < time) { @@ -158,7 +158,7 @@ void(entity test) AI_Check_Contents = } } } - else if (pointcontents(test.origin) == CONTENT_SLIME) + else if (pointcontents(test.origin) == CONTENTS_SLIME) { // do damage if (self.dmgtime < time) { @@ -193,7 +193,7 @@ void(entity test) AI_Check_Contents = /* WK Removed because water is ok for monsters, sheesh Whatever you think, ceaf it is. */ //- OfN - what the fuck means "ceaf"? heh - else if (pointcontents(test.origin) == CONTENT_WATER && allow_watermonsters == FALSE) + else if (pointcontents(test.origin) == CONTENTS_WATER && allow_watermonsters == FALSE) { if (self.classname == "monster_demon1") { // do damage diff --git a/client.qc b/client.qc index 918b7d3..64e8896 100644 --- a/client.qc +++ b/client.qc @@ -2320,9 +2320,9 @@ void() PlayerJump = if (self.waterlevel >= 2) { - if (self.watertype == CONTENT_WATER) + if (self.watertype == CONTENTS_WATER) self.velocity_z = 100; - else if (self.watertype == CONTENT_SLIME) + else if (self.watertype == CONTENTS_SLIME) self.velocity_z = 80; else self.velocity_z = 50; @@ -2435,7 +2435,7 @@ void() WaterMove = return; } - if (self.watertype == CONTENT_LAVA) + if (self.watertype == CONTENTS_LAVA) { // do damage if (self.dmgtime < time) { @@ -2448,7 +2448,7 @@ void() WaterMove = TF_T_Damage (self, world, world, 10*self.waterlevel, 0, TF_TD_FIRE); } } - else if (self.watertype == CONTENT_SLIME) + else if (self.watertype == CONTENTS_SLIME) { // do damage if (self.dmgtime < time && self.radsuit_finished < time) { @@ -2462,11 +2462,11 @@ void() WaterMove = { // player enter water sound if (!(self.cutf_items & CUTF_STEALTH)) - if (self.watertype == CONTENT_LAVA) + if (self.watertype == CONTENTS_LAVA) sound (self, CHAN_BODY, "player/inlava.wav", 1, ATTN_NORM); - else if (self.watertype == CONTENT_WATER) + else if (self.watertype == CONTENTS_WATER) sound (self, CHAN_BODY, "player/inh2o.wav", 1, ATTN_NORM); - else if (self.watertype == CONTENT_SLIME) + else if (self.watertype == CONTENTS_SLIME) sound (self, CHAN_BODY, "player/slimbrn2.wav", 1, ATTN_NORM); self.flags = self.flags + FL_INWATER; @@ -2524,7 +2524,7 @@ void() PlayerPreThink = if (self.is_feigning && self.waterlevel == 1) { - self.watertype = CONTENT_WATER; + self.watertype = CONTENTS_WATER; self.waterlevel = 3; } @@ -2991,7 +2991,7 @@ void() PlayerPostThink = // check to see if player landed and play landing sound if (self.takedamage && (self.jump_flag < -300) && (self.flags & FL_ONGROUND) && (self.health > 0)) { - if (self.watertype == CONTENT_WATER) + if (self.watertype == CONTENTS_WATER) { if (!(self.cutf_items & CUTF_STEALTH)) sound (self, CHAN_BODY, "player/h2ojump.wav", 1, ATTN_NORM); diff --git a/custom.qc b/custom.qc index f8cb32b..e678870 100644 --- a/custom.qc +++ b/custom.qc @@ -936,8 +936,8 @@ void(float cost, float type) BuyGren2 = //Functions for our new grenades void() fragspike_touch = { - //if (pointcontents(self.origin) == CONTENT_SKY) - if (pointcontents(self.origin) != CONTENT_EMPTY) + //if (pointcontents(self.origin) == CONTENTS_SKY) + if (pointcontents(self.origin) != CONTENTS_EMPTY) { dremove(self); return; diff --git a/defs.qc b/defs.qc index 9804e19..9bcb47f 100644 --- a/defs.qc +++ b/defs.qc @@ -564,7 +564,7 @@ void(vector where, float set) multicast = #82; // sends the temp message // to a set of clients, // possibly in PVS or PHS entity (entity ent) testentitypos = #92; -integer (entity ent, vector point) hullpointcontents = #93; +integer (entity ent, vector mins, vector maxs, vector point) hullpointcontents = #93; vector (integer hull, integer max) getboxbounds = #94; integer () getboxhull = #95; void (integer hull) freeboxhull = #96; diff --git a/defs.qh b/defs.qh index ce68834..56e7f8d 100644 --- a/defs.qh +++ b/defs.qh @@ -89,12 +89,12 @@ // point content values -#define CONTENT_EMPTY -1 -#define CONTENT_SOLID -2 -#define CONTENT_WATER -3 -#define CONTENT_SLIME -4 -#define CONTENT_LAVA -5 -#define CONTENT_SKY -6 +#define CONTENTS_EMPTY -1 +#define CONTENTS_SOLID -2 +#define CONTENTS_WATER -3 +#define CONTENTS_SLIME -4 +#define CONTENTS_LAVA -5 +#define CONTENTS_SKY -6 #define STATE_TOP 0 #define STATE_BOTTOM 1 diff --git a/demoman.qc b/demoman.qc index 0aac0f5..87a15d6 100644 --- a/demoman.qc +++ b/demoman.qc @@ -344,7 +344,7 @@ void() TeamFortress_DetpackExplode = // Check the pointcontents to prevent detpack outside the world pos = pointcontents(self.origin); - if (pos != CONTENT_SOLID && pos != CONTENT_SKY) + if (pos != CONTENTS_SOLID && pos != CONTENTS_SKY) { deathmsg = DMSG_DETPACK; T_RadiusDamage (self, self.owner, WEAP_DETPACK_SIZE, world); diff --git a/demon.qc b/demon.qc index fcbd470..724c09b 100644 --- a/demon.qc +++ b/demon.qc @@ -563,7 +563,7 @@ void() demon_fire_touch = { local float fire_dmg; fire_dmg = 60 + random()*40; - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { dremove(self); return; diff --git a/engineer.qc b/engineer.qc index 70ea61a..55f4db7 100644 --- a/engineer.qc +++ b/engineer.qc @@ -75,7 +75,7 @@ void() LaserBolt_Touch = if (other == self.enemy && self.enemy != world) return; // don't explode on same person twice - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { dremove(self); return; @@ -471,7 +471,7 @@ float(entity obj, entity builder) CheckArea = // Check the origin pos = pointcontents(obj.origin); - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) return FALSE; // Check the surrounding area @@ -480,7 +480,7 @@ float(entity obj, entity builder) CheckArea = src_z = obj.origin_z + obj.maxs_z + 16; // check upwards more pos = pointcontents(src); - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) return FALSE; end_x = obj.origin_x + obj.mins_x - 16; @@ -491,7 +491,7 @@ float(entity obj, entity builder) CheckArea = return FALSE; pos = pointcontents(end); - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) return FALSE; // extend the size a little @@ -500,7 +500,7 @@ float(entity obj, entity builder) CheckArea = src_z = obj.origin_z + obj.maxs_z + 16; pos = pointcontents(src); - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) return FALSE; end_x = obj.origin_x + obj.maxs_x + 16; @@ -513,7 +513,7 @@ float(entity obj, entity builder) CheckArea = return FALSE; pos = pointcontents(end); - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) return FALSE; // Trace a line from the player to the object too diff --git a/field.qc b/field.qc index 3c9c735..193e9de 100644 --- a/field.qc +++ b/field.qc @@ -142,7 +142,6 @@ void() Field_think = if (self.demon_one.fieldgen_status == FIELDGEN_ISWORKING) Field_MakeVisual(self); -#ifdef ALIGNED_FIELDGENS // checks for anything stuck in field :) local entity te; local float frange; @@ -170,9 +169,6 @@ void() Field_think = } te = te.chain; } -#else -# warning We do NOT have a test for being stuck in the field, so I am disabling it -#endif }; //============================================================================================= @@ -194,6 +190,8 @@ float(entity e1, entity e2) EntsTouching2 = if (e1.absmax_z < e2.absmin_z) return FALSE; + if (hullpointcontents (e2, e1.mins, e1.maxs, e1.origin) != CONTENTS_SOLID) + return FALSE; return TRUE; }; diff --git a/hook.qc b/hook.qc index 266b725..38b9bfa 100644 --- a/hook.qc +++ b/hook.qc @@ -288,7 +288,7 @@ void () Anchor_Grapple = // return; // Don't stick the the sky. - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { Reset_Grapple (self); return; diff --git a/jobs.qc b/jobs.qc index 5426c19..b8bff8c 100644 --- a/jobs.qc +++ b/jobs.qc @@ -861,7 +861,7 @@ void() GuerillaTossTouch = return; } - if (pointcontents(self.origin) == CONTENT_SKY || pointcontents(self.origin) == CONTENT_SOLID) //CH if in wall or sky + if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) //CH if in wall or sky { self.health = 0; //CH needed for tesla // OfN CAUSES ANY PROBLEM? Is this needed? diff --git a/misc.qc b/misc.qc index 7f52ecf..f4f2fa9 100644 --- a/misc.qc +++ b/misc.qc @@ -374,7 +374,7 @@ void() Laser_Touch = if (other == self.owner) return; // don't explode on owner - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { dremove(self); return; diff --git a/often.qc b/often.qc index 8980ea9..06e2a34 100644 --- a/often.qc +++ b/often.qc @@ -527,7 +527,7 @@ void() FlareGrenadeTouch = if (other == self.owner) return; // don't bounce on owner - if (pointcontents(self.origin) == CONTENT_SKY || pointcontents(self.origin) == CONTENT_SOLID) // if in wall or sky + if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) // if in wall or sky { dremove(self); return; diff --git a/player.qc b/player.qc index b0df238..c6b0ebb 100644 --- a/player.qc +++ b/player.qc @@ -849,7 +849,7 @@ local float rs; } // water pain sounds - if (self.watertype == CONTENT_WATER && self.waterlevel == 3) + if (self.watertype == CONTENTS_WATER && self.waterlevel == 3) { DeathBubbles(1); if (random() > 0.5) @@ -860,7 +860,7 @@ local float rs; } // slime pain sounds - if (self.watertype == CONTENT_SLIME) + if (self.watertype == CONTENTS_SLIME) { // FIX ME put in some steam here if (random() > 0.5) @@ -870,7 +870,7 @@ local float rs; return; } - if (self.watertype == CONTENT_LAVA) + if (self.watertype == CONTENTS_LAVA) { if (random() > 0.5) sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM); diff --git a/pyro.qc b/pyro.qc index f4197cd..9c1e761 100644 --- a/pyro.qc +++ b/pyro.qc @@ -801,7 +801,7 @@ void() T_IncendiaryTouch = if (other == self.owner) return; // don't explode on owner - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { remove(self); return; diff --git a/sbitems.qc b/sbitems.qc index a3b7415..10dec1e 100644 --- a/sbitems.qc +++ b/sbitems.qc @@ -321,26 +321,26 @@ void() MotionSensorTossTouch = { if (other != world || other == self.real_owner) return; - if (pointcontents(self.origin) == CONTENT_SKY || pointcontents(self.origin + '0 0 2') == CONTENT_SKY || pointcontents(self.origin) == CONTENT_SOLID) + if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin + '0 0 2') == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) { MotionSensorDie(); return; } //CH sees where landed and adjusts to proper things - if (pointcontents(self.origin + '0 0 1') == CONTENT_SOLID) + if (pointcontents(self.origin + '0 0 1') == CONTENTS_SOLID) self.origin = self.origin - '0 0 12'; - if (pointcontents(self.origin - '0 0 1') == CONTENT_SOLID) + if (pointcontents(self.origin - '0 0 1') == CONTENTS_SOLID) self.origin = self.origin + '0 0 4'; - if (pointcontents(self.origin + '0 1 0') == CONTENT_SOLID) + if (pointcontents(self.origin + '0 1 0') == CONTENTS_SOLID) self.origin = self.origin - '0 16 0'; - if (pointcontents(self.origin - '0 1 0') == CONTENT_SOLID) + if (pointcontents(self.origin - '0 1 0') == CONTENTS_SOLID) self.origin = self.origin + '0 16 0'; - if (pointcontents(self.origin + '1 0 0') == CONTENT_SOLID) + if (pointcontents(self.origin + '1 0 0') == CONTENTS_SOLID) self.origin = self.origin - '16 0 0'; - if (pointcontents(self.origin + '1 0 0') == CONTENT_SOLID) + if (pointcontents(self.origin + '1 0 0') == CONTENTS_SOLID) self.origin = self.origin + '16 0 0'; setorigin (self, self.origin); - if (pointcontents(self.origin) == CONTENT_SKY || pointcontents(self.origin + '0 0 2') == CONTENT_SKY || pointcontents(self.origin) == CONTENT_SOLID) + if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin + '0 0 2') == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) { MotionSensorDie(); return; diff --git a/security.qc b/security.qc index d6bfee0..e0d3544 100644 --- a/security.qc +++ b/security.qc @@ -263,26 +263,26 @@ void() SecurityCameraTossTouch = { if (other != world || other == self.real_owner) return; - if (pointcontents(self.origin) == CONTENT_SKY || pointcontents(self.origin + '0 0 2') == CONTENT_SKY || pointcontents(self.origin) == CONTENT_SOLID) + if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin + '0 0 2') == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) { Security_Camera_Die(); return; } //CH sees where landed and adjusts to proper things - if (pointcontents(self.origin + '0 0 1') == CONTENT_SOLID) + if (pointcontents(self.origin + '0 0 1') == CONTENTS_SOLID) self.origin = self.origin - '0 0 12'; - if (pointcontents(self.origin - '0 0 1') == CONTENT_SOLID) + if (pointcontents(self.origin - '0 0 1') == CONTENTS_SOLID) self.origin = self.origin + '0 0 4'; - if (pointcontents(self.origin + '0 1 0') == CONTENT_SOLID) + if (pointcontents(self.origin + '0 1 0') == CONTENTS_SOLID) self.origin = self.origin - '0 16 0'; - if (pointcontents(self.origin - '0 1 0') == CONTENT_SOLID) + if (pointcontents(self.origin - '0 1 0') == CONTENTS_SOLID) self.origin = self.origin + '0 16 0'; - if (pointcontents(self.origin + '1 0 0') == CONTENT_SOLID) + if (pointcontents(self.origin + '1 0 0') == CONTENTS_SOLID) self.origin = self.origin - '16 0 0'; - if (pointcontents(self.origin + '1 0 0') == CONTENT_SOLID) + if (pointcontents(self.origin + '1 0 0') == CONTENTS_SOLID) self.origin = self.origin + '16 0 0'; setorigin (self, self.origin); - if (pointcontents(self.origin) == CONTENT_SKY || pointcontents(self.origin + '0 0 2') == CONTENT_SKY || pointcontents(self.origin) == CONTENT_SOLID) + if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin + '0 0 2') == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) { Security_Camera_Die(); return; diff --git a/sentry.qc b/sentry.qc index b94167a..4c96a72 100644 --- a/sentry.qc +++ b/sentry.qc @@ -710,18 +710,18 @@ float() Sentry_Fire = float(vector vec) BadSpot = { /* - if (pointcontents(vec) == CONTENT_SOLID) + if (pointcontents(vec) == CONTENTS_SOLID) sprint(self.real_owner,PRINT_HIGH,"SOLID Point\n"); - else if (pointcontents(vec) == CONTENT_EMPTY) + else if (pointcontents(vec) == CONTENTS_EMPTY) sprint(self.real_owner,PRINT_HIGH,"EMPTY Point\n"); - else if (pointcontents(vec) == CONTENT_SKY) + else if (pointcontents(vec) == CONTENTS_SKY) sprint(self.real_owner,PRINT_HIGH,"SKY Point\n"); - else if (pointcontents(vec) == CONTENT_WATER) + else if (pointcontents(vec) == CONTENTS_WATER) sprint(self.real_owner,PRINT_HIGH,"WATER Point\n"); else sprint(self.real_owner,PRINT_HIGH,"BUG: Other Point\n"); */ - if (pointcontents(vec) == CONTENT_SKY) + if (pointcontents(vec) == CONTENTS_SKY) return TRUE; return FALSE; }; @@ -731,7 +731,7 @@ float(vector vec) BadSpot = void() Sentry_Touch = { //WK Check for blockage - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { sprint(self.real_owner, PRINT_HIGH, "Your sentry gun flew away.\n"); Sentry_Die(); diff --git a/spy.qc b/spy.qc index 3282886..2eb2b3c 100644 --- a/spy.qc +++ b/spy.qc @@ -664,7 +664,7 @@ void() GasGrenadeExplode = // Check the pointcontents to prevent detpack outside the world pos = pointcontents(self.origin); - if (pos == CONTENT_EMPTY) + if (pos == CONTENTS_EMPTY) { te = spawn(); te.think = GasGrenadeMakeGas; @@ -920,7 +920,7 @@ void() T_TranqDartTouch = if (other.solid == SOLID_TRIGGER) return; // trigger field, do nothing - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { dremove(self); return; diff --git a/teleport.qc b/teleport.qc index fc29802..5564f5f 100644 --- a/teleport.qc +++ b/teleport.qc @@ -172,7 +172,7 @@ void() Teleporter_heat_think = loc_y = loc_y + ((rint(random() * 3 + 1) * 16) - 32); pos = pointcontents(loc); - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) { TF_T_Damage(self, world, world, self.health+1, 0, 0); sprint (self.real_owner, PRINT_HIGH, "Not enough space for teleportation.\n"); diff --git a/tesla.qc b/tesla.qc index 5f438e0..a40ac25 100644 --- a/tesla.qc +++ b/tesla.qc @@ -635,7 +635,7 @@ void() Tesla_Touch = cheater = FALSE; //WK Check for blockage - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { sprint(self.real_owner, PRINT_HIGH, "Your sentry gun flew away.\n"); Tesla_Die(); @@ -676,15 +676,15 @@ void() Tesla_Touch = if (self.tf_items & NIT_TURRET && self.movetype == MOVETYPE_FLY) { //WK Check to see if we are blocked - if (pointcontents(self.origin) == CONTENT_SKY || - //pointcontents(self.origin - '0 0 10') == CONTENT_SKY || - //pointcontents(self.origin + '0 0 5') == CONTENT_SKY || - //pointcontents(self.origin + '0 0 10') == CONTENT_SKY || - //pointcontents(self.origin + '0 0 15') == CONTENT_SKY || - //pointcontents(self.origin + '0 0 20') == CONTENT_SKY || - //pointcontents(self.origin + '0 0 30') == CONTENT_SKY || - //pointcontents(self.origin + '0 0 40') == CONTENT_SKY || - pointcontents(self.origin + '0 0 70') == CONTENT_SKY) //- OfN + if (pointcontents(self.origin) == CONTENTS_SKY || + //pointcontents(self.origin - '0 0 10') == CONTENTS_SKY || + //pointcontents(self.origin + '0 0 5') == CONTENTS_SKY || + //pointcontents(self.origin + '0 0 10') == CONTENTS_SKY || + //pointcontents(self.origin + '0 0 15') == CONTENTS_SKY || + //pointcontents(self.origin + '0 0 20') == CONTENTS_SKY || + //pointcontents(self.origin + '0 0 30') == CONTENTS_SKY || + //pointcontents(self.origin + '0 0 40') == CONTENTS_SKY || + pointcontents(self.origin + '0 0 70') == CONTENTS_SKY) //- OfN { sprint(self.real_owner, PRINT_HIGH, "Your tesla flew away.\n"); Tesla_Die(); diff --git a/tfortmap.qc b/tfortmap.qc index 52dad99..4af5259 100644 --- a/tfortmap.qc +++ b/tfortmap.qc @@ -3127,11 +3127,11 @@ void() tfgoalitem_dropthink = { pos = pointcontents(self.origin); // find the location of the Item - if (pos == CONTENT_SLIME) + if (pos == CONTENTS_SLIME) self.nextthink = time + (self.pausetime / 4); - else if (pos == CONTENT_LAVA) + else if (pos == CONTENTS_LAVA) self.nextthink = time + 5; - else if (pos == CONTENT_SOLID || pos == CONTENT_SKY) // oh shit! + else if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) // oh shit! self.nextthink = time + 2; else self.nextthink = time + self.pausetime; @@ -3158,11 +3158,11 @@ void() tfgoalitem_dropthink2 = // { pos = pointcontents(self.origin); // find the location of the Item - if (pos == CONTENT_SLIME) + if (pos == CONTENTS_SLIME) self.nextthink = time + (self.pausetime / 4); - else if (pos == CONTENT_LAVA) + else if (pos == CONTENTS_LAVA) self.nextthink = time + 5; - else if (pos == CONTENT_SOLID || pos == CONTENT_SKY) // oh shit! + else if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) // oh shit! self.nextthink = time + 2; else self.nextthink = time + self.pausetime; @@ -3178,11 +3178,11 @@ void() tfgoalitem_dropthink2 = // { pos = pointcontents(self.origin); // find the location of the Item - if (pos == CONTENT_SLIME) + if (pos == CONTENTS_SLIME) setorigin(self, self.oldorigin); - else if (pos == CONTENT_LAVA) + else if (pos == CONTENTS_LAVA) setorigin(self, self.oldorigin); - else if (pos == CONTENT_SOLID || pos == CONTENT_SKY) // oh shit! + else if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) // oh shit! setorigin(self, self.oldorigin); else setorigin(self, self.origin); @@ -3613,7 +3613,7 @@ void() CTF_FlagCheck = { pos = pointcontents(te.origin); // find the location of the Flag - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) { RPrint("*****BUG*****\nFlag(s) outside world.\nPlease report this.\n"); te.nextthink = time + 0.2; @@ -3626,7 +3626,7 @@ void() CTF_FlagCheck = { pos = pointcontents(te.origin); // find the location of the Flag - if (pos == CONTENT_SOLID || pos == CONTENT_SKY) + if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY) { RPrint("*****BUG*****\nFlag(s) outside world.\nPlease report this.\n"); te.nextthink = time + 0.2; diff --git a/weapons.qc b/weapons.qc index fbc8558..bb1a8d2 100644 --- a/weapons.qc +++ b/weapons.qc @@ -1593,7 +1593,7 @@ void() T_MissileTouch = local float damg; local float bonus; - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { dremove(self); return; @@ -2238,7 +2238,7 @@ void() superspike_touch = if (other.solid == SOLID_TRIGGER) return; // trigger field, do nothing - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { dremove(self); return; @@ -2351,7 +2351,7 @@ void() spike_touch = if (other.solid == SOLID_TRIGGER) return; // trigger field, do nothing - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { dremove(self); return; @@ -4972,7 +4972,7 @@ void() HIP_LaserTouch = self.owner = world; self.cnt = self.cnt + 1; - if (pointcontents(self.origin) == CONTENT_SKY) + if (pointcontents(self.origin) == CONTENTS_SKY) { remove(self); return;