diff options
author | IronClawTrem <louie.nutman@gmail.com> | 2020-05-15 07:08:21 +0100 |
---|---|---|
committer | IronClawTrem <louie.nutman@gmail.com> | 2020-05-15 07:10:16 +0100 |
commit | 8ecfeae2f63bde13e4874b3a344b663f7d355038 (patch) | |
tree | 07851ebdd9f2cc26a9260427d6326047d4e46c73 | |
parent | aa9cdd863ac4d1d0ab6ef6e590be71aaae5ca44b (diff) |
fix !astage and !hstage a little bit
-rw-r--r-- | src/game/g_admin.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 6a5d16e..204e091 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -7886,17 +7886,21 @@ qboolean G_admin_setdevmode( gentity_t *ent, int skiparg ) qboolean G_admin_hstage( gentity_t *ent, int skiparg ) { - char lvl_chr[ MAX_STRING_CHARS ]; int minargc; int lvl; - minargc = 2 + skiparg; if( G_SayArgc() < minargc ) { - ADMP( "^3!hstage: ^7hstage: !hstage [#]\n" ); + ADMP( "^3!hstage: ^7usage: !hstage [#]\n" ); + return qfalse; + } + + if( lvl != 1 | lvl != 2 | lvl != 3) + { + ADMP( "^3!hstage: ^7invalid stage!\n" ); return qfalse; } @@ -7908,27 +7912,30 @@ qboolean G_admin_hstage( gentity_t *ent, int skiparg ) trap_SendConsoleCommand( EXEC_APPEND, va( "g_humanStage %i", lvl ) ); lvl += 1; - AP( va( "print \"^3!hstage: %s ^7gave humans stage ^2%i\n\"", + AP( va( "print \"^3!hstage: ^7%s gave humans stage ^2%i^7\n\"", ( ent ) ? G_admin_adminPrintName( ent ) : "console", lvl ) ); return qtrue; - } qboolean G_admin_astage( gentity_t *ent, int skiparg ) { - char lvl_chr[ MAX_STRING_CHARS ]; int minargc; int lvl; - minargc = 2 + skiparg; if( G_SayArgc() < minargc ) { - ADMP( "^3!astage: ^7astage: !astage [#]\n" ); + ADMP( "^3!astage: ^7usage: !astage [#]\n" ); + return qfalse; + } + + if( lvl != 1 | lvl != 2 | lvl != 3) + { + ADMP( "^3!astage: ^7invalid stage!\n" ); return qfalse; } @@ -7940,12 +7947,11 @@ qboolean G_admin_astage( gentity_t *ent, int skiparg ) trap_SendConsoleCommand( EXEC_APPEND, va( "g_alienStage %i", lvl ) ); lvl += 1; - AP( va( "print \"^3!hstage: %s ^7gave aliens stage ^2%i\n\"", + AP( va( "print \"^3!astage: ^7%s gave aliens stage ^2%i^7\n\"", ( ent ) ? G_admin_adminPrintName( ent ) : "console", lvl ) ); return qtrue; - } qboolean G_admin_bubble( gentity_t *ent, int skiparg ) |