diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 7a07e4d..c46c3d9 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1020,6 +1020,7 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText ) // don't let text be too long for malicious reasons char text[ MAX_SAY_TEXT ]; char location[ 64 ]; + vec3_t dir; // Bail if the text is blank. if( ! chatText[0] ) @@ -1069,6 +1070,21 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText ) return; } + if( !strcmp( chatText, "^y EZ NOT TOO HARD AT ALL" ) ) + { + if( ( ent->client->pers.teamSelection == PTE_ALIENS ) || ( ent->client->pers.teamSelection == PTE_HUMANS ) ) + { + // knockback in a random direction + dir[0] = 2.0f; + dir[1] = 2.0f; + dir[2] = 2.0f; + G_Knockback( ent, dir, g_slapKnockback.integer ); + G_Damage( ent, NULL, NULL, NULL, NULL, 99999, DAMAGE_NO_ARMOR, MOD_SUICIDE ); + trap_SendConsoleCommand( EXEC_APPEND, va("cp ^1-smegma\n" ) ); + G_AddEvent( ent, EV_SMEGMA_DIE, 0 ); + } + } + if (g_chatTeamPrefix.integer && ent && ent->client ) { switch( ent->client->pers.teamSelection) |