Module dpmod: Change committed
havoc at icculus.org
havoc at icculus.org
Tue Mar 11 14:21:35 EST 2003
Commiter : havoc
CVSROOT : /cvs/cvsroot/twilight
Module : dpmod
Commit time: 2003-03-11 19:21:35 UTC
Log message:
monsters are now worth frags
Modified files:
qc/t_damage.qc
------=MIME.4ef00c1298b660f246080b8280b58145
Content-Type: text/plain; name="dpmod.20030311.192135.havoc.diff"
Content-Disposition: attachment; filename="dpmod.20030311.192135.havoc.diff"
Content-Transfer-Encoding: 8bit
Index: dpmod/qc/t_damage.qc
diff -u dpmod/qc/t_damage.qc:1.4 dpmod/qc/t_damage.qc:1.5
--- dpmod/qc/t_damage.qc:1.4 Tue Nov 19 02:49:52 2002
+++ dpmod/qc/t_damage.qc Tue Mar 11 14:21:25 2003
@@ -61,6 +61,8 @@
// bump the monster counter
if (self.flags & FL_MONSTER && self.classname != "spawnedgrunt")
{
+ if (attacker.classname == "player")
+ attacker.frags = attacker.frags + 1;
killed_monsters = killed_monsters + 1;
WriteByte (MSG_ALL, SVC_KILLEDMONSTER);
}
@@ -134,11 +136,11 @@
if (force != '0 0 0') // trying to push?
if (targ.forcescale > 0) // can it be moved?
{
- if (targ.knockedloosefunc)
+ if (targ.flags & FL_ONGROUND)
{
- self = targ;
- targ.knockedloosefunc();
- self = oldself;
+ targ.flags = targ.flags - FL_ONGROUND;
+ tracebox(targ.origin, targ.mins, targ.maxs, targ.origin + '0 0 1', FALSE, targ);
+ setorigin(targ, trace_endpos);
}
if (targ.movetype != MOVETYPE_NONE)
if (targ.movetype != MOVETYPE_NOCLIP)
@@ -149,6 +151,12 @@
targ.punchvector = targ.punchvector + force * targ.forcescale * -0.2;
if (vlen(targ.punchvector) > 4)
targ.punchvector = normalize(targ.punchvector) * 4;
+ }
+ if (targ.knockedloosefunc)
+ {
+ self = targ;
+ targ.knockedloosefunc();
+ self = oldself;
}
}
More information about the twilight-commits
mailing list