From 886882882c8cc60e440c03f22006f1c27f29fee2 Mon Sep 17 00:00:00 2001 From: Paradox460 Date: Tue, 24 Jun 2008 19:54:29 +0000 Subject: [PATCH] Changed mara obituary to something a little better (this time its done server side) (Issue 125) Added Amanieu's fireworks thing (Issue 126) Makefile builds shared libaries now Updated wiki pages to reflect amanieu_fireworks --- src/game/g_admin.c | 37 +++++++++++++++++++++++++++++++++++++ src/game/g_admin.h | 1 + src/game/g_combat.c | 2 ++ src/game/g_main.c | 2 +- 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/game/g_admin.c b/src/game/g_admin.c index b2a68b8..85f4ea1 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -69,6 +69,11 @@ g_admin_cmd_t g_admin_cmds[ ] = "makes everyone ready in intermission", "" }, + + {"fireworks", G_admin_fireworks, "Y", + "Play the ending animation for the current map", + "[^3a|h^7]" + }, {"ban", G_admin_ban, "b", "ban a player by IP and GUID with an optional expiration time and reason." @@ -7672,3 +7677,35 @@ if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) ) return qtrue; } + +qboolean G_admin_fireworks( gentity_t *ent, int skiparg ) +{ + char teamName[2] = {""}; + pTeam_t team; + int i; + + if( G_SayArgc() > 2 + skiparg ) + { + ADMP( "^3!fireworks: ^7usage: !fireworks [a|h]\n" ); + return qfalse; + } + G_SayArgv( 1 + skiparg, teamName, sizeof( teamName ) ); + if( teamName[ 0 ] == 'a' || teamName[ 0 ] == 'A' ) + team = PTE_ALIENS; + else if( teamName[ 0 ] == 'h' || teamName[ 0 ] == 'H' ) + team = PTE_HUMANS; + else + team = PTE_NONE; + for( i = 1, ent = g_entities + i ; i < level.num_entities ; i++, ent++ ) + { + if( !ent->inuse ) + continue; + + if( !Q_stricmp( ent->classname, "trigger_win" ) ) + { + if( team == PTE_NONE || team == ent->stageTeam ) + ent->use( ent, ent, ent ); + } + } + return qtrue; +} diff --git a/src/game/g_admin.h b/src/game/g_admin.h index 0621f9a..e03dde1 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -268,6 +268,7 @@ qboolean G_admin_credits( gentity_t *ent, int skiparg ); qboolean G_admin_customgrav( gentity_t *ent, int skiparg ); qboolean G_admin_explode( gentity_t *ent, int skiparg ); qboolean G_admin_outlaw( gentity_t *ent, int skiparg ); +qboolean G_admin_fireworks( gentity_t *ent, int skiparg ); void G_admin_print( gentity_t *ent, char *m ); void G_admin_buffer_print( gentity_t *ent, char *m ); diff --git a/src/game/g_combat.c b/src/game/g_combat.c index b4d625d..0723d38 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -256,6 +256,8 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int // this works as a temporary hack until the client supports it if ( meansOfDeath == MOD_RADIATION ) trap_SendServerCommand( -1, va( "print \"%s^7 was irradiated by his base\n\"", self->client->pers.netname ) ); + else if ( meansOfDeath == MOD_LEVEL2_CLAW ) + trap_SendServerCommand( -1, va( "print \"%s^7 bit off %s's face\n\"", attacker->client->pers.netname, self->client->pers.netname ) ); else { ent = G_TempEntity( self->r.currentOrigin, EV_OBITUARY ); diff --git a/src/game/g_main.c b/src/game/g_main.c index bb795f1..c7df903 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "g_local.h" #define QVM_VARIANT "P-G-QVM" -#define QVM_VERSION "SVN r67" +#define QVM_VERSION "SVN r68" level_locals_t level;