From ba0896b49c360324292f9c1fa418502caaac1585 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Thu, 13 Feb 2003 21:19:51 +0000 Subject: [PATCH] no message --- reaction/ChangeLog | 6 +- reaction/game/g_misc.c | 7 +- reaction/game/game.plg | 99 +------------------ reaction/ta_ui/ta_ui.plg | 18 +++- reaction/ta_ui/ui_local.h | 5 + reaction/ta_ui/ui_main.c | 29 +++++- reaction/ta_ui/ui_shared.c | 65 +++++++----- reaction/ta_ui/ui_shared.h | 5 + reaction/uifiles/credit.menu | 6 +- .../uifiles/ingame_matchmode_referee.menu | 27 ++++- reaction/uifiles/main.menu | 2 +- 11 files changed, 133 insertions(+), 136 deletions(-) diff --git a/reaction/ChangeLog b/reaction/ChangeLog index cfc04667..3a802204 100644 --- a/reaction/ChangeLog +++ b/reaction/ChangeLog @@ -213,4 +213,8 @@ * Added pirate and pikey radio sets. cg_RQ3_radiovoice 0, 1, 2 or 3 * Added CTB radio commands to all radio sets. * Added spawnflag 8 to breakables and func_buttons to allow them to be unkickable - +* Made it so that explosions from explosive breakables that have either damage or damageradius + set to 0 don't hurt the players +* Changing the "model" cvar in the console now causes the player model preview and the model icon + selection to be updated immediately +* Added "Hear All" option to the ref menu \ No newline at end of file diff --git a/reaction/game/g_misc.c b/reaction/game/g_misc.c index f033e88f..a05030fc 100644 --- a/reaction/game/g_misc.c +++ b/reaction/game/g_misc.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.64 2003/02/13 21:19:50 makro +// no message +// // Revision 1.63 2003/01/11 17:42:18 makro // Fixed a bug in the sky portal code // @@ -656,7 +659,9 @@ void func_breakable_die(gentity_t * self, gentity_t * inflictor, gentity_t * att { func_breakable_explode(self, self->s.origin); // G_ExplodeMissile(self); - G_RadiusDamage(self->s.origin, attacker, self->damage, self->damage_radius, self, meansOfDeath); + //Makro - added check + if (self->damage > 0 && self->damage_radius > 0) + G_RadiusDamage(self->s.origin, attacker, self->damage, self->damage_radius, self, meansOfDeath); // radius damage trap_UnlinkEntity(self); diff --git a/reaction/game/game.plg b/reaction/game/game.plg index 445788d5..f690f068 100644 --- a/reaction/game/game.plg +++ b/reaction/game/game.plg @@ -3,58 +3,16 @@
 

Build Log

---------------------Configuration: cgame - Win32 Release-------------------- -

-

Command Lines

- - - -

Results

-cgamex86.dll - 0 error(s), 0 warning(s) -

--------------------Configuration: game - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP14.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPC8.tmp" with contents [ /nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c -"C:\Games\Quake3\rq3source\reaction\game\ai_chat.c" -"C:\Games\Quake3\rq3source\reaction\game\ai_cmd.c" -"C:\Games\Quake3\rq3source\reaction\game\ai_dmnet.c" -"C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c" -"C:\Games\Quake3\rq3source\reaction\game\ai_main.c" -"C:\Games\Quake3\rq3source\reaction\game\ai_team.c" -"C:\Games\Quake3\rq3source\reaction\game\ai_vcmd.c" -"C:\Games\Quake3\rq3source\reaction\game\g_active.c" -"C:\Games\Quake3\rq3source\reaction\game\g_arenas.c" -"C:\Games\Quake3\rq3source\reaction\game\g_bot.c" -"C:\Games\Quake3\rq3source\reaction\game\g_client.c" -"C:\Games\Quake3\rq3source\reaction\game\g_cmds.c" -"C:\Games\Quake3\rq3source\reaction\game\g_combat.c" -"C:\Games\Quake3\rq3source\reaction\game\g_fileio.c" -"C:\Games\Quake3\rq3source\reaction\game\g_items.c" -"C:\Games\Quake3\rq3source\reaction\game\g_main.c" -"C:\Games\Quake3\rq3source\reaction\game\g_matchmode.c" -"C:\Games\Quake3\rq3source\reaction\game\g_mem.c" "C:\Games\Quake3\rq3source\reaction\game\g_misc.c" -"C:\Games\Quake3\rq3source\reaction\game\g_missile.c" -"C:\Games\Quake3\rq3source\reaction\game\g_mover.c" -"C:\Games\Quake3\rq3source\reaction\game\g_session.c" -"C:\Games\Quake3\rq3source\reaction\game\g_spawn.c" -"C:\Games\Quake3\rq3source\reaction\game\g_svcmds.c" -"C:\Games\Quake3\rq3source\reaction\game\g_syscalls.c" -"C:\Games\Quake3\rq3source\reaction\game\g_target.c" -"C:\Games\Quake3\rq3source\reaction\game\g_team.c" -"C:\Games\Quake3\rq3source\reaction\game\g_teamplay.c" -"C:\Games\Quake3\rq3source\reaction\game\g_trigger.c" -"C:\Games\Quake3\rq3source\reaction\game\g_utils.c" -"C:\Games\Quake3\rq3source\reaction\game\g_weapon.c" -"C:\Games\Quake3\rq3source\reaction\game\rxn_game.c" -"C:\Games\Quake3\rq3source\reaction\game\zcam.c" -"C:\Games\Quake3\rq3source\reaction\game\zcam_target.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP14.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP15.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPC8.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPC9.tmp" with contents [ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib" \reactionoutput\ai_chat.obj @@ -97,64 +55,17 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows \reactionoutput\zcam.obj \reactionoutput\zcam_target.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP15.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPC9.tmp"

Output Window

Compiling... -ai_chat.c -ai_cmd.c -ai_dmnet.c -ai_dmq3.c -C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c(2703) : warning C4101: 'info1' : unreferenced local variable -C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c(2703) : warning C4101: 'info2' : unreferenced local variable -ai_main.c -ai_team.c -ai_vcmd.c -g_active.c -g_arenas.c -g_bot.c -g_client.c -g_cmds.c -C:\Games\Quake3\rq3source\reaction\game\g_client.c(1572) : warning C4701: local variable 'classname' may be used without having been initialized -g_combat.c -g_fileio.c -C:\Games\Quake3\rq3source\reaction\game\g_combat.c(2123) : warning C4700: local variable 'asave' used without having been initialized -g_items.c -g_main.c -g_matchmode.c -g_mem.c g_misc.c -g_missile.c -g_mover.c -g_session.c -g_spawn.c -g_svcmds.c -g_syscalls.c -g_target.c -g_team.c -g_teamplay.c -g_trigger.c -g_utils.c -g_weapon.c -rxn_game.c -C:\Games\Quake3\rq3source\reaction\game\g_weapon.c(1998) : warning C4701: local variable 'tr' may be used without having been initialized -zcam.c -zcam_target.c Linking... Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp

Results

-qagamex86.dll - 0 error(s), 5 warning(s) -

---------------------Configuration: ui - Win32 Release TA-------------------- -

-

Command Lines

- - - -

Results

-uix86.dll - 0 error(s), 0 warning(s) +qagamex86.dll - 0 error(s), 0 warning(s)
diff --git a/reaction/ta_ui/ta_ui.plg b/reaction/ta_ui/ta_ui.plg index 901ce83b..a877b1e2 100644 --- a/reaction/ta_ui/ta_ui.plg +++ b/reaction/ta_ui/ta_ui.plg @@ -6,13 +6,18 @@ --------------------Configuration: ui - Win32 Release TA--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB7.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB1.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\ta_ui\ui_atoms.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_gameinfo.c" "C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_players.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_shared.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB7.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB8.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB1.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB2.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:"../Release/uix86.dll" /implib:"Release_TA/uix86.lib" .\Release_TA\bg_misc.obj @@ -26,10 +31,15 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB8.tmp" with conten .\Release_TA\ui_syscalls.obj .\Release_TA\ui_util.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB8.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB2.tmp"

Output Window

Compiling... +ui_atoms.c +ui_gameinfo.c ui_main.c +ui_players.c +ui_shared.c +ui_syscalls.c Linking... Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp diff --git a/reaction/ta_ui/ui_local.h b/reaction/ta_ui/ui_local.h index 800e455f..68b63cd2 100644 --- a/reaction/ta_ui/ui_local.h +++ b/reaction/ta_ui/ui_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.23 2003/02/13 21:19:50 makro +// no message +// // Revision 1.22 2002/12/09 00:58:49 makro // Items are now disabled from the weapon/item menus in teamplay // games if they are banned from the server @@ -184,6 +187,8 @@ extern vmCvar_t ui_serverStatusTimeOut; //Makro - cvar for player model display extern vmCvar_t ui_RQ3_modelCommand; +//Makro - model cvar +extern vmCvar_t ui_RQ3_model; //Makro - team counts for the join menu //Handled in cgame now diff --git a/reaction/ta_ui/ui_main.c b/reaction/ta_ui/ui_main.c index 29603fb6..7a428c73 100644 --- a/reaction/ta_ui/ui_main.c +++ b/reaction/ta_ui/ui_main.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.59 2003/02/13 21:19:51 makro +// no message +// // Revision 1.58 2002/12/09 00:58:49 makro // Items are now disabled from the weapon/item menus in teamplay // games if they are banned from the server @@ -826,6 +829,12 @@ void UI_ShowPostGame(qboolean newHigh) _UI_Refresh ================= */ +//Makro - need this variable here; moved from line ~1585 +static qboolean updateModel = qtrue; +qboolean UI_NeedToUpdateModel() +{ + return updateModel; +} void UI_DrawCenteredPic(qhandle_t image, int w, int h) { @@ -844,6 +853,7 @@ void _UI_Refresh(int realtime) { static int index; static int previousTimes[UI_FPS_FRAMES]; + int modelModCount; //if ( !( trap_Key_GetCatcher() & KEYCATCH_UI ) ) { // return; @@ -868,7 +878,18 @@ void _UI_Refresh(int realtime) uiInfo.uiDC.FPS = 1000 * UI_FPS_FRAMES / total; } + modelModCount = ui_RQ3_model.modificationCount; UI_UpdateCvars(); + if (modelModCount != ui_RQ3_model.modificationCount) { + int i; + + for (i=0;i 0) { // paint all the menus @@ -1575,7 +1596,8 @@ static void UI_DrawMapCinematic(rectDef_t * rect, float scale, vec4_t color, qbo } } -static qboolean updateModel = qtrue; +//Makro - need to use this variable around line 870; moved above +//static qboolean updateModel = qtrue; static qboolean q3Model = qfalse; static animNumber_t RQ3_UI_legsAnim = LEGS_IDLE; static animNumber_t RQ3_UI_torsoAnim = TORSO_STAND; @@ -7098,6 +7120,9 @@ vmCvar_t ui_serverStatusTimeOut; //Makro - cvar for player model display vmCvar_t ui_RQ3_modelCommand; +//Makro - model cvar +vmCvar_t ui_RQ3_model; + //Makro - for the SSG crosshair preview vmCvar_t ui_RQ3_ssgCrosshair; @@ -7290,6 +7315,8 @@ static cvarTable_t cvarTable[] = { {&ui_RQ3_modelCommand, "ui_RQ3_modelCommand", "0", 0}, {&ui_RQ3_ssgCrosshair, "ui_RQ3_ssgCrosshair", "0", 0}, {&ui_RQ3_weapAfterJoin, "ui_RQ3_weapAfterJoin", "1", CVAR_ARCHIVE}, + //Makro - model cvar + {&ui_RQ3_model, "model", "grunt/resdog", 0}, //Makro - team counts //Handled in cgame now //{ &ui_RQ3_teamCount1, "g_RQ3_teamCount1", "0", 0}, diff --git a/reaction/ta_ui/ui_shared.c b/reaction/ta_ui/ui_shared.c index c0c10b22..64b13740 100644 --- a/reaction/ta_ui/ui_shared.c +++ b/reaction/ta_ui/ui_shared.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.25 2003/02/13 21:19:51 makro +// no message +// // Revision 1.24 2002/11/09 13:05:02 makro // g_RQ3_teamXname cvars are now used in the join menu // @@ -83,6 +86,7 @@ //Makro - to avoid a warning int UI_SelectedQ3Head(qboolean doUpdate); +qboolean UI_NeedToUpdateModel(); #define SCROLL_TIME_START 500 #define SCROLL_TIME_ADJUST 150 @@ -3155,10 +3159,40 @@ static void Display_CloseCinematics() } } -void Menus_Activate(menuDef_t * menu) +//Makro - select the right player model icon +void UI_RQ3_SelectPlayerIcon(menuDef_t *menu) { int i; + for (i = 0; i < menu->itemCount; i++) { + if (menu->items[i]->type == ITEM_TYPE_LISTBOX && menu->items[i]->special == FEEDER_Q3HEADS) { + //Makro - select the right player model icon + listBoxDef_t *listPtr = (listBoxDef_t *) menu->items[i]->typeData; + int size = 2, start = 0, end = 2, pos = UI_SelectedQ3Head(qtrue); + + if (listPtr->elementWidth) { + size = (int) (menu->items[i]->window.rect.w / listPtr->elementWidth); + if (size >= 2) { + start = listPtr->startPos; + end = listPtr->endPos; + if (start + size <= pos || pos + size <= end) + start = ((int) (pos / size)) * size; + if (start + size > DC->feederCount(FEEDER_Q3HEADS)) + start = DC->feederCount(FEEDER_Q3HEADS) - size; + if (start < 0) + start = 0; + listPtr->startPos = start; + listPtr->endPos = start + size; + } + } + listPtr->cursorPos = pos; + menu->items[i]->cursorPos = pos; + } + } +} + +void Menus_Activate(menuDef_t * menu) +{ //Makro - it's better to check for this kind of stuff if (!menu) { return; @@ -3185,31 +3219,7 @@ void Menus_Activate(menuDef_t * menu) } //Makro - select the right player model icon - for (i = 0; i < menu->itemCount; i++) { - if (menu->items[i]->type == ITEM_TYPE_LISTBOX && menu->items[i]->special == FEEDER_Q3HEADS) { - //Makro - select the right player model icon - listBoxDef_t *listPtr = (listBoxDef_t *) menu->items[i]->typeData; - int size = 2, start = 0, end = 2, pos = UI_SelectedQ3Head(qtrue); - - if (listPtr->elementWidth) { - size = (int) (menu->items[i]->window.rect.w / listPtr->elementWidth); - if (size >= 2) { - start = listPtr->startPos; - end = listPtr->endPos; - if (start + size <= pos || pos + size <= end) - start = ((int) (pos / size)) * size; - if (start + size > DC->feederCount(FEEDER_Q3HEADS)) - start = DC->feederCount(FEEDER_Q3HEADS) - size; - if (start < 0) - start = 0; - listPtr->startPos = start; - listPtr->endPos = start + size; - } - } - listPtr->cursorPos = pos; - menu->items[i]->cursorPos = pos; - } - } + UI_RQ3_SelectPlayerIcon(menu); Display_CloseCinematics(); @@ -5136,6 +5146,9 @@ void Menu_Paint(menuDef_t * menu, qboolean forcePaint) if (forcePaint) { menu->window.flags |= WINDOW_FORCED; } + //Makro - kinda hackish; oh well... + if (UI_NeedToUpdateModel()) + UI_RQ3_SelectPlayerIcon(menu); //Makro - see if we have any onShow script if (!(menu->shown)) { //If it's the first time a menu is shown, look for a onFirstShow script diff --git a/reaction/ta_ui/ui_shared.h b/reaction/ta_ui/ui_shared.h index 3492d872..87a0f817 100644 --- a/reaction/ta_ui/ui_shared.h +++ b/reaction/ta_ui/ui_shared.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.15 2003/02/13 21:19:51 makro +// no message +// // Revision 1.14 2002/06/22 19:20:57 makro // Changed number of custom SSG crosshairs to 6 // @@ -489,6 +492,8 @@ menuDef_t *Menus_ActivateByName(const char *p); void Menu_Reset(); qboolean Menus_AnyFullScreenVisible(); void Menus_Activate(menuDef_t * menu); +//Makro - select the right player model icon +void UI_RQ3_SelectPlayerIcon(menuDef_t *menu); displayContextDef_t *Display_GetContext(); void *Display_CaptureItem(int x, int y); diff --git a/reaction/uifiles/credit.menu b/reaction/uifiles/credit.menu index a4bf4e1e..aeed3376 100644 --- a/reaction/uifiles/credit.menu +++ b/reaction/uifiles/credit.menu @@ -10,7 +10,7 @@ visible 0 // Visible on open focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items timedItems 39 - timerInterval 5500 + timerInterval 3000 fadeCycle 500 // how often fade happens in milliseconds fadeAmount 0.01 // amount to adjust alpha per cycle @@ -148,7 +148,7 @@ textscale .3 textalignx 220 textaligny 120 - text "(c) 2000 - 2002 REACTION QUAKE 3 TEAM\n\n\n" + text "(c) 2000 - 2003 REACTION QUAKE 3 TEAM\n\n\n" "www.reactionquake3.com" autowrapped visible 1 @@ -1399,7 +1399,7 @@ textalignx 220 textaligny 80 text "THIS HAS BEEN A REACTION QUAKE 3\nTEAM PRODUCTION\n\n" - "Copyright 2000 - 2002" + "Copyright 2000 - 2003" autowrapped visible 1 decoration diff --git a/reaction/uifiles/ingame_matchmode_referee.menu b/reaction/uifiles/ingame_matchmode_referee.menu index b98a8d73..b0ef75e4 100644 --- a/reaction/uifiles/ingame_matchmode_referee.menu +++ b/reaction/uifiles/ingame_matchmode_referee.menu @@ -406,7 +406,7 @@ type ITEM_TYPE_BUTTON style 0 textscale .225 - rect 84 56 188 20 + rect 84 44 188 20 textalign ITEM_ALIGN_CENTER textalignx 88 textaligny 12 @@ -423,7 +423,7 @@ type ITEM_TYPE_BUTTON style 0 textscale .225 - rect 84 76 188 20 + rect 84 64 188 20 textalign ITEM_ALIGN_CENTER textalignx 88 textaligny 12 @@ -440,7 +440,7 @@ type ITEM_TYPE_BUTTON style 0 textscale .225 - rect 84 96 188 20 + rect 84 84 188 20 textalign ITEM_ALIGN_CENTER textalignx 88 textaligny 12 @@ -457,7 +457,7 @@ type ITEM_TYPE_BUTTON style 0 textscale .225 - rect 84 116 188 20 + rect 84 104 188 20 textalign ITEM_ALIGN_CENTER textalignx 88 textaligny 12 @@ -466,6 +466,23 @@ action { play "sound/misc/menu1.wav" ; exec "ref resetmatch"; uiScript closeingame } } + itemDef { + name match + group grpReferee + text "Hear All" + shortcutKey "H" + type ITEM_TYPE_BUTTON + style 0 + textscale .225 + rect 84 124 188 20 + textalign ITEM_ALIGN_CENTER + textalignx 88 + textaligny 12 + forecolor 1 1 1 1 + visible 0 + action { play "sound/misc/menu1.wav" ; exec "ref hearall"; uiScript closeingame } + } + itemDef { name match group grpReferee @@ -474,7 +491,7 @@ type ITEM_TYPE_BUTTON style 0 textscale .225 - rect 84 156 188 20 + rect 84 164 188 20 textalign ITEM_ALIGN_CENTER textalignx 88 textaligny 12 diff --git a/reaction/uifiles/main.menu b/reaction/uifiles/main.menu index 0a370f51..726871f0 100644 --- a/reaction/uifiles/main.menu +++ b/reaction/uifiles/main.menu @@ -149,7 +149,7 @@ name copyright autowrapped text "Reaction Quake 3 Beta 2.3\n" - "Copyright (c) 2000 - 2002 Reaction Quake 3 Team\n" + "Copyright (c) 2000 - 2003 Reaction Quake 3 Team\n" "Quake III Arena (c) 1999 - 2000 id Software Inc." style 0 textscale .15