summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/bg_misc.c139
-rw-r--r--src/game/g_client.c6
-rw-r--r--src/game/g_cmds.c25
-rw-r--r--src/game/g_spawn.c12
-rw-r--r--src/game/tremulous.h58
-rw-r--r--src/ui/ui_main.c23
6 files changed, 146 insertions, 117 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index fde42787..17d47de5 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -417,7 +417,8 @@ buildableAttributes_t bg_buildableList[ ] =
TR_GRAVITY, //trType_t traj;
0.0, //float bounce;
BANK_BP, //int buildPoints;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ //( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ 0, //DISABLE BANK //int stages
BANK_HEALTH, //int health;
0, //int regenRate;
BANK_SPLASHDAMAGE, //int splashDamage;
@@ -1255,7 +1256,7 @@ classAttributes_t bg_classList[ ] =
{ 15, 15, 6 }, //vec3_t crouchmaxs;
{ -15, -15, -4 }, //vec3_t deadmins;
{ 15, 15, 4 }, //vec3_t deadmaxs;
- 6, 6, //int viewheight, crouchviewheight;
+ 7, 7, //int viewheight, crouchviewheight;
SOLDIER_HEALTH, //int health;
SOLDIER_REGEN, //int regenRate;
SCA_WALLCLIMBER|SCA_CANJUMP|SCA_NOWEAPONDRIFT|
@@ -1273,66 +1274,6 @@ classAttributes_t bg_classList[ ] =
},
{
PCL_A_O_LEV1, //int classnum;
- "dragoon", //char *classname;
- "Dragoon", //char *humanname;
- "prowl", //char *modelname;
- 0.75f, //float modelScale;
- "default", //char *skinname;
- "alien_general_hud", //char *hudname;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- { -24, -24, -16 }, //vec3_t mins;
- { 24, 24, 16 }, //vec3_t maxs;
- { 24, 24, 16 }, //vec3_t crouchmaxs;
- { -24, -24, -4 }, //vec3_t deadmins;
- { 24, 24, 4 }, //vec3_t deadmaxs;
- 18, 18, //int viewheight, crouchviewheight;
- DRAGOON_HEALTH, //int health;
- DRAGOON_REGEN, //int regenRate;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|
- SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_POUNCE, //weapon_t startWeapon
- 0.0f, //float buildDist;
- 110, //int fov;
- 0.0005f, //float bob;
- 25, //int steptime;
- DRAGOON_SPEED, //float speed;
- 3.0f, //float sticky;
- { PCL_A_O_LEV2, PCL_A_O_LEV1_UPG, PCL_NONE }, //int children[ 3 ];
- DRAGOON_TTE, //int timetoevolve;
- DRAGOON_VALUE //int value;
- },
- {
- PCL_A_O_LEV1_UPG, //int classnum;
- "dragoonupg", //char *classname;
- "Dragoon Upgrade", //char *humanname;
- "prowl", //char *modelname;
- 0.75f, //float modelScale;
- "default", //char *skinname;
- "alien_general_hud", //char *hudname;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- { -24, -24, -16 }, //vec3_t mins;
- { 24, 24, 16 }, //vec3_t maxs;
- { 24, 24, 16 }, //vec3_t crouchmaxs;
- { -24, -24, -4 }, //vec3_t deadmins;
- { 24, 24, 4 }, //vec3_t deadmaxs;
- 20, 20, //int viewheight, crouchviewheight;
- DRAGOON_UPG_HEALTH, //int health;
- DRAGOON_UPG_REGEN, //int regenRate;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|
- SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_POUNCE_UPG, //weapon_t startWeapon
- 0.0f, //float buildDist;
- 110, //int fov;
- 0.0005f, //float bob;
- 25, //int steptime;
- DRAGOON_UPG_SPEED, //float speed;
- 3.0f, //float sticky;
- { PCL_A_O_LEV2, PCL_NONE, PCL_NONE }, //int children[ 3 ];
- DRAGOON_UPG_TTE, //int timetoevolve;
- DRAGOON_UPG_VALUE //int value;
- },
- {
- PCL_A_O_LEV2, //int classnum;
"hydra", //char *classname;
"Hydra", //char *humanname;
"spitter", //char *modelname;
@@ -1345,7 +1286,7 @@ classAttributes_t bg_classList[ ] =
{ 18, 18, 18 }, //vec3_t crouchmaxs;
{ -18, -18, -4 }, //vec3_t deadmins;
{ 18, 18, 4 }, //vec3_t deadmaxs;
- 18, 18, //int viewheight, crouchviewheight;
+ 9, 9, //int viewheight, crouchviewheight;
HYDRA_HEALTH, //int health;
HYDRA_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|
@@ -1353,17 +1294,17 @@ classAttributes_t bg_classList[ ] =
SCA_NOFOOTSTEPS, //int abilities;
WP_GRAB_CLAW, //weapon_t startWeapon
0.0f, //float buildDist;
- 100, //int fov;
+ 120, //int fov;
0.001f, //float bob;
25, //int steptime;
HYDRA_SPEED, //float speed;
4.0f, //float sticky;
- { PCL_A_O_LEV3, PCL_A_O_LEV2_UPG, PCL_NONE }, //int children[ 3 ];
+ { PCL_A_O_LEV2, PCL_A_O_LEV1_UPG, PCL_NONE }, //int children[ 3 ];
HYDRA_TTE, //int timetoevolve;
HYDRA_VALUE //int value;
},
{
- PCL_A_O_LEV2_UPG, //int classnum;
+ PCL_A_O_LEV1_UPG, //int classnum;
"hydraupg", //char *classname;
"Hydra Upgrade", //char *humanname;
"spitter", //char *modelname;
@@ -1376,7 +1317,7 @@ classAttributes_t bg_classList[ ] =
{ 20, 20, 20 }, //vec3_t crouchmaxs;
{ -20, -20, -4 }, //vec3_t deadmins;
{ 20, 20, 4 }, //vec3_t deadmaxs;
- 20, 20, //int viewheight, crouchviewheight;
+ 10, 10, //int viewheight, crouchviewheight;
HYDRA_UPG_HEALTH, //int health;
HYDRA_UPG_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS|
@@ -1384,16 +1325,76 @@ classAttributes_t bg_classList[ ] =
SCA_NOFOOTSTEPS, //int abilities;
WP_GRAB_CLAW_UPG, //weapon_t startWeapon
0.0f, //float buildDist;
- 100, //int fov;
+ 120, //int fov;
0.001f, //float bob;
25, //int steptime;
HYDRA_UPG_SPEED, //float speed;
4.0f, //float sticky;
- { PCL_A_O_LEV3, PCL_NONE, PCL_NONE }, //int children[ 3 ];
+ { PCL_A_O_LEV2, PCL_NONE, PCL_NONE }, //int children[ 3 ];
HYDRA_UPG_TTE, //int timetoevolve;
HYDRA_UPG_VALUE //int value;
},
{
+ PCL_A_O_LEV2, //int classnum;
+ "dragoon", //char *classname;
+ "Dragoon", //char *humanname;
+ "prowl", //char *modelname;
+ 1.0f, //float modelScale;
+ "default", //char *skinname;
+ "alien_general_hud", //char *hudname;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ { -32, -32, -21 }, //vec3_t mins;
+ { 32, 32, 21 }, //vec3_t maxs;
+ { 32, 32, 21 }, //vec3_t crouchmaxs;
+ { -32, -32, -4 }, //vec3_t deadmins;
+ { 32, 32, 4 }, //vec3_t deadmaxs;
+ 24, 24, //int viewheight, crouchviewheight;
+ DRAGOON_HEALTH, //int health;
+ DRAGOON_REGEN, //int regenRate;
+ SCA_CANJUMP|SCA_NOWEAPONDRIFT|
+ SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
+ WP_POUNCE, //weapon_t startWeapon
+ 0.0f, //float buildDist;
+ 110, //int fov;
+ 0.0005f, //float bob;
+ 25, //int steptime;
+ DRAGOON_SPEED, //float speed;
+ 3.0f, //float sticky;
+ { PCL_A_O_LEV3, PCL_A_O_LEV2_UPG, PCL_NONE }, //int children[ 3 ];
+ DRAGOON_TTE, //int timetoevolve;
+ DRAGOON_VALUE //int value;
+ },
+ {
+ PCL_A_O_LEV2_UPG, //int classnum;
+ "dragoonupg", //char *classname;
+ "Dragoon Upgrade", //char *humanname;
+ "prowl", //char *modelname;
+ 1.0f, //float modelScale;
+ "default", //char *skinname;
+ "alien_general_hud", //char *hudname;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ { -32, -32, -21 }, //vec3_t mins;
+ { 32, 32, 21 }, //vec3_t maxs;
+ { 32, 32, 21 }, //vec3_t crouchmaxs;
+ { -32, -32, -4 }, //vec3_t deadmins;
+ { 32, 32, 4 }, //vec3_t deadmaxs;
+ 27, 27, //int viewheight, crouchviewheight;
+ DRAGOON_UPG_HEALTH, //int health;
+ DRAGOON_UPG_REGEN, //int regenRate;
+ SCA_CANJUMP|SCA_NOWEAPONDRIFT|
+ SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
+ WP_POUNCE_UPG, //weapon_t startWeapon
+ 0.0f, //float buildDist;
+ 110, //int fov;
+ 0.0005f, //float bob;
+ 25, //int steptime;
+ DRAGOON_UPG_SPEED, //float speed;
+ 3.0f, //float sticky;
+ { PCL_A_O_LEV3, PCL_NONE, PCL_NONE }, //int children[ 3 ];
+ DRAGOON_UPG_TTE, //int timetoevolve;
+ DRAGOON_UPG_VALUE //int value;
+ },
+ {
PCL_A_O_LEV3, //int classnum;
"chimera", //char *classname;
"Chimera", //char *humanname;
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 472a1d5f..4c95708a 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1383,9 +1383,9 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn )
client->ps.stats[ STAT_WEAPONS2 ] = 0;
client->ps.stats[ STAT_SLOTS ] = 0;
- //no credit
- if( !spawn )
- client->ps.persistant[ PERS_CREDIT ] = 0;
+ //NON-VOLATILE CREDIT //no credit
+/* if( !spawn )
+ client->ps.persistant[ PERS_CREDIT ] = 0;*/
client->ps.eFlags = flags;
client->ps.clientNum = index;
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 98cd511b..a95f45ea 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -946,8 +946,6 @@ void Cmd_SetViewpos_f( gentity_t *ent )
}
-#define NUM_AC 3
-
/*
=================
Cmd_Class_f
@@ -965,14 +963,29 @@ void Cmd_Class_f( gentity_t *ent )
int i;
trace_t tr;
vec3_t infestOrigin, infestAngles;
- int allowedClasses[ NUM_AC ] = { PCL_A_B_BASE,
- PCL_A_O_BASE };
+ int allowedClasses[ PCL_NUM_CLASSES ];
+ int numClasses = 0;
+
int numLevels;
vec3_t fromMins, fromMaxs, toMins, toMaxs;
clientNum = ent->client - level.clients;
trap_Argv( 1, s, sizeof( s ) );
+ if( BG_FindStagesForClass( PCL_A_B_LEV1, g_alienStage.integer ) )
+ {
+ allowedClasses[ 0 ] = PCL_A_B_BASE;
+ allowedClasses[ 1 ] = PCL_A_B_LEV1;
+ allowedClasses[ 2 ] = PCL_A_O_BASE;
+ numClasses = 3;
+ }
+ else
+ {
+ allowedClasses[ 0 ] = PCL_A_B_BASE;
+ allowedClasses[ 1 ] = PCL_A_O_BASE;
+ numClasses = 2;
+ }
+
if( ent->client->pers.pteam == PTE_ALIENS &&
!( ent->client->ps.stats[ STAT_STATE ] & SS_INFESTING ) &&
!( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) &&
@@ -1012,7 +1025,7 @@ void Cmd_Class_f( gentity_t *ent )
if( numLevels && BG_FindStagesForClass( ent->client->pers.pclass, g_alienStage.integer ) )
{
//remove credit
- ent->client->ps.persistant[ PERS_CREDIT ] -= (short)( numLevels - 1 );
+ ent->client->ps.persistant[ PERS_CREDIT ] -= (short)numLevels;
ClientUserinfoChanged( clientNum );
VectorCopy( infestOrigin, ent->s.pos.trBase );
@@ -1040,7 +1053,7 @@ void Cmd_Class_f( gentity_t *ent )
if( ent->client->pers.pclass != PCL_NONE )
{
- for( i = 0; i < NUM_AC; i++ )
+ for( i = 0; i < numClasses; i++ )
{
if( allowedClasses[ i ] == ent->client->pers.pclass &&
BG_FindStagesForClass( ent->client->pers.pclass, g_alienStage.integer ) )
diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c
index 55b90229..2dec4aa2 100644
--- a/src/game/g_spawn.c
+++ b/src/game/g_spawn.c
@@ -307,8 +307,16 @@ qboolean G_CallSpawn( gentity_t *ent )
//check buildable spawn functions
if( ( buildable = BG_FindBuildNumForEntityName( ent->classname ) ) != BA_NONE )
{
- G_SpawnBuildable( ent, buildable );
- return qtrue;
+ if( BG_FindStagesForBuildable( buildable, 1 ) )
+ {
+ G_SpawnBuildable( ent, buildable );
+ return qtrue;
+ }
+ else
+ {
+ G_Printf( "G_CallSpawn: buildable disabled\n" );
+ return qfalse;
+ }
}
// check normal spawn functions
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index deb419c9..35eb7a02 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -36,6 +36,17 @@
#define SOLDIER_BITE_RANGE 32.0f
#define SOLDIER_BITE_REPEAT 500
+#define HYDRA_CLAW_DMG ADM(50)
+#define HYDRA_CLAW_RANGE 96.0f
+#define HYDRA_CLAW_REPEAT 500
+#define HYDRA_CLAW_U_REPEAT 500
+#define HYDRA_GRAB_RANGE 64.0f
+#define HYDRA_GRAB_TIME 1000
+#define HYDRA_PCLOUD_DMG ADM(5)
+#define HYDRA_PCLOUD_RANGE 200.0f
+#define HYDRA_PCLOUD_REPEAT 1000
+#define HYDRA_PCLOUD_TIME 10000
+
#define DRAGOON_CLAW_DMG ADM(75)
#define DRAGOON_CLAW_RANGE 48.0f
#define DRAGOON_CLAW_REPEAT 750
@@ -51,17 +62,6 @@
#define DRAGOON_SLOWBLOB_SPEED_MOD 0.5f
#define DRAGOON_SLOWBLOB_TIME 5000
-#define HYDRA_CLAW_DMG ADM(50)
-#define HYDRA_CLAW_RANGE 96.0f
-#define HYDRA_CLAW_REPEAT 500
-#define HYDRA_CLAW_U_REPEAT 500
-#define HYDRA_GRAB_RANGE 64.0f
-#define HYDRA_GRAB_TIME 1000
-#define HYDRA_PCLOUD_DMG ADM(5)
-#define HYDRA_PCLOUD_RANGE 200.0f
-#define HYDRA_PCLOUD_REPEAT 1000
-#define HYDRA_PCLOUD_TIME 10000
-
#define CHIMERA_CLAW_DMG ADM(75)
#define CHIMERA_CLAW_RANGE 96.0f
#define CHIMERA_CLAW_REPEAT 400
@@ -119,29 +119,29 @@
#define SOLDIER_HEALTH AHM(25)
#define SOLDIER_REGEN 1
-#define DRAGOON_SPEED 1.3f
-#define DRAGOON_TTE 3000
-#define DRAGOON_VALUE AVM(100)
-#define DRAGOON_HEALTH AHM(50)
-#define DRAGOON_REGEN 2
-
-#define DRAGOON_UPG_SPEED 1.3f
-#define DRAGOON_UPG_TTE 3000
-#define DRAGOON_UPG_VALUE AVM(120)
-#define DRAGOON_UPG_HEALTH AHM(60)
-#define DRAGOON_UPG_REGEN 3
-
#define HYDRA_SPEED 1.25f
#define HYDRA_TTE 3000
-#define HYDRA_VALUE 200
-#define HYDRA_HEALTH AHM(100)
-#define HYDRA_REGEN 4
+#define HYDRA_VALUE AVM(100)
+#define HYDRA_HEALTH AHM(50)
+#define HYDRA_REGEN 2
#define HYDRA_UPG_SPEED 1.25f
#define HYDRA_UPG_TTE 3000
-#define HYDRA_UPG_VALUE AVM(240)
-#define HYDRA_UPG_HEALTH AHM(120)
-#define HYDRA_UPG_REGEN 5
+#define HYDRA_UPG_VALUE AVM(120)
+#define HYDRA_UPG_HEALTH AHM(50)
+#define HYDRA_UPG_REGEN 3
+
+#define DRAGOON_SPEED 1.2f
+#define DRAGOON_TTE 3000
+#define DRAGOON_VALUE AVM(200)
+#define DRAGOON_HEALTH AHM(100)
+#define DRAGOON_REGEN 4
+
+#define DRAGOON_UPG_SPEED 1.2f
+#define DRAGOON_UPG_TTE 3000
+#define DRAGOON_UPG_VALUE AVM(240)
+#define DRAGOON_UPG_HEALTH AHM(120)
+#define DRAGOON_UPG_REGEN 5
#define CHIMERA_SPEED 1.2f
#define CHIMERA_TTE 3000
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index 2bfe2b18..8f20effd 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -3226,7 +3226,7 @@ static void UI_StartSinglePlayer() {
UI_GetCurrentAlienStage
===============
*/
-static stage_t UI_GetCurrentAlienStage( )
+static stage_t UI_GetCurrentAlienStage( void )
{
char buffer[ MAX_TOKEN_CHARS ];
stage_t stage, dummy;
@@ -3242,7 +3242,7 @@ static stage_t UI_GetCurrentAlienStage( )
UI_GetCurrentHumanStage
===============
*/
-static stage_t UI_GetCurrentHumanStage( )
+static stage_t UI_GetCurrentHumanStage( void )
{
char buffer[ MAX_TOKEN_CHARS ];
stage_t stage, dummy;
@@ -3258,7 +3258,7 @@ static stage_t UI_GetCurrentHumanStage( )
UI_LoadTremTeams
===============
*/
-static void UI_LoadTremTeams( )
+static void UI_LoadTremTeams( void )
{
uiInfo.tremTeamCount = 3;
uiInfo.tremTeamList[ 0 ].text = String_Alloc( "Aliens" );
@@ -3279,16 +3279,23 @@ static void UI_LoadTremTeams( )
UI_LoadTremAlienClasses
===============
*/
-static void UI_LoadTremAlienClasses( )
+static void UI_LoadTremAlienClasses( void )
{
+ pClass_t bClass;
+
uiInfo.tremAlienClassCount = 2;
+ if( BG_FindStagesForClass( PCL_A_B_LEV1, UI_GetCurrentAlienStage( ) ) )
+ bClass = PCL_A_B_LEV1;
+ else
+ bClass = PCL_A_B_BASE;
+
uiInfo.tremAlienClassList[ 0 ].text =
- String_Alloc( BG_FindHumanNameForClassNum( PCL_A_B_BASE ) );
+ String_Alloc( BG_FindHumanNameForClassNum( bClass ) );
uiInfo.tremAlienClassList[ 0 ].cmd =
- String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( PCL_A_B_BASE ) ) );
+ String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( bClass ) ) );
uiInfo.tremAlienClassList[ 0 ].infopane =
- UI_FindInfoPaneByName( va( "%sclass", BG_FindNameForClassNum( PCL_A_B_BASE ) ) );
+ UI_FindInfoPaneByName( va( "%sclass", BG_FindNameForClassNum( bClass ) ) );
uiInfo.tremAlienClassList[ 1 ].text =
String_Alloc( BG_FindHumanNameForClassNum( PCL_A_O_BASE ) );
@@ -3303,7 +3310,7 @@ static void UI_LoadTremAlienClasses( )
UI_LoadTremHumanItems
===============
*/
-static void UI_LoadTremHumanItems( )
+static void UI_LoadTremHumanItems( void )
{
uiInfo.tremHumanItemCount = 2;