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 | |
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
-rw-r--r-- | src/cgame/cg_consolecmds.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_draw.c | 7 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 11 | ||||
-rw-r--r-- | src/game/bg_misc.c | 68 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 6 | ||||
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_active.c | 15 | ||||
-rw-r--r-- | src/game/g_buildable.c | 4 | ||||
-rw-r--r-- | src/game/g_cmds.c | 50 | ||||
-rw-r--r-- | src/game/g_combat.c | 4 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_main.c | 33 | ||||
-rw-r--r-- | src/game/g_svcmds.c | 28 | ||||
-rw-r--r-- | src/game/tremulous.h | 44 | ||||
-rw-r--r-- | src/ui/ui_main.c | 2 |
16 files changed, 183 insertions, 98 deletions
diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index 5120be94..80cd1293 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -291,4 +291,6 @@ void CG_InitConsoleCommands( void ) trap_AddCommand( "ui_menu" ); trap_AddCommand( "mapRotation" ); trap_AddCommand( "stopMapRotation" ); + trap_AddCommand( "alienWin" ); + trap_AddCommand( "humanWin" ); } diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index e7a8efac..5224c5b3 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -1899,13 +1899,8 @@ static void CG_DrawLagometer( rectDef_t *rect, qhandle_t shader ) float vscale; vec4_t white = { 1.0f, 1.0f, 1.0f, 1.0f }; - if( !cg_lagometer.integer ) - { - if( cg.snap->ps.pm_type != PM_INTERMISSION ) - CG_DrawDisconnect( ); - + if( cg.snap->ps.pm_type == PM_INTERMISSION ) return; - } // // draw the graph diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index ead2e602..3e512204 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -224,7 +224,7 @@ static void CG_Obituary( entityState_t *ent ) message2 = "'s buildings alone"; break; case MOD_SOLDIER_BITE: - message = "was biten by"; + message = "was bitten by"; break; case MOD_HYDRA_CLAW: message = "was swiped by"; diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index a385fea6..72d20f6c 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -858,6 +858,17 @@ static void CG_ServerCommand( void ) return; } + + if( !strcmp( cmd, "weaponswitch" ) ) + { + if( trap_Argc( ) == 2 ) + { + cg.weaponSelect = atoi( CG_Argv( 1 ) ); + cg.weaponSelectTime = cg.time; + } + + return; + } CG_Printf( "Unknown client game command: %s\n", cmd ); } diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 0386c42d..ee3fdf7f 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -1424,6 +1424,7 @@ classAttributes_t bg_classList[ ] = 100.0f, //float stopSpeed; 270.0f, //float jumpMagnitude; { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 0, //int cost; 0 //int value; }, { @@ -1459,7 +1460,8 @@ classAttributes_t bg_classList[ ] = 6.0f, //float friction; 100.0f, //float stopSpeed; 130.0f, //float jumpMagnitude; - { PCL_A_B_LEV1, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + { PCL_A_B_LEV1, PCL_A_O_BASE, PCL_NONE }, //int children[ 3 ]; + ABUILDER_COST, //int cost; ABUILDER_VALUE //int value; }, { @@ -1495,7 +1497,8 @@ classAttributes_t bg_classList[ ] = 6.0f, //float friction; 100.0f, //float stopSpeed; 270.0f, //float jumpMagnitude; - { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + { PCL_A_O_BASE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + ABUILDER_UPG_COST, //int cost; ABUILDER_UPG_VALUE //int value; }, { @@ -1533,6 +1536,7 @@ classAttributes_t bg_classList[ ] = 400.0f, //float stopSpeed; 250.0f, //float jumpMagnitude; { PCL_A_O_LEV1, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + SOLDIER_COST, //int cost; SOLDIER_VALUE //int value; }, { @@ -1570,6 +1574,7 @@ classAttributes_t bg_classList[ ] = 300.0f, //float stopSpeed; 270.0f, //float jumpMagnitude; { PCL_A_O_LEV2, PCL_A_O_LEV1_UPG, PCL_NONE }, //int children[ 3 ]; + HYDRA_COST, //int cost; HYDRA_VALUE //int value; }, { @@ -1607,6 +1612,7 @@ classAttributes_t bg_classList[ ] = 300.0f, //float stopSpeed; 270.0f, //float jumpMagnitude; { PCL_A_O_LEV2, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + HYDRA_UPG_COST, //int cost; HYDRA_UPG_VALUE //int value; }, { @@ -1644,6 +1650,7 @@ classAttributes_t bg_classList[ ] = 100.0f, //float stopSpeed; 400.0f, //float jumpMagnitude; { PCL_A_O_LEV3, PCL_A_O_LEV2_UPG, PCL_NONE }, //int children[ 3 ]; + CHIMERA_COST, //int cost; CHIMERA_VALUE //int value; }, { @@ -1681,6 +1688,7 @@ classAttributes_t bg_classList[ ] = 100.0f, //float stopSpeed; 400.0f, //float jumpMagnitude; { PCL_A_O_LEV3, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + CHIMERA_UPG_COST, //int cost; CHIMERA_UPG_VALUE //int value; }, { @@ -1718,6 +1726,7 @@ classAttributes_t bg_classList[ ] = 200.0f, //float stopSpeed; 270.0f, //float jumpMagnitude; { PCL_A_O_LEV4, PCL_A_O_LEV3_UPG, PCL_NONE }, //int children[ 3 ]; + DRAGOON_COST, //int cost; DRAGOON_VALUE //int value; }, { @@ -1755,6 +1764,7 @@ classAttributes_t bg_classList[ ] = 200.0f, //float stopSpeed; 270.0f, //float jumpMagnitude; { PCL_A_O_LEV4, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + DRAGOON_UPG_COST, //int cost; DRAGOON_UPG_VALUE //int value; }, { @@ -1792,6 +1802,7 @@ classAttributes_t bg_classList[ ] = 100.0f, //float stopSpeed; 170.0f, //float jumpMagnitude; { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + BMOFO_COST, //int cost; BMOFO_VALUE //int value; }, { @@ -1829,6 +1840,7 @@ classAttributes_t bg_classList[ ] = 100.0f, //float stopSpeed; 220.0f, //float jumpMagnitude; { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 0, //int cost; 0 //int value; }, { @@ -1843,7 +1855,7 @@ classAttributes_t bg_classList[ ] = "bsuit", ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0, 0, }, { 0, 0, 0, }, { 0, 0, 0, }, 0.0f, 0, 0, 0, 0.0f, 0, 0, WP_NONE, 0.0f, 0, - 0.0f, 1.0f, 0, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 270.0f, { PCL_NONE, PCL_NONE, PCL_NONE }, 0 + 0.0f, 1.0f, 0, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 270.0f, { PCL_NONE, PCL_NONE, PCL_NONE }, 0, 0 } }; @@ -2521,36 +2533,41 @@ BG_ClassCanEvolveFromTo */ int BG_ClassCanEvolveFromTo( int fclass, int tclass, int credits, int num ) { - int i, j; + int i, j, cost; + cost = BG_FindCostOfClass( tclass ); + //base case - if( credits == 0 ) - return 0; + if( credits < cost ) + return -1; if( fclass == PCL_NONE || tclass == PCL_NONE ) - return 0; + return -1; for( i = 0; i < bg_numPclasses; i++ ) { if( bg_classList[ i ].classNum == fclass ) { - for( j = 0; j <= 3; j++ ) + for( j = 0; j < 3; j++ ) if( bg_classList[ i ].children[ j ] == tclass ) - return num + 1; + return num + cost; - for( j = 0; j <= 3; j++ ) + for( j = 0; j < 3; j++ ) { - int sub = BG_ClassCanEvolveFromTo( bg_classList[ i ].children[ j ], - tclass, credits - 1, num + 1 ); - if( sub ) + int sub; + + cost = BG_FindCostOfClass( bg_classList[ i ].children[ j ] ); + sub = BG_ClassCanEvolveFromTo( bg_classList[ i ].children[ j ], + tclass, credits - cost, num + cost ); + if( sub >= 0 ) return sub; } - return 0; //may as well return by this point + return -1; //may as well return by this point } } - return 0; + return -1; } /* @@ -2576,6 +2593,27 @@ int BG_FindValueOfClass( int pclass ) /* ============== +BG_FindCostOfClass +============== +*/ +int BG_FindCostOfClass( int pclass ) +{ + int i; + + for( i = 0; i < bg_numPclasses; i++ ) + { + if( bg_classList[ i ].classNum == pclass ) + { + return bg_classList[ i ].cost; + } + } + + Com_Printf( S_COLOR_YELLOW "WARNING: fallthrough in BG_FindCostOfClass\n" ); + return 0; +} + +/* +============== BG_FindOverrideForClass ============== */ diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 9141f472..b90db531 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2682,6 +2682,12 @@ static void PM_Weapon( void ) } else pm->ps->pm_flags &= ~PMF_USE_ITEM_HELD; + + if( pm->ps->weapon != pm->cmd.weapon && pm->ps->pm_flags & PMF_WEAPON_SWITCH ) + { + pm->ps->pm_flags &= ~PMF_WEAPON_SWITCH; + PM_BeginWeaponChange( pm->cmd.weapon ); + } } if( pm->ps->weaponTime > 0 ) diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 09f01060..a516c36e 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -141,6 +141,7 @@ typedef enum #define PMF_SCOREBOARD 8192 // spectate as a scoreboard #define PMF_TIME_WALLJUMP 16384 //TA: for limiting wall jumping #define PMF_CHARGE 32768 //TA: keep track of pouncing +#define PMF_WEAPON_SWITCH 65536 //TA: force a weapon switch #define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK|PMF_TIME_WALLJUMP) @@ -907,6 +908,7 @@ typedef struct float jumpMagnitude; int children[ 3 ]; + int cost; int value; } classAttributes_t; @@ -1128,6 +1130,7 @@ qboolean BG_ClassHasAbility( int pclass, int ability ); weapon_t BG_FindStartWeaponForClass( int pclass ); float BG_FindBuildDistForClass( int pclass ); int BG_ClassCanEvolveFromTo( int fclass, int tclass, int credits, int num ); +int BG_FindCostOfClass( int pclass ); int BG_FindValueOfClass( int pclass ); void BG_InitClassOverrides( void ); 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 ); diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 02956095..fe6d0362 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -933,7 +933,7 @@ static qboolean APropHovel_Blocked( vec3_t origin, vec3_t angles, vec3_t normal, VectorCopy( angles, hovel.s.angles ); VectorCopy( normal, hovel.s.origin2 ); - return AHovel_Use( &hovel, player, qfalse ); + return AHovel_Blocked( &hovel, player, qfalse ); } /* @@ -2201,7 +2201,7 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin built->takedamage = qfalse; built->spawned = qfalse; - built->buildTime = level.time; + built->buildTime = built->s.time = level.time; //things that vary for each buildable that aren't in the dbase switch( buildable ) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 3039b1ee..1f4de832 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1008,7 +1008,7 @@ void Cmd_Class_f( gentity_t *ent ) if( !tr.startsolid ) { //...check we can evolve to that class - if( numLevels && BG_FindStagesForClass( ent->client->pers.classSelection, g_alienStage.integer ) ) + if( numLevels >= 0 && BG_FindStagesForClass( ent->client->pers.classSelection, g_alienStage.integer ) ) { //remove credit ent->client->ps.persistant[ PERS_CREDIT ] -= (short)numLevels; @@ -1343,7 +1343,11 @@ void Cmd_Buy_f( gentity_t *ent ) BG_packAmmoArray( weapon, ent->client->ps.ammo, ent->client->ps.powerups, quan, clips, maxClips ); + + //force a weapon change + ent->client->ps.pm_flags |= PMF_WEAPON_SWITCH; ent->client->ps.weapon = weapon; + trap_SendServerCommand( ent->client->ps.clientNum, va( "weaponswitch %d", weapon ) ); //set build delay/pounce etc to 0 ent->client->ps.stats[ STAT_MISC ] = 0; @@ -1665,46 +1669,6 @@ void Cmd_Test_f( gentity_t *ent ) /* ================= -Cmd_AlienWin_f -================= -*/ -void Cmd_AlienWin_f( gentity_t *ent ) -{ - int i; - gentity_t *e; - - if( !CheatsOk( ent ) ) - return; - - for( i = 1, e = g_entities+i; i < level.num_entities; i++, e++ ) - { - if( e->s.modelindex == BA_H_SPAWN ) - G_Damage( e, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE ); - } -} - -/* -================= -Cmd_HumanWin_f -================= -*/ -void Cmd_HumanWin_f( gentity_t *ent ) -{ - int i; - gentity_t *e; - - if( !CheatsOk( ent ) ) - return; - - for( i = 1, e = g_entities+i; i < level.num_entities; i++, e++ ) - { - if( e->s.modelindex == BA_A_SPAWN ) - G_Damage( e, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE ); - } -} - -/* -================= ClientCommand ================= */ @@ -1800,10 +1764,6 @@ void ClientCommand( int clientNum ) Cmd_SetViewpos_f( ent ); else if( Q_stricmp( cmd, "test" ) == 0 ) Cmd_Test_f( ent ); - else if( Q_stricmp( cmd, "alienWin" ) == 0 ) - Cmd_AlienWin_f( ent ); - else if( Q_stricmp( cmd, "humanWin" ) == 0 ) - Cmd_HumanWin_f( ent ); else trap_SendServerCommand( clientNum, va( "print \"unknown cmd %s\n\"", cmd ) ); } diff --git a/src/game/g_combat.c b/src/game/g_combat.c index ad247227..265ee182 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -224,9 +224,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int attacker->client->lastKillTime = level.time; if( attacker->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) - level.alienKills++; + trap_Cvar_Set( "g_alienKills", va( "%d", g_alienKills.integer + 1 ) ); else if( attacker->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) - level.humanKills++; + trap_Cvar_Set( "g_humanKills", va( "%d", g_humanKills.integer + 1 ) ); } } diff --git a/src/game/g_local.h b/src/game/g_local.h index 64e4a83a..16b40896 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -907,10 +907,12 @@ extern vmCvar_t g_singlePlayer; extern vmCvar_t g_humanBuildPoints; extern vmCvar_t g_alienBuildPoints; extern vmCvar_t g_humanStage; +extern vmCvar_t g_humanKills; extern vmCvar_t g_humanMaxStage; extern vmCvar_t g_humanStage2Threshold; extern vmCvar_t g_humanStage3Threshold; extern vmCvar_t g_alienStage; +extern vmCvar_t g_alienKills; extern vmCvar_t g_alienMaxStage; extern vmCvar_t g_alienStage2Threshold; extern vmCvar_t g_alienStage3Threshold; diff --git a/src/game/g_main.c b/src/game/g_main.c index a5e60315..e6e981a3 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -78,10 +78,12 @@ vmCvar_t g_listEntity; vmCvar_t g_humanBuildPoints; vmCvar_t g_alienBuildPoints; vmCvar_t g_humanStage; +vmCvar_t g_humanKills; vmCvar_t g_humanMaxStage; vmCvar_t g_humanStage2Threshold; vmCvar_t g_humanStage3Threshold; vmCvar_t g_alienStage; +vmCvar_t g_alienKills; vmCvar_t g_alienMaxStage; vmCvar_t g_alienStage2Threshold; vmCvar_t g_alienStage3Threshold; @@ -158,13 +160,15 @@ static cvarTable_t gameCvarTable[ ] = { &g_humanBuildPoints, "g_humanBuildPoints", "1000", 0, 0, qfalse }, { &g_alienBuildPoints, "g_alienBuildPoints", "1000", 0, 0, qfalse }, { &g_humanStage, "g_humanStage", "0", 0, 0, qfalse }, + { &g_humanKills, "g_humanKills", "0", 0, 0, qfalse }, { &g_humanMaxStage, "g_humanMaxStage", "2", 0, 0, qfalse }, - { &g_humanStage2Threshold, "g_humanStage2Threshold", "25", 0, 0, qfalse }, - { &g_humanStage3Threshold, "g_humanStage3Threshold", "50", 0, 0, qfalse }, + { &g_humanStage2Threshold, "g_humanStage2Threshold", "15", 0, 0, qfalse }, + { &g_humanStage3Threshold, "g_humanStage3Threshold", "30", 0, 0, qfalse }, { &g_alienStage, "g_alienStage", "0", 0, 0, qfalse }, + { &g_alienKills, "g_alienKills", "0", 0, 0, qfalse }, { &g_alienMaxStage, "g_alienMaxStage", "2", 0, 0, qfalse }, - { &g_alienStage2Threshold, "g_alienStage2Threshold", "25", 0, 0, qfalse }, - { &g_alienStage3Threshold, "g_alienStage3Threshold", "50", 0, 0, qfalse }, + { &g_alienStage2Threshold, "g_alienStage2Threshold", "15", 0, 0, qfalse }, + { &g_alienStage3Threshold, "g_alienStage3Threshold", "30", 0, 0, qfalse }, { &g_debugMapRotation, "g_debugMapRotation", "0", 0, 0, qfalse }, { &g_currentMapRotation, "g_currentMapRotation", "-1", 0, 0, qfalse }, // -1 = NOT_ROTATING @@ -530,6 +534,8 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) //reset stages trap_Cvar_Set( "g_alienStage", va( "%d", S1 ) ); trap_Cvar_Set( "g_humanStage", va( "%d", S1 ) ); + trap_Cvar_Set( "g_alienKills", 0 ); + trap_Cvar_Set( "g_humanKills", 0 ); G_Printf( "-----------------------------------\n" ); @@ -754,6 +760,8 @@ void calculateBuildPoints( void ) g_alienStage.integer, g_humanStage.integer ) ); } +#define PLAYER_COUNT_MOD 10.0f + /* ============ CalculateStages @@ -761,17 +769,26 @@ CalculateStages */ void CalculateStages( void ) { - if( level.alienKills >= g_alienStage2Threshold.integer && + float playerCountMod = (float)level.numPlayingClients / PLAYER_COUNT_MOD; + + if( playerCountMod < 0.1f ) + playerCountMod = 0.1f; + + if( g_alienKills.integer >= + (int)( (float)g_alienStage2Threshold.integer * playerCountMod ) && g_alienStage.integer == S1 && g_alienMaxStage.integer > S1 ) trap_Cvar_Set( "g_alienStage", va( "%d", S2 ) ); - if( level.alienKills >= g_alienStage3Threshold.integer && + if( g_alienKills.integer >= + (int)( (float)g_alienStage3Threshold.integer * playerCountMod ) && g_alienStage.integer == S2 && g_alienMaxStage.integer > S2 ) trap_Cvar_Set( "g_alienStage", va( "%d", S3 ) ); - if( level.humanKills >= g_humanStage2Threshold.integer && + if( g_humanKills.integer >= + (int)( (float)g_humanStage2Threshold.integer * playerCountMod ) && g_humanStage.integer == S1 && g_humanMaxStage.integer > S1 ) trap_Cvar_Set( "g_humanStage", va( "%d", S2 ) ); - if( level.humanKills >= g_humanStage3Threshold.integer && + if( g_humanKills.integer >= + (int)( (float)g_humanStage3Threshold.integer * playerCountMod ) && g_humanStage.integer == S2 && g_humanMaxStage.integer > S2 ) trap_Cvar_Set( "g_humanStage", va( "%d", S3 ) ); } diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index b0ec757b..003d6893 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -535,6 +535,34 @@ qboolean ConsoleCommand( void ) return qtrue; } + if( Q_stricmp( cmd, "alienWin" ) == 0 ) + { + int i; + gentity_t *e; + + for( i = 1, e = g_entities + i; i < level.num_entities; i++, e++ ) + { + if( e->s.modelindex == BA_H_SPAWN ) + G_Damage( e, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE ); + } + + return qtrue; + } + + if( Q_stricmp( cmd, "humanWin" ) == 0 ) + { + int i; + gentity_t *e; + + for( i = 1, e = g_entities + i; i < level.num_entities; i++, e++ ) + { + if( e->s.modelindex == BA_A_SPAWN ) + G_Damage( e, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE ); + } + + return qtrue; + } + if( g_dedicated.integer ) { if( Q_stricmp( cmd, "say" ) == 0 ) diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 55fdb4ae..bb8031ac 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -37,8 +37,8 @@ #define ABUILDER_BLOB_SPEED_MOD 0.5f #define ABUILDER_BLOB_TIME 5000 -#define SOLDIER_BITE_DMG ADM(50) -#define SOLDIER_BITE_RANGE 32.0f +#define SOLDIER_BITE_DMG ADM(60) +#define SOLDIER_BITE_RANGE 96.0f #define SOLDIER_BITE_REPEAT 500 #define HYDRA_CLAW_DMG ADM(40) @@ -110,51 +110,61 @@ #define ABUILDER_VALUE AVM(50) #define ABUILDER_HEALTH AHM(50) #define ABUILDER_REGEN 2 +#define ABUILDER_COST 0 #define ABUILDER_UPG_SPEED 1.0f #define ABUILDER_UPG_VALUE AVM(120) #define ABUILDER_UPG_HEALTH AHM(75) #define ABUILDER_UPG_REGEN 3 +#define ABUILDER_UPG_COST 0 #define SOLDIER_SPEED 1.3f #define SOLDIER_VALUE AVM(50) #define SOLDIER_HEALTH AHM(25) #define SOLDIER_REGEN 1 +#define SOLDIER_COST 0 #define HYDRA_SPEED 1.25f #define HYDRA_VALUE AVM(100) #define HYDRA_HEALTH AHM(50) #define HYDRA_REGEN 2 +#define HYDRA_COST 1 #define HYDRA_UPG_SPEED 1.25f #define HYDRA_UPG_VALUE AVM(120) #define HYDRA_UPG_HEALTH AHM(50) #define HYDRA_UPG_REGEN 2 +#define HYDRA_UPG_COST 1 #define CHIMERA_SPEED 1.2f #define CHIMERA_VALUE AVM(200) #define CHIMERA_HEALTH AHM(100) #define CHIMERA_REGEN 3 +#define CHIMERA_COST 1 #define CHIMERA_UPG_SPEED 1.2f #define CHIMERA_UPG_VALUE AVM(340) #define CHIMERA_UPG_HEALTH AHM(120) #define CHIMERA_UPG_REGEN 4 +#define CHIMERA_UPG_COST 1 #define DRAGOON_SPEED 1.2f #define DRAGOON_VALUE AVM(300) #define DRAGOON_HEALTH AHM(200) #define DRAGOON_REGEN 5 +#define DRAGOON_COST 1 #define DRAGOON_UPG_SPEED 1.2f #define DRAGOON_UPG_VALUE AVM(360) #define DRAGOON_UPG_HEALTH AHM(250) #define DRAGOON_UPG_REGEN 6 +#define DRAGOON_UPG_COST 1 #define BMOFO_SPEED 1.1f #define BMOFO_VALUE AVM(400) #define BMOFO_HEALTH AHM(400) #define BMOFO_REGEN 7 +#define BMOFO_COST 2 @@ -172,7 +182,7 @@ * */ -#define ALIEN_BHLTH_MODIFIER 1.5f +#define ALIEN_BHLTH_MODIFIER 0.5f #define ABHM(h) ((int)((float)h*ALIEN_BHLTH_MODIFIER)) #define CREEP_BASESIZE 700 @@ -191,7 +201,7 @@ #define BARRICADE_BP 80 #define BARRICADE_BT 10000 -#define BARRICADE_HEALTH ABHM(250) +#define BARRICADE_HEALTH ABHM(500) #define BARRICADE_REGEN 15 #define BARRICADE_SPLASHDAMAGE 50 #define BARRICADE_SPLASHRADIUS 50 @@ -199,7 +209,7 @@ #define BOOSTER_BP 120 #define BOOSTER_BT 10000 -#define BOOSTER_HEALTH ABHM(200) +#define BOOSTER_HEALTH ABHM(300) #define BOOSTER_REGEN 10 #define BOOSTER_SPLASHDAMAGE 50 #define BOOSTER_SPLASHRADIUS 50 @@ -208,7 +218,7 @@ #define ACIDTUBE_BP 50 #define ACIDTUBE_BT 10000 -#define ACIDTUBE_HEALTH ABHM(100) +#define ACIDTUBE_HEALTH ABHM(200) #define ACIDTUBE_REGEN 10 #define ACIDTUBE_SPLASHDAMAGE 40 #define ACIDTUBE_SPLASHRADIUS 300 @@ -218,7 +228,7 @@ #define HIVE_BP 50 #define HIVE_BT 10000 -#define HIVE_HEALTH ABHM(100) +#define HIVE_HEALTH ABHM(200) #define HIVE_REGEN 10 #define HIVE_SPLASHDAMAGE 30 #define HIVE_SPLASHRADIUS 200 @@ -289,7 +299,7 @@ * */ -#define HUMAN_WDMG_MODIFIER 1.5f +#define HUMAN_WDMG_MODIFIER 1.0f #define HDM(d) ((int)((float)d*HUMAN_WDMG_MODIFIER)) #define BLASTER_REPEAT 1000 @@ -314,13 +324,13 @@ #define SHOTGUN_RELOAD 2000 #define SHOTGUN_PRICE 150 #define SHOTGUN_SPREAD 900 -#define SHOTGUN_DMG HDM(5) +#define SHOTGUN_DMG HDM(12) -#define CHAINGUN_BULLETS 300 -#define CHAINGUN_REPEAT 50 -#define CHAINGUN_PRICE 200 +#define CHAINGUN_BULLETS 200 +#define CHAINGUN_REPEAT 75 +#define CHAINGUN_PRICE 300 #define CHAINGUN_SPREAD 1200 -#define CHAINGUN_DMG HDM(10) +#define CHAINGUN_DMG HDM(6) #define FLAMER_GAS 80 #define FLAMER_REPEAT 300 @@ -334,7 +344,7 @@ #define MDRIVER_CLIPSIZE 5 #define MDRIVER_SPAWNCLIPS 2 #define MDRIVER_MAXCLIPS 3 -#define MDRIVER_PRICE 300 +#define MDRIVER_PRICE 250 #define MDRIVER_DMG HDM(100) #define MDRIVER_REPEAT 1000 #define MDRIVER_RELOAD 2000 @@ -349,7 +359,7 @@ #define PRIFLE_SPEED 1500 #define LCANNON_PRICE 400 -#define LCANNON_AMMO 30 +#define LCANNON_AMMO 60 #define LCANNON_REPEAT 500 #define LCANNON_CHARGEREPEAT 1000 #define LCANNON_RELOAD 2000 @@ -423,7 +433,7 @@ * */ -#define HUMAN_BHLTH_MODIFIER 1.0f +#define HUMAN_BHLTH_MODIFIER 0.5f #define HBHM(h) ((int)((float)h*HUMAN_BHLTH_MODIFIER)) #define REACTOR_BASESIZE 1000 @@ -465,7 +475,7 @@ #define TESLAGEN_SPLASHDAMAGE 50 #define TESLAGEN_SPLASHRADIUS 100 #define TESLAGEN_REPEAT 500 -#define TESLAGEN_RANGE 750 +#define TESLAGEN_RANGE 300 #define TESLAGEN_DMG HDM(20) #define DC_BP 80 diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 502cf190..7401d000 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -3582,7 +3582,7 @@ static void UI_LoadTremAlienUpgrades( ) for( i = PCL_NONE + 1; i < PCL_NUM_CLASSES; i++ ) { - if( BG_ClassCanEvolveFromTo( class, i, credits, 0 ) && + if( BG_ClassCanEvolveFromTo( class, i, credits, 0 ) >= 0 && BG_FindStagesForClass( i, stage ) ) { uiInfo.tremAlienUpgradeList[ j ].text = String_Alloc( BG_FindHumanNameForClassNum( i ) ); |