mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-27 06:13:01 +00:00
- A few code cleanups in gamecode
- Add a bit of stuff from Zakk Middleton
This commit is contained in:
parent
d2612c8a36
commit
9f786f4def
2 changed files with 18 additions and 22 deletions
|
@ -459,6 +459,7 @@ static void CG_MapRestart( void ) {
|
||||||
cg.timelimitWarnings = 0;
|
cg.timelimitWarnings = 0;
|
||||||
|
|
||||||
cg.intermissionStarted = qfalse;
|
cg.intermissionStarted = qfalse;
|
||||||
|
cg.levelShot = qfalse;
|
||||||
|
|
||||||
cgs.voteTime = 0;
|
cgs.voteTime = 0;
|
||||||
|
|
||||||
|
|
|
@ -385,38 +385,34 @@ and sends over a command to the client to resize the view,
|
||||||
hide the scoreboard, and take a special screenshot
|
hide the scoreboard, and take a special screenshot
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void Cmd_LevelShot_f( gentity_t *ent ) {
|
void Cmd_LevelShot_f(gentity_t *ent)
|
||||||
if ( !CheatsOk( ent ) ) {
|
{
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// doesn't work in single player
|
|
||||||
if ( g_gametype.integer != 0 ) {
|
|
||||||
trap_SendServerCommand( ent-g_entities,
|
|
||||||
"print \"Must be in g_gametype 0 for levelshot\n\"" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!ent->client->pers.localClient)
|
if(!ent->client->pers.localClient)
|
||||||
{
|
{
|
||||||
trap_SendServerCommand(ent-g_entities,
|
trap_SendServerCommand(ent-g_entities,
|
||||||
"print \"The levelshot command must be executed by a local client\n\"");
|
"print \"The levelshot command must be executed by a local client\n\"");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!CheatsOk(ent))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// doesn't work in single player
|
||||||
|
if(g_gametype.integer == GT_SINGLE_PLAYER)
|
||||||
|
{
|
||||||
|
trap_SendServerCommand(ent-g_entities,
|
||||||
|
"print \"Must not be in singleplayer mode for levelshot\n\"" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
BeginIntermission();
|
BeginIntermission();
|
||||||
trap_SendServerCommand( ent-g_entities, "clientLevelShot" );
|
trap_SendServerCommand(ent-g_entities, "clientLevelShot");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
Cmd_LevelShot_f
|
Cmd_TeamTask_f
|
||||||
|
|
||||||
This is just to help generate the level pictures
|
|
||||||
for the menus. It goes to the intermission immediately
|
|
||||||
and sends over a command to the client to resize the view,
|
|
||||||
hide the scoreboard, and take a special screenshot
|
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void Cmd_TeamTask_f( gentity_t *ent ) {
|
void Cmd_TeamTask_f( gentity_t *ent ) {
|
||||||
|
@ -438,7 +434,6 @@ void Cmd_TeamTask_f( gentity_t *ent ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
Cmd_Kill_f
|
Cmd_Kill_f
|
||||||
|
|
Loading…
Reference in a new issue