diff options
| author | Olle Rosenquist <phobos99@gmail.com> | 2007-07-22 11:53:15 +0000 |
|---|---|---|
| committer | Olle Rosenquist <phobos99@gmail.com> | 2007-07-22 11:53:15 +0000 |
| commit | 26dd1c20cee2bf814396cb941c6aea68e63d664f (patch) | |
| tree | 96b2ab24e5d5e59ba5b1108b6db090aa93e5c801 /src/game/server | |
| parent | 2165a728c25d804128933408cd8753c333be9ed3 (diff) | |
| download | zcatch-26dd1c20cee2bf814396cb941c6aea68e63d664f.tar.gz zcatch-26dd1c20cee2bf814396cb941c6aea68e63d664f.zip | |
Updated stuff
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/game_server.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/game/server/game_server.cpp b/src/game/server/game_server.cpp index a6884a58..6d026fb4 100644 --- a/src/game/server/game_server.cpp +++ b/src/game/server/game_server.cpp @@ -1640,6 +1640,13 @@ void mods_message(int msg, int client_id) msg_pack_end(); server_send_msg(-1); } + else if (msg == MSG_SWITCHTEAM) + { + // Switch team on given client and kill/respawn him + players[client_id].team = !players[client_id].team; + players[client_id].die(client_id, -1); + players[client_id].score--; + } } void mods_init() @@ -1662,19 +1669,19 @@ void mods_init() { case ITEM_WEAPON_GUN: type = POWERUP_TYPE_WEAPON; - subtype = WEAPON_TYPE_GUN; + subtype = WEAPON_GUN; break; case ITEM_WEAPON_SHOTGUN: type = POWERUP_TYPE_WEAPON; - subtype = WEAPON_TYPE_SHOTGUN; + subtype = WEAPON_SHOTGUN; break; case ITEM_WEAPON_ROCKET: type = POWERUP_TYPE_WEAPON; - subtype = WEAPON_TYPE_ROCKET; + subtype = WEAPON_ROCKET; break; case ITEM_WEAPON_HAMMER: type = POWERUP_TYPE_WEAPON; - subtype = WEAPON_TYPE_MELEE; + subtype = WEAPON_HAMMER; break; case ITEM_HEALTH: @@ -1684,6 +1691,10 @@ void mods_init() case ITEM_ARMOR: type = POWERUP_TYPE_ARMOR; break; + case ITEM_NINJA: + type = POWERUP_TYPE_NINJA; + subtype = WEAPON_NINJA; + break; }; powerup *ppower = new powerup(type, subtype); |