mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-03-09 10:52:11 +00:00
Adding Matchmode: just a few basics and files...
This commit is contained in:
parent
f2f94ee636
commit
c6719e61da
6 changed files with 50 additions and 0 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.39 2002/01/31 23:51:18 slicer
|
||||||
|
// Adding Matchmode: just a few basics and files...
|
||||||
|
//
|
||||||
// Revision 1.38 2002/01/31 02:55:58 blaze
|
// Revision 1.38 2002/01/31 02:55:58 blaze
|
||||||
// some basic work with the trains/elevators
|
// some basic work with the trains/elevators
|
||||||
//
|
//
|
||||||
|
@ -37,6 +40,8 @@
|
||||||
#include "bg_public.h"
|
#include "bg_public.h"
|
||||||
#include "g_public.h"
|
#include "g_public.h"
|
||||||
|
|
||||||
|
//Slicer: MatchMode
|
||||||
|
#include "g_matchmode.h"
|
||||||
//==================================================================
|
//==================================================================
|
||||||
|
|
||||||
// the "gameversion" client command will print this plus compile date
|
// the "gameversion" client command will print this plus compile date
|
||||||
|
@ -603,6 +608,10 @@ typedef struct {
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
int portalSequence;
|
int portalSequence;
|
||||||
#endif
|
#endif
|
||||||
|
// Slicer: Matchmode
|
||||||
|
float matchTime;
|
||||||
|
qboolean team1ready;
|
||||||
|
qboolean team2ready;
|
||||||
// JBravo adding TP
|
// JBravo adding TP
|
||||||
int lights_camera_action;
|
int lights_camera_action;
|
||||||
qboolean team_round_going;
|
qboolean team_round_going;
|
||||||
|
@ -1035,6 +1044,8 @@ extern vmCvar_t g_enableDust;
|
||||||
extern vmCvar_t g_enableBreath;
|
extern vmCvar_t g_enableBreath;
|
||||||
extern vmCvar_t g_singlePlayer;
|
extern vmCvar_t g_singlePlayer;
|
||||||
extern vmCvar_t g_proxMineTimeout;
|
extern vmCvar_t g_proxMineTimeout;
|
||||||
|
//Slicer: Matchmode
|
||||||
|
extern vmCvar_t g_matchmode;
|
||||||
//Blaze: Reaction cvars
|
//Blaze: Reaction cvars
|
||||||
extern vmCvar_t g_rxn_knifelimit;
|
extern vmCvar_t g_rxn_knifelimit;
|
||||||
extern vmCvar_t g_RQ3_maxWeapons;
|
extern vmCvar_t g_RQ3_maxWeapons;
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.19 2002/01/31 23:51:18 slicer
|
||||||
|
// Adding Matchmode: just a few basics and files...
|
||||||
|
//
|
||||||
// Revision 1.18 2002/01/31 02:25:31 jbravo
|
// Revision 1.18 2002/01/31 02:25:31 jbravo
|
||||||
// Adding limchasecam.
|
// Adding limchasecam.
|
||||||
//
|
//
|
||||||
|
@ -89,6 +92,8 @@ vmCvar_t pmove_fixed;
|
||||||
vmCvar_t pmove_msec;
|
vmCvar_t pmove_msec;
|
||||||
vmCvar_t g_rankings;
|
vmCvar_t g_rankings;
|
||||||
vmCvar_t g_listEntity;
|
vmCvar_t g_listEntity;
|
||||||
|
//Slicer: Matchmode
|
||||||
|
vmCvar_t g_matchmode;
|
||||||
//Blaze: Reaction cvars
|
//Blaze: Reaction cvars
|
||||||
vmCvar_t g_rxn_knifelimit;
|
vmCvar_t g_rxn_knifelimit;
|
||||||
vmCvar_t g_RQ3_maxWeapons;
|
vmCvar_t g_RQ3_maxWeapons;
|
||||||
|
@ -207,6 +212,8 @@ static cvarTable_t gameCvarTable[] = {
|
||||||
{ &pmove_msec, "pmove_msec", "8", CVAR_SYSTEMINFO, 0, qfalse},
|
{ &pmove_msec, "pmove_msec", "8", CVAR_SYSTEMINFO, 0, qfalse},
|
||||||
|
|
||||||
{ &g_rankings, "g_rankings", "0", 0, 0, qfalse},
|
{ &g_rankings, "g_rankings", "0", 0, 0, qfalse},
|
||||||
|
//Slicer: Matchmode
|
||||||
|
{ &g_matchmode, "g_matchmode", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH, 0, qfalse },
|
||||||
//Blaze: Reaction stuff
|
//Blaze: Reaction stuff
|
||||||
// Elder: these are explicit values set every time the game initializes
|
// Elder: these are explicit values set every time the game initializes
|
||||||
{ &g_RQ3_ejectBlood, "g_RQ3_ejectBlood", "0", CVAR_ARCHIVE | CVAR_NORESTART,0, qfalse},
|
{ &g_RQ3_ejectBlood, "g_RQ3_ejectBlood", "0", CVAR_ARCHIVE | CVAR_NORESTART,0, qfalse},
|
||||||
|
@ -574,6 +581,12 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) {
|
||||||
level.team_round_going = 0;
|
level.team_round_going = 0;
|
||||||
level.fps = trap_Cvar_VariableIntegerValue( "sv_fps" );
|
level.fps = trap_Cvar_VariableIntegerValue( "sv_fps" );
|
||||||
}
|
}
|
||||||
|
// Slicer: reset matchmode vars
|
||||||
|
if(g_matchmode.integer) {
|
||||||
|
level.matchTime = 0;
|
||||||
|
level.team1ready = qfalse;
|
||||||
|
level.team2ready = qfalse;
|
||||||
|
}
|
||||||
|
|
||||||
if ( trap_Cvar_VariableIntegerValue( "bot_enable" ) ) {
|
if ( trap_Cvar_VariableIntegerValue( "bot_enable" ) ) {
|
||||||
BotAISetup( restart );
|
BotAISetup( restart );
|
||||||
|
@ -1990,6 +2003,9 @@ void G_RunFrame( int levelTime ) {
|
||||||
if ( g_gametype.integer == GT_TEAMPLAY ) {
|
if ( g_gametype.integer == GT_TEAMPLAY ) {
|
||||||
CheckTeamRules();
|
CheckTeamRules();
|
||||||
}
|
}
|
||||||
|
// Slicer: matchmode
|
||||||
|
if(g_matchmode.integer )
|
||||||
|
MM_RunFrame();
|
||||||
|
|
||||||
// check team votes
|
// check team votes
|
||||||
CheckTeamVote( TEAM_RED );
|
CheckTeamVote( TEAM_RED );
|
||||||
|
|
19
reaction/game/g_matchmode.c
Normal file
19
reaction/game/g_matchmode.c
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#include "g_local.h"
|
||||||
|
|
||||||
|
/* Slicer - This will work on all MatchMode Aspects..
|
||||||
|
timers, votes, etc etc. Called on each Frame*/
|
||||||
|
void MM_RunFrame(void) {
|
||||||
|
int fps;
|
||||||
|
|
||||||
|
fps = trap_Cvar_VariableIntegerValue( "sv_fps" );
|
||||||
|
|
||||||
|
switch(g_gametype.integer) {
|
||||||
|
//Each Type has different ways of dealing things..
|
||||||
|
case(GT_TEAMPLAY):
|
||||||
|
if(level.team_game_going) // This will need changes..
|
||||||
|
level.matchTime += 1/fps;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1
reaction/game/g_matchmode.h
Normal file
1
reaction/game/g_matchmode.h
Normal file
|
@ -0,0 +1 @@
|
||||||
|
void MM_RunFrame( void );
|
|
@ -51,6 +51,8 @@ set cc=call ..\compile.bat
|
||||||
@if errorlevel 1 goto quit
|
@if errorlevel 1 goto quit
|
||||||
%cc% ../g_items.c
|
%cc% ../g_items.c
|
||||||
@if errorlevel 1 goto quit
|
@if errorlevel 1 goto quit
|
||||||
|
%cc% ../g_matchmode.c
|
||||||
|
@if errorlevel 1 goto quit
|
||||||
%cc% ../g_mem.c
|
%cc% ../g_mem.c
|
||||||
@if errorlevel 1 goto quit
|
@if errorlevel 1 goto quit
|
||||||
%cc% ../g_misc.c
|
%cc% ../g_misc.c
|
||||||
|
|
|
@ -21,6 +21,7 @@ g_client
|
||||||
g_cmds
|
g_cmds
|
||||||
g_combat
|
g_combat
|
||||||
g_items
|
g_items
|
||||||
|
g_matchmode
|
||||||
g_mem
|
g_mem
|
||||||
g_misc
|
g_misc
|
||||||
g_missile
|
g_missile
|
||||||
|
|
Loading…
Reference in a new issue