about summary refs log tree commit diff
path: root/src/game/server/entities
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-12 21:41:16 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-12 21:41:16 +0000
commit123c5b5b9962f4af04ae2a0ca72fec668a1bea1e (patch)
tree77aa460967d62c22df18a0fe56486f1fcef6c9ed /src/game/server/entities
parent1d6668583a23b45724e9b107604c0dbfae433f10 (diff)
downloadzcatch-123c5b5b9962f4af04ae2a0ca72fec668a1bea1e.tar.gz
zcatch-123c5b5b9962f4af04ae2a0ca72fec668a1bea1e.zip
introduced 3 special pseudo weapons. game, self and world to make a difference on how you got killed
Diffstat (limited to 'src/game/server/entities')
-rw-r--r--src/game/server/entities/character.cpp4
-rw-r--r--src/game/server/entities/character.hpp7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp
index 479b1243..3bbe8670 100644
--- a/src/game/server/entities/character.cpp
+++ b/src/game/server/entities/character.cpp
@@ -550,7 +550,9 @@ void CHARACTER::tick()
 			col_get((int)(pos.x+phys_size/2), (int)(pos.y+phys_size/2))&COLFLAG_DEATH ||
 			col_get((int)(pos.x-phys_size/2), (int)(pos.y-phys_size/2))&COLFLAG_DEATH ||
 			col_get((int)(pos.x-phys_size/2), (int)(pos.y+phys_size/2))&COLFLAG_DEATH)
-		die(player->client_id, -1);
+	{
+		die(player->client_id, WEAPON_WORLD);
+	}
 
 	// handle weapons
 	handle_weapons();
diff --git a/src/game/server/entities/character.hpp b/src/game/server/entities/character.hpp
index bfb9d8c2..bd2f7afe 100644
--- a/src/game/server/entities/character.hpp
+++ b/src/game/server/entities/character.hpp
@@ -9,6 +9,13 @@
 
 #include <game/gamecore.hpp>
 
+enum
+{
+	WEAPON_GAME = -3, // team switching etc
+	WEAPON_SELF = -2, // console kill command
+	WEAPON_WORLD = -1, // death tiles etc
+};
+
 class CHARACTER : public ENTITY
 {
 	MACRO_ALLOC_POOL_ID()