r4855 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Oct 24 03:48:07 EDT 2008
Author: div0
Date: 2008-10-24 03:48:04 -0400 (Fri, 24 Oct 2008)
New Revision: 4855
Modified:
trunk/data/qcsrc/server/g_triggers.qc
trunk/data/qcsrc/server/t_halflife.qc
trunk/data/qcsrc/server/t_jumppads.qc
trunk/data/qcsrc/server/t_plats.qc
Log:
change "player" checks to "iscreature" checks so one can have e.g. crates that push buttons
Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc 2008-10-24 07:46:23 UTC (rev 4854)
+++ trunk/data/qcsrc/server/g_triggers.qc 2008-10-24 07:48:04 UTC (rev 4855)
@@ -54,9 +54,12 @@
//
if (activator.classname == "player" && self.message != "")
{
- centerprint (activator, self.message);
- if (!self.noise)
- play2(activator, "misc/talk.wav");
+ if(clienttype(activator) == CLIENTTYPE_REAL)
+ {
+ centerprint (activator, self.message);
+ if (!self.noise)
+ play2(activator, "misc/talk.wav");
+ }
}
//
@@ -174,7 +177,7 @@
{
if not(self.spawnflags & 2)
{
- if (other.classname != "player")
+ if not(other.iscreature)
return;
if(self.team)
@@ -762,7 +765,7 @@
if(self.enemy.target != "") // DETECTOR laser
{
traceline(self.origin, o, MOVE_NORMAL, self);
- if(trace_ent.classname == "player")
+ if(trace_ent.iscreature)
{
self.pusher = trace_ent;
if(!self.count)
@@ -915,7 +918,7 @@
float str;
// FIXME: Better checking for what to push and not.
- if (other.classname != "player")
+ if not(other.iscreature)
if (other.classname != "corpse")
if (other.classname != "body")
if (other.classname != "gib")
@@ -929,7 +932,7 @@
if (other.classname != "droppedweapon")
return;
- if (other.deadflag && other.classname == "player")
+ if (other.deadflag && other.iscreature)
return;
EXACTTRIGGER_TOUCH;
@@ -963,7 +966,7 @@
float pushdeltatime;
// FIXME: Better checking for what to push and not.
- if (other.classname != "player")
+ if not(other.iscreature)
if (other.classname != "corpse")
if (other.classname != "body")
if (other.classname != "gib")
@@ -977,7 +980,7 @@
if (other.classname != "droppedweapon")
return;
- if (other.deadflag && other.classname == "player")
+ if (other.deadflag && other.iscreature)
return;
EXACTTRIGGER_TOUCH;
@@ -1000,7 +1003,7 @@
float str;
// FIXME: Better checking for what to push and not.
- if (other.classname != "player")
+ if not(other.iscreature)
if (other.classname != "corpse")
if (other.classname != "body")
if (other.classname != "gib")
@@ -1014,7 +1017,7 @@
if (other.classname != "droppedweapon")
return;
- if (other.deadflag && other.classname == "player")
+ if (other.deadflag && other.iscreature)
return;
EXACTTRIGGER_TOUCH;
Modified: trunk/data/qcsrc/server/t_halflife.qc
===================================================================
--- trunk/data/qcsrc/server/t_halflife.qc 2008-10-24 07:46:23 UTC (rev 4854)
+++ trunk/data/qcsrc/server/t_halflife.qc 2008-10-24 07:48:04 UTC (rev 4855)
@@ -37,7 +37,7 @@
void func_ladder_touch()
{
- if (other.classname != "player")
+ if not(other.iscreature)
return;
EXACTTRIGGER_TOUCH;
Modified: trunk/data/qcsrc/server/t_jumppads.qc
===================================================================
--- trunk/data/qcsrc/server/t_jumppads.qc 2008-10-24 07:46:23 UTC (rev 4854)
+++ trunk/data/qcsrc/server/t_jumppads.qc 2008-10-24 07:48:04 UTC (rev 4855)
@@ -104,7 +104,7 @@
void trigger_push_touch()
{
// FIXME: add a .float for whether an entity should be tossed by jumppads
- if (other.classname != "player")
+ if (!other.iscreature)
if (other.classname != "corpse")
if (other.classname != "body")
if (other.classname != "gib")
@@ -118,7 +118,7 @@
if (other.classname != "droppedweapon")
return;
- if (other.deadflag && other.classname == "player")
+ if (other.deadflag && other.iscreature)
return;
EXACTTRIGGER_TOUCH;
@@ -152,12 +152,12 @@
other.(jumppadsused[mod(other.jumppadcount, NUM_JUMPPADSUSED)]) = self;
other.jumppadcount = other.jumppadcount + 1;
}
+
+ if(self.message)
+ centerprint(other, self.message);
}
else
other.jumppadcount = TRUE;
-
- if(self.message)
- centerprint(other, self.message);
}
if(self.enemy.target)
Modified: trunk/data/qcsrc/server/t_plats.qc
===================================================================
--- trunk/data/qcsrc/server/t_plats.qc 2008-10-24 07:46:23 UTC (rev 4854)
+++ trunk/data/qcsrc/server/t_plats.qc 2008-10-24 07:48:04 UTC (rev 4855)
@@ -77,7 +77,7 @@
void plat_center_touch()
{
- if (other.classname != "player")
+ if not(other.iscreature)
return;
if (other.health <= 0)
@@ -92,7 +92,7 @@
void plat_outside_touch()
{
- if (other.classname != "player")
+ if not(other.iscreature)
return;
if (other.health <= 0)
@@ -505,7 +505,7 @@
// }
if (!other)
return;
- if (other.classname != "player")
+ if not(other.iscreature)
return;
if(other.velocity * self.movedir < 0)
return;
@@ -809,7 +809,7 @@
*/
void door_touch()
{
- if (other.classname != "player")
+ if not(other.iscreature)
return;
if (self.owner.attack_finished_single > time)
return;
@@ -1207,7 +1207,7 @@
*/
void secret_touch()
{
- if (activator.classname != "player")
+ if not(other.iscreature)
return;
if (self.attack_finished_single > time)
return;
More information about the nexuiz-commits
mailing list