diff --git a/Source/Client/Draw.c b/Source/Client/Draw.c index f7ad73c5..d8269426 100755 --- a/Source/Client/Draw.c +++ b/Source/Client/Draw.c @@ -186,6 +186,7 @@ void CSQC_UpdateView( float fWinWidth, float fWinHeight, float fGameFocus ) { HUD_Draw(); } + HUD_DrawOrbituaries(); CSQC_DrawChat(); // Don't even try to draw centerprints and VGUI menus when scores are shown diff --git a/Source/Client/Event.c b/Source/Client/Event.c index 861d6dab..f249fe9d 100755 --- a/Source/Client/Event.c +++ b/Source/Client/Event.c @@ -569,7 +569,6 @@ float CSQC_InputEvent( float fEventType, float fKey, float fCharacter, float fDe } else { return FALSE; } - return FALSE; } diff --git a/Source/Client/HUD.c b/Source/Client/HUD.c index 23f4c79e..6c057f43 100755 --- a/Source/Client/HUD.c +++ b/Source/Client/HUD.c @@ -437,7 +437,7 @@ void HUD_Draw( void ) { HUD_DrawIcons(); HUD_DrawMoney(); HUD_DrawAmmo(); - HUD_DrawOrbituaries(); + HUD_DrawProgressBar(); HUD_DrawWeaponSelect(); } diff --git a/Source/Client/Player.c b/Source/Client/Player.c index 49de2d39..68f1df63 100755 --- a/Source/Client/Player.c +++ b/Source/Client/Player.c @@ -128,7 +128,7 @@ float Player_PreDraw( void ) { vPlayerVelocity = self.velocity; - if ( autocvar_cl_thirdperson == TRUE ) { + if ( autocvar_cl_thirdperson == TRUE && getstatf( STAT_HEALTH ) > 0 ) { static vector vStart; static vector vEnd; diff --git a/Source/Client/VGUI.c b/Source/Client/VGUI.c index d8f3c87f..a0ed83c3 100755 --- a/Source/Client/VGUI.c +++ b/Source/Client/VGUI.c @@ -63,6 +63,7 @@ void CSQC_VGUI_Draw( void ) { vVGUIWindowPos_y = ( vVideoResolution_y / 2 ) - 240; VGUI_Window( vguiMenus[ fVGUI_Display - 1 ].sTitle, vVGUIWindowPos, '640 480 0' ); + iVGUIKey = 48; // Display the contents of whatever we have selected vguiMenus[ fVGUI_Display - 1 ].vDraw( vVGUIWindowPos ); } diff --git a/Source/Client/VGUI.h b/Source/Client/VGUI.h index b442ab93..38f062dd 100755 --- a/Source/Client/VGUI.h +++ b/Source/Client/VGUI.h @@ -47,6 +47,8 @@ vector vVGUIButtonPos; string sMOTDString[25]; string sMapString[35]; +var int iVGUIKey; + typedef struct { string sTitle; void( vector vPos ) vDraw; diff --git a/Source/Client/VGUIObjects.c b/Source/Client/VGUIObjects.c index 9ee64b16..bc725698 100755 --- a/Source/Client/VGUIObjects.c +++ b/Source/Client/VGUIObjects.c @@ -154,6 +154,10 @@ Draws a button, returns whether or not a mouse is hovering over it (for inherita float VGUI_Button( string sLabel, void() vFunction, vector vPosition, vector vSize ) { vector vLabelPos; + if ( iVGUIKey < 57 ) { + iVGUIKey++; + } + drawfill( vPosition, [vSize_x, 1], vVGUIColor, VGUI_WINDOW_FGALPHA ); drawfill( [vPosition_x, vPosition_y + vSize_y - 1], [vSize_x, 1], vVGUIColor, VGUI_WINDOW_FGALPHA ); drawfill( vPosition, [1, vSize_y], vVGUIColor, VGUI_WINDOW_FGALPHA ); @@ -162,8 +166,14 @@ float VGUI_Button( string sLabel, void() vFunction, vector vPosition, vector vSi // Draw the button label vLabelPos_x = vPosition_x + 16; vLabelPos_y = vPosition_y + ( ( vSize_y / 2 ) - 4 ); - - if( VGUI_CheckMouse( vPosition, vSize ) ) { + + if ( ( iVGUIKey == fInputKeyCode ) ) { + vFunction(); + fInputKeyCode = 0; + return TRUE; + } + + if ( VGUI_CheckMouse( vPosition, vSize ) ) { if ( fMouseClick == TRUE ) { vFunction(); fMouseClick = FALSE; @@ -175,7 +185,7 @@ float VGUI_Button( string sLabel, void() vFunction, vector vPosition, vector vSi } else { CSQC_DrawText( vLabelPos, sLabel, '8 8', vVGUIColor * 0.8, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE, FONT_DEFAULT ); } - + return FALSE; } diff --git a/Source/FreeCS-CE.prj b/Source/FreeCS-CE.prj index f37c1bfe..02c63429 100644 --- a/Source/FreeCS-CE.prj +++ b/Source/FreeCS-CE.prj @@ -114,5 +114,6 @@ + diff --git a/Source/Menu/Draw.c b/Source/Menu/Draw.c index d2804fdf..427bba50 100644 --- a/Source/Menu/Draw.c +++ b/Source/Menu/Draw.c @@ -62,5 +62,5 @@ void m_draw( vector vScreenSize ) { fcsMain[ iMenu ].vMenu(); Header_Draw(); - drawstring( '16 16', sprintf( "FreeCS Version %s\n", VERSION ), '8 8', '1 1 1', 1.0f, 0 ); + drawstring( '16 16', sprintf( "FreeCS Version: %s\n", __DATE__ ), '8 8', '1 1 1', 1.0f, 0 ); } diff --git a/Source/Server/Main.c b/Source/Server/Main.c index 71567285..030ebe23 100755 --- a/Source/Server/Main.c +++ b/Source/Server/Main.c @@ -169,6 +169,8 @@ void worldspawn( void ) { localcmd( sprintf( "serverinfo motdlength %i\n", iMOTDLines ) ); fclose( fmMOTD ); + localcmd( sprintf( "serverinfo fcs_ver %s\n", __DATE__ ) ); + for ( int i = 1; i < CS_WEAPON_COUNT; i++ ) { precache_model( sWeaponModels[ i ] ); } diff --git a/freecs/csprogs.dat b/freecs/csprogs.dat index 13bad44a..c74e553a 100644 Binary files a/freecs/csprogs.dat and b/freecs/csprogs.dat differ diff --git a/freecs/menu.dat b/freecs/menu.dat index d586fdbc..6d6cf0e8 100755 Binary files a/freecs/menu.dat and b/freecs/menu.dat differ diff --git a/freecs/progs.dat b/freecs/progs.dat index f6f8d562..85eac3e0 100644 Binary files a/freecs/progs.dat and b/freecs/progs.dat differ