diff options
author | Tim Angus <tim@ngus.net> | 2004-01-19 19:21:19 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-01-19 19:21:19 +0000 |
commit | c60908dce88434be260a07a804c8985c763ed7f8 (patch) | |
tree | 125a0d624146b8ec34033fa2b0a44b17012b5a34 /src/game/g_active.c | |
parent | 73d22e1004003af65b2e1adba19649bb9933a42e (diff) |
* 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
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 ); |