mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-20 19:02:08 +00:00
no message
This commit is contained in:
parent
81c292cc4b
commit
b5cb7ddc9c
10 changed files with 269 additions and 66 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.3 2002/02/21 20:10:16 jbravo
|
||||
// Converted files back from M$ format and added cvs headers again.
|
||||
//
|
||||
|
@ -202,7 +205,8 @@
|
|||
#define CG_CAPTURES 69
|
||||
|
||||
|
||||
|
||||
//Makro - for SSG crosshair selection
|
||||
#define UI_SSG_CROSSHAIR 150
|
||||
|
||||
#define UI_OWNERDRAW_BASE 200
|
||||
#define UI_HANDICAP 200
|
||||
|
|
|
@ -158,7 +158,7 @@ SOURCE=.\keycodes.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ui\menudef.h
|
||||
SOURCE=menudef.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP27D.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4A5.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
|
||||
|
@ -20,8 +20,8 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP27D.tmp" with conte
|
|||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_util.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP27D.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP27E.tmp" with contents
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4A5.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4A6.tmp" with contents
|
||||
[
|
||||
/nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"uix86.dll" /implib:"Release_TA/uix86.lib"
|
||||
.\Release_TA\bg_misc.obj
|
||||
|
@ -35,15 +35,15 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP27E.tmp" with conte
|
|||
.\Release_TA\ui_syscalls.obj
|
||||
.\Release_TA\ui_util.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP27E.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4A6.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
bg_misc.c
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(866) : warning C4033: 'BG_FindItemForHoldable' must return a value
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(1458) : warning C4101: 'p' : unreferenced local variable
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(1457) : warning C4101: 'angles' : unreferenced local variable
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(873) : warning C4033: 'BG_FindItemForHoldable' must return a value
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(1465) : warning C4101: 'p' : unreferenced local variable
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(1464) : warning C4101: 'angles' : unreferenced local variable
|
||||
q_math.c
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(877) : warning C4715: 'BG_FindItemForHoldable' : not all control paths return a value
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(884) : warning C4715: 'BG_FindItemForHoldable' : not all control paths return a value
|
||||
q_shared.c
|
||||
ui_atoms.c
|
||||
ui_gameinfo.c
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.3 2002/02/21 20:10:16 jbravo
|
||||
// Converted files back from M$ format and added cvs headers again.
|
||||
//
|
||||
|
@ -349,7 +352,7 @@ qboolean UI_ConsoleCommand( int realTime ) {
|
|||
trap_R_RemapShader(shader1, shader2, UI_Argv(3));
|
||||
}
|
||||
else
|
||||
//Makro - if no delay is specified, use 0
|
||||
//Makro - if no offset is specified, use 0
|
||||
if (trap_Argc() == 3) {
|
||||
char shader1[MAX_QPATH];
|
||||
char shader2[MAX_QPATH];
|
||||
|
@ -358,7 +361,7 @@ qboolean UI_ConsoleCommand( int realTime ) {
|
|||
trap_R_RemapShader(shader1, shader2, 0);
|
||||
}
|
||||
else
|
||||
Com_Printf("Usage: remapShader <oldShader> <newShader> [delay]\n");
|
||||
Com_Printf("Usage: remapShader <oldShader> <newShader> [timeOffset]\n");
|
||||
}
|
||||
else
|
||||
Com_Printf("Shader remapping is cheat-protected\n");
|
||||
|
@ -391,10 +394,54 @@ qboolean UI_ConsoleCommand( int realTime ) {
|
|||
if ( trap_Cvar_VariableValue("g_gametype") == GT_TEAMPLAY )
|
||||
_UI_SetActiveMenu(UIMENU_RQ3_WEAPON);
|
||||
else
|
||||
Com_Printf("Not playing teamplay\n");
|
||||
Com_Printf("Not playing teamplay.\n");
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
//Makro - join menu
|
||||
if ( Q_stricmp (cmd, "ui_RQ3_joinTeam") == 0 ) {
|
||||
if ( trap_Cvar_VariableValue("g_gametype") >= GT_TEAM)
|
||||
_UI_SetActiveMenu(UIMENU_RQ3_JOIN);
|
||||
else
|
||||
Com_Printf("Not playing a team-based game.\n");
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
//Makro - I've always wanted a command to inc/dec a cvar :)
|
||||
if ( Q_stricmp (cmd, "inc") == 0 ) {
|
||||
if (trap_Argc() >= 2) {
|
||||
char cvar[MAX_CVAR_VALUE_STRING];
|
||||
int amount = 1;
|
||||
int max = 0;
|
||||
int val;
|
||||
|
||||
Q_strncpyz(cvar, UI_Argv(1), sizeof(cvar));
|
||||
val = (int) trap_Cvar_VariableValue(cvar);
|
||||
|
||||
if (trap_Argc() >= 3) {
|
||||
amount = atoi(UI_Argv(2));
|
||||
if (trap_Argc() >= 4) {
|
||||
max = atoi(UI_Argv(3));
|
||||
}
|
||||
}
|
||||
if (max != 0) {
|
||||
trap_Cvar_SetValue(cvar, (val+amount) % max);
|
||||
} else {
|
||||
trap_Cvar_SetValue(cvar, val+amount);
|
||||
}
|
||||
} else {
|
||||
Com_Printf("Usage: inc <cvarName> [amount] [max]\n");
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if ( Q_stricmp (cmd, "error") == 0 ) {
|
||||
if ( trap_Cvar_VariableValue("developer") == 1 ) {
|
||||
Com_Error(ERR_DROP, "Info: Testing error menu. This text should be long enough to get wrapped. Ok, this should be enough. Hope you're not going to see this screen too often");
|
||||
return qtrue;
|
||||
}
|
||||
}
|
||||
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.3 2002/02/21 20:10:16 jbravo
|
||||
// Converted files back from M$ format and added cvs headers again.
|
||||
//
|
||||
|
@ -35,6 +38,34 @@ static int ui_numSinglePlayerArenas;
|
|||
static int ui_numSpecialSinglePlayerArenas;
|
||||
#endif
|
||||
|
||||
//Makro - grouping the gametypes parsed in .arena files
|
||||
typedef struct {
|
||||
char *Name;
|
||||
int Value;
|
||||
} RQ3_GameType_t;
|
||||
|
||||
static RQ3_GameType_t RQ3_GameTypes[] =
|
||||
{
|
||||
/* {"ffa", 1 << GT_FFA},
|
||||
{"tourney", 1 << GT_TOURNAMENT},
|
||||
{"team", 1 << GT_TEAM},
|
||||
{"rq3tp", 1 << GT_TEAMPLAY},
|
||||
{"ctf", 1 << GT_CTF},
|
||||
{"1fctf", 1 << GT_1FCTF},
|
||||
{"obelisk", 1 << GT_OBELISK},
|
||||
{"harvester", 1 << GT_HARVESTER},
|
||||
*/
|
||||
{"rq3dm", 1 << GT_FFA},
|
||||
{"rq3tdm", 1 << GT_TEAM},
|
||||
{"rq3tp", 1 << GT_TEAMPLAY},
|
||||
{"rq3ctf", 1 << GT_CTF},
|
||||
{"none", 0}
|
||||
};
|
||||
|
||||
static int UI_RQ3_DefaultArenaGameType = 1 << GT_FFA;
|
||||
//end Makro
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
UI_ParseInfos
|
||||
|
@ -171,6 +202,8 @@ void UI_LoadArenas( void ) {
|
|||
|
||||
type = Info_ValueForKey( ui_arenaInfos[n], "type" );
|
||||
// if no type specified, it will be treated as "ffa"
|
||||
// Makro - I didn't like the old code, hehe
|
||||
/*
|
||||
if( *type ) {
|
||||
if( strstr( type, "ffa" ) ) {
|
||||
uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_FFA);
|
||||
|
@ -193,6 +226,17 @@ void UI_LoadArenas( void ) {
|
|||
} else {
|
||||
uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_FFA);
|
||||
}
|
||||
*/
|
||||
// Makro - new code
|
||||
if (*type) {
|
||||
for (i=0; RQ3_GameTypes[i].Value != 0; i++) {
|
||||
if ( strstr( type, RQ3_GameTypes[i].Name ) ) {
|
||||
uiInfo.mapList[uiInfo.mapCount].typeBits |= RQ3_GameTypes[i].Value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uiInfo.mapList[uiInfo.mapCount].typeBits |= UI_RQ3_DefaultArenaGameType;
|
||||
}
|
||||
|
||||
uiInfo.mapCount++;
|
||||
if (uiInfo.mapCount >= MAX_MAPS) {
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 2002/03/01 20:02:34 jbravo
|
||||
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
|
||||
// makro
|
||||
// Revision 1.5 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.3 2002/02/21 20:10:16 jbravo
|
||||
// Converted files back from M$ format and added cvs headers again.
|
||||
|
@ -128,10 +127,6 @@ extern vmCvar_t ui_bigFont;
|
|||
extern vmCvar_t ui_serverStatusTimeOut;
|
||||
//Makro - cvar for player model display
|
||||
extern vmCvar_t ui_RQ3_model_command;
|
||||
// JBravo: teamcount cvars for Makro
|
||||
extern vmCvar_t ui_RQ3_teamCount1;
|
||||
extern vmCvar_t ui_RQ3_teamCount2;
|
||||
extern vmCvar_t ui_RQ3_numSpectators;
|
||||
|
||||
|
||||
//
|
||||
|
@ -833,6 +828,8 @@ typedef struct {
|
|||
int nextFindPlayerRefresh;
|
||||
|
||||
int currentCrosshair;
|
||||
//Makro - for the SSG crosshair preview
|
||||
int currentSSGCrosshair;
|
||||
int startPostGameTime;
|
||||
sfxHandle_t newHighScoreSound;
|
||||
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 2002/03/01 20:02:34 jbravo
|
||||
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
|
||||
// makro
|
||||
// Revision 1.5 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.3 2002/02/21 20:10:16 jbravo
|
||||
// Converted files back from M$ format and added cvs headers again.
|
||||
|
@ -59,7 +58,7 @@ static const char *netSources[] = {
|
|||
static const int numNetSources = sizeof(netSources) / sizeof(const char*);
|
||||
|
||||
static const serverFilter_t serverFilters[] = {
|
||||
//Makro - we just want Reaction servers in the server list
|
||||
//Makro - we only want Reaction servers in the server list
|
||||
/* {"All", "" },
|
||||
{"Quake 3 Arena", "" },
|
||||
{"Team Arena", "missionpack" },
|
||||
|
@ -67,16 +66,17 @@ static const serverFilter_t serverFilters[] = {
|
|||
{"Alliance", "alliance20" },
|
||||
{"Weapons Factory Arena", "wfa" },
|
||||
{"OSP", "osp" },*/
|
||||
{"All", "" },
|
||||
{"Reaction", "reaction" }
|
||||
};
|
||||
|
||||
static const char *teamArenaGameTypes[] = {
|
||||
"FFA",
|
||||
"RQ3 DM",
|
||||
"TOURNAMENT",
|
||||
"SP",
|
||||
"TEAM DM",
|
||||
//Makro - inserted teamplay
|
||||
"TEAMPLAY",
|
||||
"RQ3 TP",
|
||||
"CTF",
|
||||
"1FCTF",
|
||||
"OVERLOAD",
|
||||
|
@ -243,6 +243,9 @@ void AssetCache() {
|
|||
uiInfo.uiDC.Assets.crosshairShader[n] = trap_R_RegisterShaderNoMip( va("gfx/2d/crosshair%c", 'a' + n ) );
|
||||
}
|
||||
|
||||
//Makro - for the SSG crosshair preview
|
||||
uiInfo.uiDC.Assets.SSGcrosshairShader = trap_R_RegisterShaderNoMip("gfx/rq3_hud/ssg2x");
|
||||
|
||||
uiInfo.newHighScoreSound = trap_S_RegisterSound("sound/feedback/voc_newhighscore.wav", qfalse);
|
||||
}
|
||||
|
||||
|
@ -1282,17 +1285,20 @@ static void UI_DrawTeamMember(rectDef_t *rect, float scale, vec4_t color, qboole
|
|||
} else {
|
||||
value -= 2;
|
||||
|
||||
//Makro - using bot list instead of character list
|
||||
/*
|
||||
if (ui_actualNetGameType.integer >= GT_TEAM) {
|
||||
if (value >= uiInfo.characterCount) {
|
||||
value = 0;
|
||||
}
|
||||
text = uiInfo.characterList[value].name;
|
||||
} else {
|
||||
*/
|
||||
if (value >= UI_GetNumBots()) {
|
||||
value = 0;
|
||||
}
|
||||
text = UI_GetBotNameByNumber(value);
|
||||
}
|
||||
//}
|
||||
}
|
||||
Text_Paint(rect->x, rect->y, scale, color, text, 0, 0, textStyle);
|
||||
}
|
||||
|
@ -1869,17 +1875,20 @@ static void UI_DrawBotName(rectDef_t *rect, float scale, vec4_t color, int textS
|
|||
int value = uiInfo.botIndex;
|
||||
int game = trap_Cvar_VariableValue("g_gametype");
|
||||
const char *text = "";
|
||||
//Makro - using bot list instead of character list
|
||||
/*
|
||||
if (game >= GT_TEAM) {
|
||||
if (value >= uiInfo.characterCount) {
|
||||
value = 0;
|
||||
}
|
||||
text = uiInfo.characterList[value].name;
|
||||
} else {
|
||||
*/
|
||||
if (value >= UI_GetNumBots()) {
|
||||
value = 0;
|
||||
}
|
||||
text = UI_GetBotNameByNumber(value);
|
||||
}
|
||||
// }
|
||||
Text_Paint(rect->x, rect->y, scale, color, text, 0, 0, textStyle);
|
||||
}
|
||||
|
||||
|
@ -1902,6 +1911,24 @@ static void UI_DrawCrosshair(rectDef_t *rect, float scale, vec4_t color) {
|
|||
trap_R_SetColor( NULL );
|
||||
}
|
||||
|
||||
//Makro - for the SSG crosshair preview
|
||||
static void UI_DrawSSGCrosshair(rectDef_t *rect) {
|
||||
vec4_t color;
|
||||
|
||||
color[0] = trap_Cvar_VariableValue("cg_RQ3_ssgColorR");
|
||||
color[1] = trap_Cvar_VariableValue("cg_RQ3_ssgColorG");
|
||||
color[2] = trap_Cvar_VariableValue("cg_RQ3_ssgColorB");
|
||||
color[3] = trap_Cvar_VariableValue("cg_RQ3_ssgColorA");
|
||||
trap_R_SetColor( color );
|
||||
|
||||
if (uiInfo.currentSSGCrosshair < 0 || uiInfo.currentSSGCrosshair >= NUM_SSGCROSSHAIRS) {
|
||||
uiInfo.currentSSGCrosshair = 0;
|
||||
}
|
||||
|
||||
UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.uiDC.Assets.SSGcrosshairShader);
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
UI_BuildPlayerList
|
||||
|
@ -2054,9 +2081,10 @@ static void UI_DrawGLInfo(rectDef_t *rect, float scale, vec4_t color, int textSt
|
|||
const char *lines[64];
|
||||
int y, numLines, i;
|
||||
|
||||
Text_Paint(rect->x + 2, rect->y, scale, color, va("VENDOR: %s", uiInfo.uiDC.glconfig.vendor_string), 0, 30, textStyle);
|
||||
Text_Paint(rect->x + 2, rect->y + 15, scale, color, va("VERSION: %s: %s", uiInfo.uiDC.glconfig.version_string,uiInfo.uiDC.glconfig.renderer_string), 0, 30, textStyle);
|
||||
Text_Paint(rect->x + 2, rect->y + 30, scale, color, va ("PIXELFORMAT: color(%d-bits) Z(%d-bits) stencil(%d-bits)", uiInfo.uiDC.glconfig.colorBits, uiInfo.uiDC.glconfig.depthBits, uiInfo.uiDC.glconfig.stencilBits), 0, 30, textStyle);
|
||||
//Makro - changed from 30 to 48; changed pixelformat display from (x-bits) to (x)
|
||||
Text_Paint(rect->x + 2, rect->y, scale, color, va("VENDOR: %s", uiInfo.uiDC.glconfig.vendor_string), 0, 48, textStyle);
|
||||
Text_Paint(rect->x + 2, rect->y + 15, scale, color, va("VERSION: %s: %s", uiInfo.uiDC.glconfig.version_string,uiInfo.uiDC.glconfig.renderer_string), 0, 48, textStyle);
|
||||
Text_Paint(rect->x + 2, rect->y + 30, scale, color, va ("PIXELFORMAT: color(%d) Z(%d) stencil(%d)", uiInfo.uiDC.glconfig.colorBits, uiInfo.uiDC.glconfig.depthBits, uiInfo.uiDC.glconfig.stencilBits), 0, 48, textStyle);
|
||||
|
||||
// build null terminated extension strings
|
||||
Q_strncpyz(buff, uiInfo.uiDC.glconfig.extensions_string, 4096);
|
||||
|
@ -2240,6 +2268,10 @@ static void UI_OwnerDraw(float x, float y, float w, float h, float text_x, float
|
|||
case UI_CROSSHAIR:
|
||||
UI_DrawCrosshair(&rect, scale, color);
|
||||
break;
|
||||
//Makro - adding SSG crosshair
|
||||
case UI_SSG_CROSSHAIR:
|
||||
UI_DrawSSGCrosshair(&rect);
|
||||
break;
|
||||
case UI_SELECTEDPLAYER:
|
||||
UI_DrawSelectedPlayer(&rect, scale, color, textStyle);
|
||||
break;
|
||||
|
@ -2589,6 +2621,8 @@ static qboolean UI_TeamMember_HandleKey(int flags, float *special, int key, qboo
|
|||
value++;
|
||||
}
|
||||
|
||||
//Makro - using bot list instead of character list
|
||||
/*
|
||||
if (ui_actualNetGameType.integer >= GT_TEAM) {
|
||||
if (value >= uiInfo.characterCount + 2) {
|
||||
value = 0;
|
||||
|
@ -2596,12 +2630,13 @@ static qboolean UI_TeamMember_HandleKey(int flags, float *special, int key, qboo
|
|||
value = uiInfo.characterCount + 2 - 1;
|
||||
}
|
||||
} else {
|
||||
*/
|
||||
if (value >= UI_GetNumBots() + 2) {
|
||||
value = 0;
|
||||
} else if (value < 0) {
|
||||
value = UI_GetNumBots() + 2 - 1;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
trap_Cvar_Set(cvar, va("%i", value));
|
||||
return qtrue;
|
||||
|
@ -2677,6 +2712,8 @@ static qboolean UI_BotName_HandleKey(int flags, float *special, int key) {
|
|||
value++;
|
||||
}
|
||||
|
||||
//Makro - using bot list instead of character list
|
||||
/*
|
||||
if (game >= GT_TEAM) {
|
||||
if (value >= uiInfo.characterCount + 2) {
|
||||
value = 0;
|
||||
|
@ -2684,12 +2721,13 @@ static qboolean UI_BotName_HandleKey(int flags, float *special, int key) {
|
|||
value = uiInfo.characterCount + 2 - 1;
|
||||
}
|
||||
} else {
|
||||
*/
|
||||
if (value >= UI_GetNumBots() + 2) {
|
||||
value = 0;
|
||||
} else if (value < 0) {
|
||||
value = UI_GetNumBots() + 2 - 1;
|
||||
}
|
||||
}
|
||||
// }
|
||||
uiInfo.botIndex = value;
|
||||
return qtrue;
|
||||
}
|
||||
|
@ -2740,6 +2778,27 @@ static qboolean UI_Crosshair_HandleKey(int flags, float *special, int key) {
|
|||
return qfalse;
|
||||
}
|
||||
|
||||
//Makro - for the SSG crosshair
|
||||
static qboolean UI_SSG_Crosshair_HandleKey(int flags, float *special, int key) {
|
||||
/*
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
if (key == K_MOUSE2) {
|
||||
uiInfo.currentCrosshair--;
|
||||
} else {
|
||||
uiInfo.currentCrosshair++;
|
||||
}
|
||||
|
||||
if (uiInfo.currentCrosshair >= NUM_CROSSHAIRS) {
|
||||
uiInfo.currentCrosshair = 0;
|
||||
} else if (uiInfo.currentCrosshair < 0) {
|
||||
uiInfo.currentCrosshair = NUM_CROSSHAIRS - 1;
|
||||
}
|
||||
trap_Cvar_Set("cg_drawCrosshair", va("%d", uiInfo.currentCrosshair));
|
||||
return qtrue;
|
||||
}
|
||||
*/
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
static qboolean UI_SelectedPlayer_HandleKey(int flags, float *special, int key) {
|
||||
|
@ -2839,6 +2898,10 @@ static qboolean UI_OwnerDrawHandleKey(int ownerDraw, int flags, float *special,
|
|||
case UI_CROSSHAIR:
|
||||
UI_Crosshair_HandleKey(flags, special, key);
|
||||
break;
|
||||
//Makro - for the SSG crosshair
|
||||
case UI_SSG_CROSSHAIR:
|
||||
UI_Crosshair_HandleKey(flags, special, key);
|
||||
break;
|
||||
case UI_SELECTEDPLAYER:
|
||||
UI_SelectedPlayer_HandleKey(flags, special, key);
|
||||
break;
|
||||
|
@ -3310,20 +3373,22 @@ static void UI_RunMenuScript(char **args) {
|
|||
for (i = 0; i < PLAYERS_PER_TEAM; i++) {
|
||||
int bot = trap_Cvar_VariableValue( va("ui_blueteam%i", i+1));
|
||||
if (bot > 1) {
|
||||
if (ui_actualNetGameType.integer >= GT_TEAM) {
|
||||
Com_sprintf( buff, sizeof(buff), "addbot %s %f %s\n", uiInfo.characterList[bot-2].name, skill, "Blue");
|
||||
} else {
|
||||
//Makro - using bot list instead of character list
|
||||
//if (ui_actualNetGameType.integer >= GT_TEAM) {
|
||||
// Com_sprintf( buff, sizeof(buff), "addbot %s %f %s\n", uiInfo.characterList[bot-2].name, skill, "Blue");
|
||||
//} else {
|
||||
Com_sprintf( buff, sizeof(buff), "addbot %s %f \n", UI_GetBotNameByNumber(bot-2), skill);
|
||||
}
|
||||
//}
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, buff );
|
||||
}
|
||||
bot = trap_Cvar_VariableValue( va("ui_redteam%i", i+1));
|
||||
if (bot > 1) {
|
||||
if (ui_actualNetGameType.integer >= GT_TEAM) {
|
||||
Com_sprintf( buff, sizeof(buff), "addbot %s %f %s\n", uiInfo.characterList[bot-2].name, skill, "Red");
|
||||
} else {
|
||||
//Makro - using bot list instead of character list
|
||||
//if (ui_actualNetGameType.integer >= GT_TEAM) {
|
||||
// Com_sprintf( buff, sizeof(buff), "addbot %s %f %s\n", uiInfo.characterList[bot-2].name, skill, "Red");
|
||||
//} else {
|
||||
Com_sprintf( buff, sizeof(buff), "addbot %s %f \n", UI_GetBotNameByNumber(bot-2), skill);
|
||||
}
|
||||
//}
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, buff );
|
||||
}
|
||||
}
|
||||
|
@ -3516,11 +3581,12 @@ static void UI_RunMenuScript(char **args) {
|
|||
trap_Cmd_ExecuteText( EXEC_APPEND, va("callteamvote leader %s\n",uiInfo.teamNames[uiInfo.teamIndex]) );
|
||||
}
|
||||
} else if (Q_stricmp(name, "addBot") == 0) {
|
||||
if (trap_Cvar_VariableValue("g_gametype") >= GT_TEAM) {
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, va("addbot %s %i %s\n", uiInfo.characterList[uiInfo.botIndex].name, uiInfo.skillIndex+1, (uiInfo.redBlue == 0) ? "Red" : "Blue") );
|
||||
} else {
|
||||
//Makro - using bot list instead of character list
|
||||
//if (trap_Cvar_VariableValue("g_gametype") >= GT_TEAM) {
|
||||
// trap_Cmd_ExecuteText( EXEC_APPEND, va("addbot %s %i %s\n", uiInfo.characterList[uiInfo.botIndex].name, uiInfo.skillIndex+1, (uiInfo.redBlue == 0) ? "Red" : "Blue") );
|
||||
//} else {
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, va("addbot %s %i %s\n", UI_GetBotNameByNumber(uiInfo.botIndex), uiInfo.skillIndex+1, (uiInfo.redBlue == 0) ? "Red" : "Blue") );
|
||||
}
|
||||
//}
|
||||
} else if (Q_stricmp(name, "addFavorite") == 0) {
|
||||
if (ui_netSource.integer != AS_FAVORITES) {
|
||||
char name[MAX_NAME_LENGTH];
|
||||
|
@ -3855,7 +3921,9 @@ static void UI_BuildServerDisplayList(qboolean force) {
|
|||
trap_Cvar_VariableStringBuffer( "cl_motdString", uiInfo.serverStatus.motd, sizeof(uiInfo.serverStatus.motd) );
|
||||
len = strlen(uiInfo.serverStatus.motd);
|
||||
if (len == 0) {
|
||||
strcpy(uiInfo.serverStatus.motd, "Welcome to Team Arena!");
|
||||
//Makro - changing from Team Arena to RQ3 beta2
|
||||
//strcpy(uiInfo.serverStatus.motd, "Welcome to Team Arena!");
|
||||
strcpy(uiInfo.serverStatus.motd, " *** Welcome to Reaction Quake 3 beta 2 *** ");
|
||||
len = strlen(uiInfo.serverStatus.motd);
|
||||
}
|
||||
if (len != uiInfo.serverStatus.motdLen) {
|
||||
|
@ -4440,7 +4508,7 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
|
|||
}
|
||||
case SORT_MAP : return Info_ValueForKey(info, "mapname");
|
||||
case SORT_CLIENTS :
|
||||
Com_sprintf( clientBuff, sizeof(clientBuff), "%s (%s)", Info_ValueForKey(info, "clients"), Info_ValueForKey(info, "sv_maxclients"));
|
||||
Com_sprintf( clientBuff, sizeof(clientBuff), "%s / %s", Info_ValueForKey(info, "clients"), Info_ValueForKey(info, "sv_maxclients"));
|
||||
return clientBuff;
|
||||
case SORT_GAME :
|
||||
game = atoi(Info_ValueForKey(info, "gametype"));
|
||||
|
@ -4820,6 +4888,15 @@ static void UI_ParseTeamInfo(const char *teamFile) {
|
|||
|
||||
|
||||
static qboolean GameType_Parse(char **p, qboolean join) {
|
||||
/*
|
||||
//Sample section
|
||||
|
||||
joingametypes {
|
||||
{ "All" -1 }
|
||||
{ "Free For All" 0 }
|
||||
{ "Teamplay" 4 }
|
||||
}
|
||||
*/
|
||||
char *token;
|
||||
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
|
@ -4847,6 +4924,8 @@ static qboolean GameType_Parse(char **p, qboolean join) {
|
|||
|
||||
if (token[0] == '{') {
|
||||
// two tokens per line, character name and sex
|
||||
// Makro - name and sex for gametypes ? Har har har
|
||||
// They probably mean "name" and "value", heh
|
||||
if (join) {
|
||||
if (!String_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gameType) || !Int_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gtEnum)) {
|
||||
return qfalse;
|
||||
|
@ -5262,6 +5341,8 @@ void _UI_Init( qboolean inGameLoad ) {
|
|||
// sets defaults for ui temp cvars
|
||||
uiInfo.effectsColor = gamecodetoui[(int)trap_Cvar_VariableValue("color1")-1];
|
||||
uiInfo.currentCrosshair = (int)trap_Cvar_VariableValue("cg_drawCrosshair");
|
||||
//Makro - for the SSG crosshair preview
|
||||
uiInfo.currentSSGCrosshair = (int)trap_Cvar_VariableValue("cg_RQ3_ssgCrosshair");
|
||||
trap_Cvar_Set("ui_mousePitch", (trap_Cvar_VariableValue("m_pitch") >= 0) ? "0" : "1");
|
||||
|
||||
uiInfo.serverStatus.currentServerCinematic = -1;
|
||||
|
@ -5418,6 +5499,13 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) {
|
|||
Menus_CloseAll();
|
||||
Menus_ActivateByName("ingame_weapon");
|
||||
return;
|
||||
case UIMENU_RQ3_JOIN:
|
||||
trap_Cvar_Set( "cl_paused", "1" );
|
||||
trap_Key_SetCatcher( KEYCATCH_UI );
|
||||
UI_BuildPlayerList();
|
||||
Menus_CloseAll();
|
||||
Menus_ActivateByName("ingame_join");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5765,10 +5853,11 @@ vmCvar_t ui_realWarmUp;
|
|||
vmCvar_t ui_serverStatusTimeOut;
|
||||
//Makro - cvar for player model display
|
||||
vmCvar_t ui_RQ3_model_command;
|
||||
// JBravo: teamcount cvars for Makro
|
||||
vmCvar_t ui_RQ3_teamCount1;
|
||||
vmCvar_t ui_RQ3_teamCount2;
|
||||
vmCvar_t ui_RQ3_numSpectators;
|
||||
//Makro - for the SSG crosshair preview
|
||||
vmCvar_t ui_RQ3_ssgCrosshair;
|
||||
//Makro - activate the weapon menu after a team join
|
||||
vmCvar_t ui_RQ3_weapAfterJoin;
|
||||
|
||||
|
||||
|
||||
// bk001129 - made static to avoid aliasing
|
||||
|
@ -5893,9 +5982,9 @@ static cvarTable_t cvarTable[] = {
|
|||
{ &ui_serverStatusTimeOut, "ui_serverStatusTimeOut", "7000", CVAR_ARCHIVE},
|
||||
//Makro - cvar for player model display
|
||||
{ &ui_RQ3_model_command, "ui_RQ3_model_command", "0", CVAR_ARCHIVE},
|
||||
{ &ui_RQ3_teamCount1, "ui_RQ3_teamCount1", "0", CVAR_ROM},
|
||||
{ &ui_RQ3_teamCount2, "ui_RQ3_teamCount2", "0", CVAR_ROM},
|
||||
{ &ui_RQ3_numSpectators, "ui_RQ3_numSpectators", "0", CVAR_ROM}
|
||||
{ &ui_RQ3_ssgCrosshair, "ui_RQ3_ssgCrosshair", "0", 0},
|
||||
{ &ui_RQ3_weapAfterJoin, "ui_RQ3_weapAfterJoin", "0", CVAR_ARCHIVE}
|
||||
|
||||
};
|
||||
|
||||
// bk001129 - made static to avoid aliasing
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.3 2002/02/21 20:10:16 jbravo
|
||||
// Converted files back from M$ format and added cvs headers again.
|
||||
//
|
||||
|
@ -134,7 +137,9 @@ typedef enum {
|
|||
UIMENU_TEAM,
|
||||
UIMENU_POSTGAME,
|
||||
//Makro - added weapon menu
|
||||
UIMENU_RQ3_WEAPON
|
||||
UIMENU_RQ3_WEAPON,
|
||||
//Makro - added join menu
|
||||
UIMENU_RQ3_JOIN
|
||||
} uiMenuCommand_t;
|
||||
|
||||
#define SORT_HOST 0
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.6 2002/03/01 20:02:34 jbravo
|
||||
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
|
||||
// makro
|
||||
// Revision 1.7 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.5 2002/02/24 00:54:12 makro
|
||||
// Even more fixes to the shortcut keys code.
|
||||
|
@ -2646,6 +2645,20 @@ static rectDef_t *Item_CorrectedTextRect(itemDef_t *item) {
|
|||
return ▭
|
||||
}
|
||||
|
||||
//Makro - function to determine whether or not an item is visible
|
||||
qboolean UI_RQ3_ActiveItem(itemDef_t *item) {
|
||||
|
||||
if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if (item->cvarFlags & (CVAR_SHOW | CVAR_HIDE) && !Item_EnableShowViaCvar(item, CVAR_SHOW)) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
return (item->window.flags & WINDOW_VISIBLE);
|
||||
}
|
||||
|
||||
//Makro - search for items that have shortcuts
|
||||
qboolean UI_RQ3_TriggerShortcut(menuDef_t *menu, int key) {
|
||||
int i;
|
||||
|
@ -2656,7 +2669,7 @@ qboolean UI_RQ3_TriggerShortcut(menuDef_t *menu, int key) {
|
|||
|
||||
if (DC->realTime >= UI_RQ3_lastCheckForShortcuts+UI_RQ3_ShortcutCheckDelay ) {
|
||||
for (i = 0; i < menu->itemCount; i++) {
|
||||
if ( menu->items[i]->window.shortcutKey == key ) {
|
||||
if ( menu->items[i]->window.shortcutKey == key && UI_RQ3_ActiveItem(menu->items[i]) ) {
|
||||
Item_Action(menu->items[i]);
|
||||
return qtrue;
|
||||
}
|
||||
|
@ -3274,8 +3287,9 @@ static bind_t g_bindings[] =
|
|||
{"irvision", -1, -1, -1, -1},
|
||||
//Makro - this one was missing
|
||||
{"specialweapon", -1, -1, -1, -1},
|
||||
//Makro - for the weapon/item menus
|
||||
{"ui_RQ3_loadout", -1, -1, -1, -1}
|
||||
//Makro - for the weapon/item and join menus
|
||||
{"ui_RQ3_loadout", -1, -1, -1, -1},
|
||||
{"ui_RQ3_joinTeam", -1, -1, -1, -1}
|
||||
};
|
||||
|
||||
|
||||
|
@ -3708,12 +3722,12 @@ void Item_Model_Paint(itemDef_t *item) {
|
|||
if (modelPtr->rotationSpeed) {
|
||||
if (DC->realTime > item->window.nextTime) {
|
||||
item->window.nextTime = DC->realTime + modelPtr->rotationSpeed;
|
||||
//Makro - now we're using 3 angles, not jsut one
|
||||
//Makro - now we're using 3 angles, not just one
|
||||
//modelPtr->angle = (int)(modelPtr->angle + 1) % 360;
|
||||
modelPtr->angles[0] = (int)(modelPtr->angles[0] + 1) % 360;
|
||||
}
|
||||
}
|
||||
//Makro - now we're using 3 angles, not jsut one
|
||||
//Makro - now we're using 3 angles, not just one
|
||||
//VectorSet( angles, 0, modelPtr->angle, 0 );
|
||||
angles[YAW] = modelPtr->angles[0];
|
||||
angles[PITCH] = modelPtr->angles[1];
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.6 2002/03/01 20:02:34 jbravo
|
||||
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
|
||||
// makro
|
||||
// Revision 1.7 2002/03/03 21:22:58 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.5 2002/02/24 00:54:12 makro
|
||||
// Even more fixes to the shortcut keys code.
|
||||
|
@ -111,6 +110,8 @@
|
|||
#define SLIDER_THUMB_WIDTH 12.0
|
||||
#define SLIDER_THUMB_HEIGHT 20.0
|
||||
#define NUM_CROSSHAIRS 10
|
||||
//Makro - for the SSG crosshair preview
|
||||
#define NUM_SSGCROSSHAIRS 6
|
||||
|
||||
typedef struct {
|
||||
const char *command;
|
||||
|
@ -319,6 +320,8 @@ typedef struct {
|
|||
qhandle_t fxBasePic;
|
||||
qhandle_t fxPic[7];
|
||||
qhandle_t crosshairShader[NUM_CROSSHAIRS];
|
||||
//Makro - for the SSG crosshair preview
|
||||
qhandle_t SSGcrosshairShader;
|
||||
|
||||
} cachedAssets_t;
|
||||
|
||||
|
|
Loading…
Reference in a new issue