From c60908dce88434be260a07a804c8985c763ed7f8 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 19 Jan 2004 19:21:19 +0000 Subject: * Forced a weapon change when buying a weapon * Implemented dynamic stage boundaries * A shedload of balance tweaks * Inevitably other stuff that I've forgotten whilst SF CVS has been down --- src/game/g_active.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/game/g_active.c') 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 ); -- cgit