diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-04-03 00:33:39 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-04-03 00:33:39 +0200 |
commit | 5678a7bb3498f20123523f008df947a39eb44ccc (patch) | |
tree | 79a9984682742613ba610155ab43705e86f4ba9c /src/cgame/cg_servercmds.c | |
parent | 216fc980dd8221198e491745a0eaa029c37f74d3 (diff) |
Implement damage blobs.
Diffstat (limited to 'src/cgame/cg_servercmds.c')
-rw-r--r-- | src/cgame/cg_servercmds.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 084e3f1..891c3e0 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -1336,6 +1336,25 @@ static void CG_GameCmds_f( void ) trap_AddCommand( CG_Argv( i ) ); } +static void CG_DamageBlob_f( void ) +{ + int i, count = trap_Argc( ), value, flags; + vec3_t origin; + + for( i = 1; i + 4 < count; i += 5 ) + { + origin[ 0 ] = atof( CG_Argv( i ) ); + origin[ 1 ] = atof( CG_Argv( i + 1 ) ); + origin[ 2 ] = atof( CG_Argv( i + 2 ) ); + value = atoi( CG_Argv( i + 3 ) ); + flags = atoi( CG_Argv( i + 4 ) ); + + CG_SpawnDamageBlob( origin, value, flags ); + + i += 5; + } +} + static consoleCommand_t svcommands[ ] = { { "chat", CG_Chat_f }, @@ -1343,6 +1362,7 @@ static consoleCommand_t svcommands[ ] = { "cmds", CG_GameCmds_f }, { "cp", CG_CenterPrint_f }, { "cs", CG_ConfigStringModified }, + { "dblob", CG_DamageBlob_f }, { "map_restart", CG_MapRestart }, { "poisoncloud", CG_PoisonCloud_f }, { "print", CG_Print_f }, |