diff options
author | Michael Levin <risujin@fastmail.fm> | 2009-10-03 11:18:02 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:14:51 +0000 |
commit | 6bff95c5978a0d4e0cb7e99232a1e61678fcf81b (patch) | |
tree | 6a6788b2b51c50707bc7f2dbdccb8cc40aab4e9c /src/ui | |
parent | 75002f6c61b3e7e3521819df0216d52c14374520 (diff) |
* Per Lakitu7's suggestion, changed spectator bounding box to match the dretch bounding box. Prevents spectators from getting stuck in the floor.
* Buildables round their health up when encoding health information for transmission, no more 0 hp buildables that aren't dead
* Removed the devmap credits hack I put in earlier
* Can now use \itemact weapon to switch to weapon, also \itemact weapon/blaster will not repeatedly force a weapon change if that weapon is already selected
* Options menu entry for "Sprint" changed to "Sprint / Dodge" with correct bind (+button6)
Norfenstein decided to switch to fractional "frags" (aka evos) for Aliens:
* BG_ClassCanEvolveFromTo rewritten to be more robust in case classes are shuffled around later
* CG_AtHighestClass and BG_UpgradeClassAvailable merged into BG_AlienCanEvolve
* Changed BG_GetValueOfHuman to BG_GetValueOfPlayer which now accomodates Aliens too
* Aliens now must receive 400 credits per frag point (9 evos = 3600 credits!)
* Aliens can only spend whole points
* TK/Suicide penalties moved to tremulous.h and converted to credit values
* Complex nasty Alien land goes bye-bye
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/ui_main.c | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 05a2ae07..23005600 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -1426,6 +1426,38 @@ void UI_Load( void ) /* =============== +UI_GetCurrentAlienStage +=============== +*/ +static stage_t UI_GetCurrentAlienStage( void ) +{ + char buffer[ MAX_TOKEN_CHARS ]; + stage_t stage, dummy; + + trap_Cvar_VariableStringBuffer( "ui_stages", buffer, sizeof( buffer ) ); + sscanf( buffer, "%d %d", ( int * ) & stage , ( int * ) & dummy ); + + return stage; +} + +/* +=============== +UI_GetCurrentHumanStage +=============== +*/ +static stage_t UI_GetCurrentHumanStage( void ) +{ + char buffer[ MAX_TOKEN_CHARS ]; + stage_t stage, dummy; + + trap_Cvar_VariableStringBuffer( "ui_stages", buffer, sizeof( buffer ) ); + sscanf( buffer, "%d %d", ( int * ) & dummy, ( int * ) & stage ); + + return stage; +} + +/* +=============== UI_DrawInfoPane =============== */ @@ -1450,7 +1482,9 @@ static void UI_DrawInfoPane( menuItem_t *item, rectDef_t *rect, float text_x, fl break; case INFOTYPE_CLASS: - value = BG_ClassCanEvolveFromTo( class, item->v.pclass, credits, 0 ); + value = ( BG_ClassCanEvolveFromTo( class, item->v.pclass, credits, + UI_GetCurrentAlienStage(), 0 ) + + ALIEN_CREDITS_PER_FRAG - 1 ) / ALIEN_CREDITS_PER_FRAG; if( value < 1 ) { @@ -1460,7 +1494,7 @@ static void UI_DrawInfoPane( menuItem_t *item, rectDef_t *rect, float text_x, fl } else { - s = va( "%s\n\n%s\n\nKills: %d", + s = va( "%s\n\n%s\n\nFrags: %d", BG_FindHumanNameForClassNum( item->v.pclass ), BG_FindInfoForClassNum( item->v.pclass ), value ); @@ -2016,39 +2050,6 @@ void UI_ServersSort( int column, qboolean force ) sizeof( int ), UI_ServersQsortCompare ); } - -/* -=============== -UI_GetCurrentAlienStage -=============== -*/ -static stage_t UI_GetCurrentAlienStage( void ) -{ - char buffer[ MAX_TOKEN_CHARS ]; - stage_t stage, dummy; - - trap_Cvar_VariableStringBuffer( "ui_stages", buffer, sizeof( buffer ) ); - sscanf( buffer, "%d %d", ( int * ) & stage , ( int * ) & dummy ); - - return stage; -} - -/* -=============== -UI_GetCurrentHumanStage -=============== -*/ -static stage_t UI_GetCurrentHumanStage( void ) -{ - char buffer[ MAX_TOKEN_CHARS ]; - stage_t stage, dummy; - - trap_Cvar_VariableStringBuffer( "ui_stages", buffer, sizeof( buffer ) ); - sscanf( buffer, "%d %d", ( int * ) & dummy, ( int * ) & stage ); - - return stage; -} - /* =============== UI_LoadTeams @@ -2380,9 +2381,7 @@ static void UI_LoadAlienUpgrades( void ) for( i = PCL_NONE + 1; i < PCL_NUM_CLASSES; i++ ) { - if( BG_ClassCanEvolveFromTo( class, i, credits, 0 ) >= 0 && - BG_FindStagesForClass( i, stage ) && - BG_ClassIsAllowed( i ) ) + if( BG_ClassCanEvolveFromTo( class, i, credits, stage, 0 ) >= 0 ) { uiInfo.alienUpgradeList[ j ].text = String_Alloc( BG_FindHumanNameForClassNum( i ) ); uiInfo.alienUpgradeList[ j ].cmd = |