From 77104345b0db82e9407ab88c5fc4a60f131f5ba7 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Mon, 7 Feb 2005 19:39:06 +0000 Subject: [PATCH] made kill command work git-svn-id: svn://svn.icculus.org/nexuiz/trunk@287 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/gamec/cl_client.c | 2 +- qcsrc/gamec/constants.h | 1 + qcsrc/gamec/g_damage.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/gamec/cl_client.c b/qcsrc/gamec/cl_client.c index 0f2606d34..9ecabbb42 100644 --- a/qcsrc/gamec/cl_client.c +++ b/qcsrc/gamec/cl_client.c @@ -187,7 +187,7 @@ Called when a client types 'kill' in the console */ void ClientKill (void) { - + Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0'); } /* diff --git a/qcsrc/gamec/constants.h b/qcsrc/gamec/constants.h index 67283548c..7fbf14764 100644 --- a/qcsrc/gamec/constants.h +++ b/qcsrc/gamec/constants.h @@ -136,6 +136,7 @@ float DEATH_DROWN = 10002; float DEATH_HURTTRIGGER = 10003; float DEATH_LAVA = 10004; float DEATH_SLIME = 10005; +float DEATH_KILL = 10006; float IT_LASER = 4096; float IT_SHOTGUN = 1; diff --git a/qcsrc/gamec/g_damage.c b/qcsrc/gamec/g_damage.c index c07ddb638..6d57b831a 100644 --- a/qcsrc/gamec/g_damage.c +++ b/qcsrc/gamec/g_damage.c @@ -23,6 +23,8 @@ void Obituary (entity attacker, entity targ, float deathtype) bprint (s, " should have used a different weapon\n"); else if (deathtype == IT_ROCKET_LAUNCHER) bprint (s, " exploded\n"); + else if (deathtype == DEATH_KILL) + bprint (s, " couldn't take it anymore\n"); else bprint (s, " competes for the Darwin awards\n"); -- 2.39.2