diff --git a/Source/Client/.kdev4/Client.kdev4 b/Source/Client/.kdev4/Client.kdev4 new file mode 100755 index 00000000..5219129b --- /dev/null +++ b/Source/Client/.kdev4/Client.kdev4 @@ -0,0 +1,5 @@ +[Buildset] +BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x0c\x00C\x00l\x00i\x00e\x00n\x00t) + +[Project] +VersionControlSupport=kdevgit diff --git a/Source/Client/Client.kdev4 b/Source/Client/Client.kdev4 new file mode 100755 index 00000000..b41ac5f1 --- /dev/null +++ b/Source/Client/Client.kdev4 @@ -0,0 +1,4 @@ +[Project] +CreatedFrom=Makefile +Manager=KDevCustomMakeManager +Name=Client diff --git a/Source/Client/Draw.c b/Source/Client/Draw.c index f3bb0619..1cd9d23c 100755 --- a/Source/Client/Draw.c +++ b/Source/Client/Draw.c @@ -267,7 +267,7 @@ void CSQC_UpdateView( float fWinWidth, float fWinHeight, float fGameFocus ) { CSQC_DrawChat(); // Don't even try to draw centerprints and VGUI menus when scores are shown - if ( pSeat->iShowScores == TRUE ) { + if ( pSeat->iShowScores == TRUE || getstatf( STAT_GAMESTATE ) == GAME_OVER ) { VGUI_Scores_Show(); } else { CSQC_DrawCenterprint(); diff --git a/Source/FreeCS-CE.prj b/Source/FreeCS-CE.prj old mode 100644 new mode 100755 diff --git a/Source/Globals.h b/Source/Globals.h index 7d804b30..75a778f5 100755 --- a/Source/Globals.h +++ b/Source/Globals.h @@ -86,7 +86,8 @@ enum { GAME_COMMENCING, GAME_FREEZE, GAME_ACTIVE, - GAME_END + GAME_END, + GAME_OVER }; #define CS_WEAPON_COUNT 28 diff --git a/Source/Menu/.kdev4/Menu.kdev4 b/Source/Menu/.kdev4/Menu.kdev4 new file mode 100755 index 00000000..dd264331 --- /dev/null +++ b/Source/Menu/.kdev4/Menu.kdev4 @@ -0,0 +1,5 @@ +[Buildset] +BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00M\x00e\x00n\x00u) + +[Project] +VersionControlSupport=kdevgit diff --git a/Source/Menu/Menu.kdev4 b/Source/Menu/Menu.kdev4 new file mode 100755 index 00000000..6a0ec3c7 --- /dev/null +++ b/Source/Menu/Menu.kdev4 @@ -0,0 +1,4 @@ +[Project] +CreatedFrom=Makefile +Manager=KDevCustomMakeManager +Name=Menu diff --git a/Source/Server/.kdev4/Server.kdev4 b/Source/Server/.kdev4/Server.kdev4 index 2ffd5cd5..92f66cc6 100755 --- a/Source/Server/.kdev4/Server.kdev4 +++ b/Source/Server/.kdev4/Server.kdev4 @@ -1,2 +1,5 @@ +[Buildset] +BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x0c\x00S\x00e\x00r\x00v\x00e\x00r) + [Project] VersionControlSupport=kdevgit diff --git a/Source/Server/Client.c b/Source/Server/Client.c index aa4ee9aa..f5a5d0b6 100755 --- a/Source/Server/Client.c +++ b/Source/Server/Client.c @@ -141,7 +141,7 @@ void SV_RunClientCommand( void ) { if ( fGameState == GAME_FREEZE && self.health > 0 ) { input_movevalues = '0 0 0'; - input_buttons = 0; + //input_buttons = 0; input_impulse = 0; } diff --git a/Source/Server/Defs.h b/Source/Server/Defs.h index 3273b71f..37d48e96 100755 --- a/Source/Server/Defs.h +++ b/Source/Server/Defs.h @@ -22,7 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define VEC_PLAYER_CVIEWPOS '0 0 12' // Server cvars -var float autocvar_mp_startmoney = 800; +var int autocvar_mp_winlimit = 0; +var int autocvar_mp_halftime = 0; +var int autocvar_mp_startmoney = 800; var float autocvar_mp_buytime = 90; var float autocvar_mp_freezetime = 6; var float autocvar_mp_c4timer = 45; diff --git a/Source/Server/Input.c b/Source/Server/Input.c index e32fc9da..dfca538c 100755 --- a/Source/Server/Input.c +++ b/Source/Server/Input.c @@ -38,10 +38,6 @@ void Input_Handle( void ) { return; } - if ( fGameState == GAME_FREEZE ) { - return; - } - // TODO: Make this fast switch only if ( self.impulse == 3 ) { Weapon_Switch( SLOT_MELEE ); @@ -66,7 +62,9 @@ void Input_Handle( void ) { } if ( self.button0 ) { - Weapon_PrimaryAttack( self.weapon ); + if ( fGameState != GAME_FREEZE ) { + Weapon_PrimaryAttack( self.weapon ); + } } else if ( self.button4 ) { Weapon_Reload( self.weapon ); } else if ( self.button5 ) { diff --git a/Source/Server/Timer.c b/Source/Server/Timer.c index ee9e8c09..73ccd453 100755 --- a/Source/Server/Timer.c +++ b/Source/Server/Timer.c @@ -34,6 +34,8 @@ void Timer_Begin( float fTime, float fMode) { fGameState = GAME_END; } else if ( fMode == GAME_COMMENCING ) { fGameState = GAME_COMMENCING; + } else if ( fMode == GAME_OVER ) { + fGameState = GAME_OVER; } fGameTime = fTime; @@ -66,19 +68,32 @@ void Timer_Update( void ) { } if ( time >= ( cvar( "mp_timelimit" ) * 60 ) ) { - for ( int i = 0; i < iMapCycleCount; i++ ) { - if ( sMapCycle[ i ] == mapname ) { - if ( ( i + 1 ) < iMapCycleCount ) { - localcmd( sprintf( "changelevel %s\n", sMapCycle[ i + 1 ] ) ); - return; - } else { - localcmd( sprintf( "changelevel %s\n", sMapCycle[ 0 ] ) ); - } + Timer_Begin( 5, GAME_OVER ); + } + } + + if ( ( fGameState == GAME_OVER ) && ( fGameTime < 0 ) ) { + for ( int i = 0; i < iMapCycleCount; i++ ) { + if ( sMapCycle[ i ] == mapname ) { + if ( ( i + 1 ) < iMapCycleCount ) { + localcmd( sprintf( "changelevel %s\n", sMapCycle[ i + 1 ] ) ); + return; + } else { + localcmd( sprintf( "changelevel %s\n", sMapCycle[ 0 ] ) ); } } } } + // Okay, this means that timelimit is not the only deciding factor + if ( autocvar_mp_winlimit > 0 && fGameState != GAME_OVER ) { + if ( iWon_CT == autocvar_mp_winlimit ) { + Timer_Begin( 5, GAME_OVER ); + } else if ( iWon_T == autocvar_mp_winlimit ) { + Timer_Begin( 5, GAME_OVER ); + } + } + if ( fGameState == GAME_INACTIVE ) { return; } @@ -96,7 +111,7 @@ void Timer_Update( void ) { if ( fGameTime <= 0 ) { if ( fGameState == GAME_ACTIVE ) { Rules_TimeOver(); - Timer_Begin( 5, GAME_END); // Round is over, 5 seconds til a new round starts + Timer_Begin( 5, GAME_END ); // Round is over, 5 seconds til a new round starts } else { Timer_Begin( autocvar_mp_roundtime * 60, GAME_ACTIVE ); // Unfreeze Radio_StartMessage(); diff --git a/Source/Shared/Weapons.c b/Source/Shared/Weapons.c index d196f886..791ea2e7 100755 --- a/Source/Shared/Weapons.c +++ b/Source/Shared/Weapons.c @@ -275,6 +275,10 @@ float Weapon_AlreadyExists( float fWeapon ) { if ( self.fSlotSecondary == fWeapon ) { return TRUE; } + } else if ( wptTable[ fWeapon ].iSlot == SLOT_GRENADE ) { + if ( self.fSlotGrenade == fWeapon ) { + return TRUE; + } } } diff --git a/freecs/csprogs.dat b/freecs/csprogs.dat index ec32c0ce..6cec0ff0 100755 Binary files a/freecs/csprogs.dat and b/freecs/csprogs.dat differ diff --git a/freecs/menu.dat b/freecs/menu.dat index 065aef09..de9ef783 100755 Binary files a/freecs/menu.dat and b/freecs/menu.dat differ diff --git a/freecs/progs.dat b/freecs/progs.dat index 972a196c..9c6ce37b 100755 Binary files a/freecs/progs.dat and b/freecs/progs.dat differ