diff options
author | IronClawTrem <louie.nutman@gmail.com> | 2020-04-25 19:52:41 +0100 |
---|---|---|
committer | IronClawTrem <louie.nutman@gmail.com> | 2020-04-25 19:52:41 +0100 |
commit | 20eb8a33e9eb5ad412ae0fd0dac901846cc8059f (patch) | |
tree | 5523d47833da0f35060275e423842b00d76e6574 /src/game | |
parent | 2fac8671a2b5919971016bea3382f16f4a76fd2b (diff) |
-smegmaez-not-too-hard-at-all
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_misc.c | 4 | ||||
-rw-r--r-- | src/game/bg_public.h | 4 | ||||
-rw-r--r-- | src/game/g_cmds.c | 16 |
3 files changed, 22 insertions, 2 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 0da713b..a96d519 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -4699,7 +4699,9 @@ char *eventnames[ ] = "EV_DCC_ATTACK", //TA: dcc under attack - "EV_RPTUSE_SOUND" //TA: trigger a sound + "EV_RPTUSE_SOUND", //TA: trigger a sound + + "EV_SMEGMA_DIE" }; /* diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 69967a1..b04102e 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -579,7 +579,9 @@ typedef enum EV_DCC_ATTACK, //TA: dcc under attack - EV_RPTUSE_SOUND //TA: trigger a sound + EV_RPTUSE_SOUND, //TA: trigger a sound + + EV_SMEGMA_DIE } entity_event_t; typedef enum 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) |