diff options
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index 91f45e52..9feb6721 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1140,6 +1140,8 @@ void ClientThink_real( gentity_t *ent ) vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE }; vec3_t mins, maxs, dir; int i, num; + int j; + qboolean upgrade = qfalse; //TA: look for object infront of player AngleVectors( client->ps.viewangles, view, NULL, NULL ); @@ -1171,7 +1173,18 @@ void ClientThink_real( gentity_t *ent ) if( i == num && client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) { - if( client->ps.persistant[ PERS_CREDIT ] > 0 ) + for( j = PCL_NONE + 1; j < PCL_NUM_CLASSES; j++ ) + { + if( BG_ClassCanEvolveFromTo( client->ps.stats[ STAT_PCLASS ], j, + client->ps.persistant[ PERS_CREDIT ], 0 ) >= 0 && + BG_FindStagesForClass( j, g_alienStage.integer ) ) + { + upgrade = qtrue; + break; + } + } + + if( upgrade ) { //no nearby objects and alien - show class menu G_TriggerMenu( ent->client->ps.clientNum, MN_A_INFEST ); |