diff --git a/Makefile b/Makefile index 7112bb475..f981b8c65 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ endif export CROSS_COMPILING ifndef VERSION -VERSION=1.0.1 +VERSION=1.0.2 endif ifndef VM_PREFIX diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 8edb00c0e..4c2b9b104 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -515,7 +515,7 @@ static cvarTable_t cgameCvarTable[] = { { &cg_forceBitmapFonts, "cg_forceBitmapFonts", "0", CVAR_ARCHIVE | CVAR_LATCH, RANGE_BOOL }, { &cg_drawGrappleHook, "cg_drawGrappleHook", "1", CVAR_ARCHIVE, RANGE_BOOL }, { &cg_drawBBox, "cg_drawBBox", "0", CVAR_CHEAT, RANGE_BOOL }, - { &cg_consoleFont, "cg_consoleFont", "fonts/LiberationMono-Bold.ttf", CVAR_ARCHIVE | CVAR_LATCH, RANGE_ALL }, + { &cg_consoleFont, "cg_consoleFont", "fonts/LiberationMono-Regular.ttf", CVAR_ARCHIVE | CVAR_LATCH, RANGE_ALL }, { &cg_consoleFontSize, "cg_consoleFontSize", "8", CVAR_ARCHIVE | CVAR_LATCH, RANGE_INT( 4, 24 ) }, { &cg_hudFont, "cg_hudFont", "fonts/LiberationSans-Bold.ttf", CVAR_ARCHIVE | CVAR_LATCH, RANGE_ALL }, { &cg_hudFontBorder, "cg_hudFontBorder", "2", CVAR_ARCHIVE | CVAR_LATCH, RANGE_FLOAT( 0, 10 ) }, diff --git a/code/cgame/cg_weapons.c b/code/cgame/cg_weapons.c index 0baef59df..aaa761d20 100644 --- a/code/cgame/cg_weapons.c +++ b/code/cgame/cg_weapons.c @@ -1230,7 +1230,11 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent } // make sure we aren't looking at cg.cur_lc->predictedPlayerEntity for LG - nonPredictedCent = &cg_entities[cent->currentState.playerNum]; + if ( cent == &cg.cur_lc->predictedPlayerEntity ) { + nonPredictedCent = &cg_entities[cent->currentState.playerNum]; + } else { + nonPredictedCent = cent; + } if ( !weapon->weaponModel || !weapon->flashModel ) { // use default flash origin when no flash model @@ -1252,7 +1256,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent VectorCopy( nonPredictedCent->pe.flashOrigin, flash.origin ); } - if ( ( cg.cur_lc->predictedPlayerState.eFlags & EF_FIRING ) + if ( ( nonPredictedCent->currentState.eFlags & EF_FIRING ) && ( ps || cg.cur_lc->renderingThirdPerson || cent->currentState.number != cg.cur_lc->predictedPlayerState.playerNum ) ) { // special hack for lightning gun... @@ -1314,13 +1318,6 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups ); } - // if the index of the nonPredictedCent is not the same as the playerNum - // then this is a fake player (like on the single player podiums), so - // go ahead and use the cent - if( ( nonPredictedCent - cg_entities ) != cent->currentState.playerNum ) { - nonPredictedCent = cent; - } - memset( &flash, 0, sizeof( flash ) ); VectorCopy( parent->lightingOrigin, flash.lightingOrigin ); flash.shadowPlane = parent->shadowPlane; diff --git a/code/game/bg_public.h b/code/game/bg_public.h index 359c63984..0f6cee49d 100644 --- a/code/game/bg_public.h +++ b/code/game/bg_public.h @@ -44,7 +44,7 @@ Suite 120, Rockville, Maryland 20850 USA. // Keep this in-sync with VERSION in Makefile. #ifndef PRODUCT_VERSION - #define PRODUCT_VERSION "1.0.1" + #define PRODUCT_VERSION "1.0.2" #endif // because games can change separately from the main system protocol, we need a diff --git a/code/q3_ui/ui_controls2.c b/code/q3_ui/ui_controls2.c index b5a9f3e82..3ef767cf1 100644 --- a/code/q3_ui/ui_controls2.c +++ b/code/q3_ui/ui_controls2.c @@ -129,8 +129,8 @@ enum { ID_AUTOSWITCH, ID_MOUSESPEED, ID_SELECTJOY, - ID_JOYANALOG, ID_JOYTHRESHOLD, + ID_JOYANALOG, ID_SMOOTHMOUSE }; @@ -234,8 +234,8 @@ typedef struct menuaction_s togglemenu; menutext_s selectjoy; - menuradiobutton_s joyanalog; menuslider_s joythreshold; + menuradiobutton_s joyanalog; int section; char playerModel[MAX_QPATH]; char playerHead[MAX_QPATH]; @@ -1044,8 +1044,8 @@ static void Controls_GetConfig( void ) s_controls.alwaysrun.curvalue = Com_Clamp( 0, 1, Controls_GetCvarValue( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "cl_run" ) ) ); s_controls.cyclepastgauntlet.curvalue = Com_Clamp( 0, 1, Controls_GetCvarValue( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "cg_cyclePastGauntlet" ) ) ); s_controls.autoswitch.curvalue = Com_Clamp( 0, 1, Controls_GetCvarValue( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "cg_autoswitch" ) ) ); - s_controls.joyanalog.curvalue = Com_Clamp( 0, 1, Controls_GetCvarValue( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystickUseAnalog" ) ) ); s_controls.joythreshold.curvalue = Com_Clamp( 0.05f, 0.75f, Controls_GetCvarValue( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystickThreshold" ) ) ); + s_controls.joyanalog.curvalue = Com_Clamp( 0, 1, Controls_GetCvarValue( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystickUseAnalog" ) ) ); } /* @@ -1093,8 +1093,8 @@ static void Controls_SetConfig( void ) trap_Cvar_SetValue( Com_LocalPlayerCvarName( s_controls.localPlayerNum, "cl_run" ), s_controls.alwaysrun.curvalue ); trap_Cvar_SetValue( Com_LocalPlayerCvarName( s_controls.localPlayerNum, "cg_cyclePastGauntlet" ), s_controls.cyclepastgauntlet.curvalue ); trap_Cvar_SetValue( Com_LocalPlayerCvarName( s_controls.localPlayerNum, "cg_autoswitch" ), s_controls.autoswitch.curvalue ); - trap_Cvar_SetValue( Com_LocalPlayerCvarName( s_controls.localPlayerNum, "in_joystickUseAnalog" ), s_controls.joyanalog.curvalue ); trap_Cvar_SetValue( Com_LocalPlayerCvarName( s_controls.localPlayerNum, "in_joystickThreshold" ), s_controls.joythreshold.curvalue ); + trap_Cvar_SetValue( Com_LocalPlayerCvarName( s_controls.localPlayerNum, "in_joystickUseAnalog" ), s_controls.joyanalog.curvalue ); } /* @@ -1132,8 +1132,8 @@ static void Controls_SetDefaults( void ) s_controls.autoswitch.curvalue = Controls_GetCvarDefault( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "cg_autoswitch" ) ); trap_Cvar_SetValue(Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystick"), 0); trap_Cvar_SetValue(Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystickNo"), 0); - s_controls.joyanalog.curvalue = Controls_GetCvarDefault( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystickUseAnalog" ) ); s_controls.joythreshold.curvalue = Controls_GetCvarDefault( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystickThreshold" ) ); + s_controls.joyanalog.curvalue = Controls_GetCvarDefault( Com_LocalPlayerCvarName(s_controls.localPlayerNum, "in_joystickUseAnalog" ) ); } /* @@ -1410,8 +1410,8 @@ static void Controls_MenuEvent( void* ptr, int event ) case ID_ALWAYSRUN: case ID_CYCLEPASTGAUNTLET: case ID_AUTOSWITCH: - case ID_JOYANALOG: case ID_JOYTHRESHOLD: + case ID_JOYANALOG: if (event == QM_ACTIVATED) { s_controls.changesmade = qtrue; @@ -1919,14 +1919,6 @@ static void Controls_MenuInit( int localPlayerNum ) s_controls.selectjoy.color = text_color_normal; s_controls.selectjoy.style = UI_RIGHT|UI_SMALLFONT; - s_controls.joyanalog.generic.type = MTYPE_RADIOBUTTON; - s_controls.joyanalog.generic.flags = QMF_SMALLFONT; - s_controls.joyanalog.generic.x = SCREEN_WIDTH/2; - s_controls.joyanalog.generic.name = "analog input"; - s_controls.joyanalog.generic.id = ID_JOYANALOG; - s_controls.joyanalog.generic.callback = Controls_MenuEvent; - s_controls.joyanalog.generic.statusbar = Controls_StatusBar; - s_controls.joythreshold.generic.type = MTYPE_SLIDER; s_controls.joythreshold.generic.x = SCREEN_WIDTH/2; s_controls.joythreshold.generic.flags = QMF_SMALLFONT; @@ -1937,6 +1929,14 @@ static void Controls_MenuInit( int localPlayerNum ) s_controls.joythreshold.maxvalue = 0.75f; s_controls.joythreshold.generic.statusbar = Controls_StatusBar; + s_controls.joyanalog.generic.type = MTYPE_RADIOBUTTON; + s_controls.joyanalog.generic.flags = QMF_SMALLFONT; + s_controls.joyanalog.generic.x = SCREEN_WIDTH/2; + s_controls.joyanalog.generic.name = "analog input"; + s_controls.joyanalog.generic.id = ID_JOYANALOG; + s_controls.joyanalog.generic.callback = Controls_MenuEvent; + s_controls.joyanalog.generic.statusbar = Controls_StatusBar; + s_controls.name.generic.type = MTYPE_PTEXT; s_controls.name.generic.flags = QMF_CENTER_JUSTIFY|QMF_INACTIVE; s_controls.name.generic.x = 320; @@ -1967,8 +1967,8 @@ static void Controls_MenuInit( int localPlayerNum ) Menu_AddItem( &s_controls.menu, &s_controls.centerview ); Menu_AddItem( &s_controls.menu, &s_controls.zoomview ); Menu_AddItem( &s_controls.menu, &s_controls.selectjoy ); - Menu_AddItem( &s_controls.menu, &s_controls.joyanalog ); Menu_AddItem( &s_controls.menu, &s_controls.joythreshold ); + Menu_AddItem( &s_controls.menu, &s_controls.joyanalog ); Menu_AddItem( &s_controls.menu, &s_controls.alwaysrun ); Menu_AddItem( &s_controls.menu, &s_controls.run ); diff --git a/code/q3_ui/ui_teamorders.c b/code/q3_ui/ui_teamorders.c index 82c174307..deb125f5c 100644 --- a/code/q3_ui/ui_teamorders.c +++ b/code/q3_ui/ui_teamorders.c @@ -393,7 +393,7 @@ static void UI_TeamOrdersMenu_BuildBotList( void ) { int numPlayers; int isBot; int n; - char playerTeam = '3'; + char playerTeam; char botTeam; char info[MAX_INFO_STRING]; @@ -408,14 +408,16 @@ static void UI_TeamOrdersMenu_BuildBotList( void ) { numPlayers = atoi( Info_ValueForKey( info, "sv_maxclients" ) ); teamOrdersMenuInfo.gametype = atoi( Info_ValueForKey( info, "g_gametype" ) ); - for( n = 0; n < numPlayers && teamOrdersMenuInfo.numBots < 9; n++ ) { - trap_GetConfigString( CS_PLAYERS + n, info, MAX_INFO_STRING ); + trap_GetConfigString( CS_PLAYERS + cg.localPlayers[0].playerNum, info, MAX_INFO_STRING ); + playerTeam = *Info_ValueForKey( info, "t" ); + for( n = 0; n < numPlayers && teamOrdersMenuInfo.numBots < 9; n++ ) { if( n == cg.localPlayers[0].playerNum ) { - playerTeam = *Info_ValueForKey( info, "t" ); continue; } + trap_GetConfigString( CS_PLAYERS + n, info, MAX_INFO_STRING ); + isBot = atoi( Info_ValueForKey( info, "skill" ) ); if( !isBot ) { continue;