From e3d21e073e7af8c788d4766cc515091ac793da40 Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 15 Aug 2018 01:33:42 +0700 Subject: [PATCH] Add command to specify lightstyle --- dlls/gravgunmod.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/gravgunmod.cpp b/dlls/gravgunmod.cpp index 8a7c3747..0c12d204 100644 --- a/dlls/gravgunmod.cpp +++ b/dlls/gravgunmod.cpp @@ -84,6 +84,21 @@ bool Q_stricmpext( const char *pattern, const char *text ) return true; } +void GGM_LightStyle_f( void ) +{ + if( CMD_ARGC() != 3 ) + { + ALERT( at_error, "Usage: mp_lightstyle \n" ); + return; + } + + int style = atoi( CMD_ARGV(1) ); + if( style < 0 || style > 256 ) + return; + + LIGHT_STYLE( style, CMD_ARGV(2) ); +} + void GGM_RegisterCVars( void ) { CVAR_REGISTER( &cvar_allow_ar2 ); @@ -98,6 +113,7 @@ void GGM_RegisterCVars( void ) CVAR_REGISTER( &cvar_agibcount ); CVAR_REGISTER( &mp_gravgun_players ); CVAR_REGISTER( &mp_fixhornetbug ); + CVAR_REGISTER( &mp_fixsavetime ); CVAR_REGISTER( &mp_checkentities ); CVAR_REGISTER( &mp_touchmenu ); CVAR_REGISTER( &mp_touchname ); @@ -114,6 +130,7 @@ void GGM_RegisterCVars( void ) CVAR_REGISTER( &mp_enttools_checkmodels ); g_engfuncs.pfnAddServerCommand( "ent_rungc", Ent_RunGC_f ); + g_engfuncs.pfnAddServerCommand( "mp_lightstyle", GGM_LightStyle_f ); } void Ent_RunGC( bool common, bool enttools, const char *userid, const char *pattern )