summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_draw.c4
-rw-r--r--src/cgame/cg_servercmds.c27
-rw-r--r--src/cgame/cg_tutorial.c19
-rw-r--r--src/cgame/cg_weapons.c3
-rw-r--r--src/game/bg_misc.c35
-rw-r--r--src/game/bg_pmove.c3
-rw-r--r--src/game/bg_public.h23
-rw-r--r--src/game/g_active.c106
-rw-r--r--src/game/g_buildable.c277
-rw-r--r--src/game/g_cmds.c22
-rw-r--r--src/game/g_local.h9
-rw-r--r--src/game/tremulous.h9
12 files changed, 61 insertions, 476 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index ebdac7fd..5c7bfac7 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2387,8 +2387,7 @@ static void CG_DrawCrosshair( rectDef_t *rect, vec4_t color )
!BG_Weapon( weapon )->longRanged )
return;
- if( ( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) ||
- ( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) )
+ if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT )
return;
if( cg.renderingThirdPerson )
@@ -3265,7 +3264,6 @@ static void CG_Draw2D( void )
}
if( cg.snap->ps.persistant[ PERS_SPECSTATE ] == SPECTATOR_NOT &&
- !( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) &&
cg.snap->ps.stats[ STAT_HEALTH ] > 0 )
{
menu = Menus_FindByName( BG_ClassConfig(
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index 83f8f818..63db2ffe 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -771,13 +771,6 @@ void CG_Menu( int menu, int arg )
type = DT_BUILD;
break;
- case MN_A_ONEHOVEL:
- longMsg = "There can only be one Hovel. Deconstruct the existing one if you "
- "wish to move it.";
- shortMsg = "There can only be one Hovel";
- type = DT_BUILD;
- break;
-
case MN_A_NOBP:
longMsg = "The Overmind cannot control any more structures. Deconstruct existing "
"structures to build more.";
@@ -812,26 +805,6 @@ void CG_Menu( int menu, int arg )
type = DT_ARMOURYEVOLVE;
break;
- case MN_A_HOVEL_OCCUPIED:
- longMsg = "This Hovel is already occupied by another builder.";
- shortMsg = "This Hovel is already occupied by another builder";
- type = DT_COMMAND;
- break;
-
- case MN_A_HOVEL_BLOCKED:
- longMsg = "The exit to this Hovel is currently blocked. Please wait until it "
- "becomes clear then try again.";
- shortMsg = "The exit to this Hovel is currently blocked";
- type = DT_COMMAND;
- break;
-
- case MN_A_HOVEL_EXIT:
- longMsg = "The exit to this Hovel would always be blocked. Please choose "
- "a more suitable location.";
- shortMsg = "The exit to this Hovel would always be blocked";
- type = DT_BUILD;
- break;
-
case MN_A_INFEST:
trap_Cvar_Set( "ui_currentClass",
va( "%d %d", cg.snap->ps.stats[ STAT_CLASS ],
diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c
index 28417f68..1bc4ac8f 100644
--- a/src/cgame/cg_tutorial.c
+++ b/src/cgame/cg_tutorial.c
@@ -669,24 +669,7 @@ const char *CG_TutorialText( void )
if( ps->stats[ STAT_TEAM ] == TEAM_ALIENS )
{
- entityState_t *es = CG_BuildableInRange( ps, NULL );
-
- if( ps->stats[ STAT_STATE ] & SS_HOVELING )
- {
- Q_strcat( text, MAX_TUTORIAL_TEXT,
- va( "Press %s to exit the hovel\n",
- CG_KeyNameForCommand( "+button7" ) ) );
- }
- else if( es && es->modelindex == BA_A_HOVEL &&
- ( es->eFlags & EF_B_SPAWNED ) &&
- ( ps->stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0 ||
- ps->stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0_UPG ) )
- {
- Q_strcat( text, MAX_TUTORIAL_TEXT,
- va( "Press %s to enter the hovel\n",
- CG_KeyNameForCommand( "+button7" ) ) );
- }
- else if( BG_AlienCanEvolve( ps->stats[ STAT_CLASS ],
+ if( BG_AlienCanEvolve( ps->stats[ STAT_CLASS ],
ps->persistant[ PERS_CREDIT ],
cgs.alienStage ) )
{
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 8044fbf1..a166bf94 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -1218,8 +1218,7 @@ void CG_AddViewWeapon( playerState_t *ps )
wi = &cg_weapons[ weapon ];
cent = &cg.predictedPlayerEntity; // &cg_entities[cg.snap->ps.clientNum];
- if( ( ps->persistant[PERS_SPECSTATE] != SPECTATOR_NOT ) ||
- ( ps->stats[ STAT_STATE ] & SS_HOVELING ) )
+ if( ps->persistant[PERS_SPECSTATE] != SPECTATOR_NOT )
return;
// no weapon carried - can't draw it
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 0c23befc..ae2f5c1d 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -281,41 +281,6 @@ static const buildableAttributes_t bg_buildableList[ ] =
HIVE_VALUE, //int value;
},
{
- BA_A_HOVEL, //int buildNum;
- "hovel", //char *buildName;
- "Hovel", //char *humanName;
- "An armoured shell used by the Grangers to hide in, while "
- "the alien base is under attack. It may be entered or "
- "exited at any time.",
- "team_alien_hovel", //char *entityName;
- TR_GRAVITY, //trType_t traj;
- 0.0, //float bounce;
- HOVEL_BP, //int buildPoints;
- 0, //can't build it //int stages
- HOVEL_HEALTH, //int health;
- HOVEL_REGEN, //int regenRate;
- HOVEL_SPLASHDAMAGE, //int splashDamage;
- HOVEL_SPLASHRADIUS, //int splashRadius;
- MOD_ASPAWN, //int meansOfDeath;
- TEAM_ALIENS, //int team;
- ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon;
- BANIM_IDLE1, //int idleAnim;
- 150, //int nextthink;
- HOVEL_BT, //int buildTime;
- qtrue, //qboolean usable;
- 0, //int turretRange;
- 0, //int turretFireSpeed;
- WP_NONE, //weapon_t turretProjType;
- 0.95f, //float minNormal;
- qfalse, //qboolean invertNormal;
- qtrue, //qboolean creepTest;
- HOVEL_CREEPSIZE, //int creepSize;
- qfalse, //qboolean dccTest;
- qfalse, //qboolean transparentTest;
- qtrue, //qboolean uniqueTest;
- HOVEL_VALUE, //int value;
- },
- {
BA_H_SPAWN, //int buildNum;
"telenode", //char *buildName;
"Telenode", //char *humanName;
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index f9a36812..c9fb044d 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -2864,8 +2864,7 @@ static void PM_Weapon( void )
qboolean attack3 = pm->cmd.buttons & BUTTON_USE_HOLDABLE;
// Ignore weapons in some cases
- if( pm->ps->persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ||
- ( pm->ps->stats[ STAT_STATE ] & SS_HOVELING ) )
+ if( pm->ps->persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT )
return;
// Check for dead player
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 6fd949ff..aef295b8 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -234,16 +234,15 @@ typedef enum
#define SS_GRABBED 0x00000008
#define SS_BLOBLOCKED 0x00000010
#define SS_POISONED 0x00000020
-#define SS_HOVELING 0x00000040
-#define SS_BOOSTED 0x00000080
-#define SS_BOOSTEDWARNING 0x00000100 // booster poison is running out
-#define SS_SLOWLOCKED 0x00000200
-#define SS_CHARGING 0x00000400
-#define SS_HEALING_ACTIVE 0x00000800 // medistat for humans, creep for aliens
-#define SS_HEALING_2X 0x00001000 // medkit or double healing rate
-#define SS_HEALING_3X 0x00002000 // triple healing rate
+#define SS_BOOSTED 0x00000040
+#define SS_BOOSTEDWARNING 0x00000080 // booster poison is running out
+#define SS_SLOWLOCKED 0x00000100
+#define SS_CHARGING 0x00000200
+#define SS_HEALING_ACTIVE 0x00000400 // medistat for humans, creep for aliens
+#define SS_HEALING_2X 0x00000800 // medkit or double healing rate
+#define SS_HEALING_3X 0x00001000 // triple healing rate
-#define SB_VALID_TOGGLEBIT 0x00004000
+#define SB_VALID_TOGGLEBIT 0x00002000
// player_state->persistant[] indexes
// these fields are the only part of player_state that isn't
@@ -395,8 +394,6 @@ typedef enum
BA_A_BOOSTER,
BA_A_HIVE,
- BA_A_HOVEL,
-
BA_H_SPAWN,
BA_H_MGTURRET,
@@ -560,8 +557,6 @@ typedef enum
MN_A_CLASS,
MN_A_BUILD,
MN_A_INFEST,
- MN_A_HOVEL_OCCUPIED,
- MN_A_HOVEL_BLOCKED,
MN_A_NOEROOM,
MN_A_TOOCLOSE,
MN_A_NOOVMND_EVOLVE,
@@ -585,11 +580,9 @@ typedef enum
//alien build
MN_A_ONEOVERMIND,
- MN_A_ONEHOVEL,
MN_A_NOBP,
MN_A_NOCREEP,
MN_A_NOOVMND,
- MN_A_HOVEL_EXIT,
//human stuff
MN_H_SPAWN,
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 543cd4a4..c2cc91bf 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -354,8 +354,7 @@ void G_TouchTriggers( gentity_t *ent )
continue;
// ignore most entities if a spectator
- if( ( ent->client->sess.spectatorState != SPECTATOR_NOT ) ||
- ( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) )
+ if( ent->client->sess.spectatorState != SPECTATOR_NOT )
{
if( hit->s.eType != ET_TELEPORT_TRIGGER &&
// this is ugly but adding a new ET_? type will
@@ -1308,8 +1307,6 @@ void ClientThink_real( gentity_t *ent )
client->ps.pm_type = PM_NOCLIP;
else if( client->ps.stats[ STAT_HEALTH ] <= 0 )
client->ps.pm_type = PM_DEAD;
- else if( client->ps.stats[ STAT_STATE ] & SS_HOVELING )
- client->ps.pm_type = PM_FREEZE;
else if( client->ps.stats[ STAT_STATE ] & SS_BLOBLOCKED ||
client->ps.stats[ STAT_STATE ] & SS_GRABBED )
client->ps.pm_type = PM_GRABBED;
@@ -1520,9 +1517,6 @@ void ClientThink_real( gentity_t *ent )
if( pm.ps->pm_type == PM_DEAD )
pm.tracemask = MASK_DEADSOLID;
-
- if( pm.ps->stats[ STAT_STATE ] & SS_HOVELING )
- pm.tracemask = MASK_DEADSOLID;
else
pm.tracemask = MASK_PLAYERSOLID;
@@ -1643,82 +1637,54 @@ void ClientThink_real( gentity_t *ent )
vec3_t view, point;
gentity_t *traceEnt;
- if( client->ps.stats[ STAT_STATE ] & SS_HOVELING )
- {
- gentity_t *hovel = client->hovel;
+#define USE_OBJECT_RANGE 64
- //only let the player out if there is room
- if( !AHovel_Blocked( hovel, ent, qtrue ) )
- {
- //prevent lerping
- client->ps.eFlags ^= EF_TELEPORT_BIT;
- client->ps.eFlags &= ~EF_NODRAW;
- G_UnlaggedClear( ent );
+ int entityList[ MAX_GENTITIES ];
+ vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE };
+ vec3_t mins, maxs;
+ int i, num;
- //client leaves hovel
- client->ps.stats[ STAT_STATE ] &= ~SS_HOVELING;
+ // look for object infront of player
+ AngleVectors( client->ps.viewangles, view, NULL, NULL );
+ VectorMA( client->ps.origin, USE_OBJECT_RANGE, view, point );
+ trap_Trace( &trace, client->ps.origin, NULL, NULL, point, ent->s.number, MASK_SHOT );
- //hovel is empty
- G_SetBuildableAnim( hovel, BANIM_ATTACK2, qfalse );
- hovel->active = qfalse;
- }
- else
- {
- //exit is blocked
- G_TriggerMenu( ent->client->ps.clientNum, MN_A_HOVEL_BLOCKED );
- }
- }
+ traceEnt = &g_entities[ trace.entityNum ];
+
+ if( traceEnt && traceEnt->buildableTeam == client->ps.stats[ STAT_TEAM ] && traceEnt->use )
+ traceEnt->use( traceEnt, ent, ent ); //other and activator are the same in this context
else
{
-#define USE_OBJECT_RANGE 64
+ //no entity in front of player - do a small area search
- int entityList[ MAX_GENTITIES ];
- vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE };
- vec3_t mins, maxs;
- int i, num;
-
- // look for object infront of player
- AngleVectors( client->ps.viewangles, view, NULL, NULL );
- VectorMA( client->ps.origin, USE_OBJECT_RANGE, view, point );
- trap_Trace( &trace, client->ps.origin, NULL, NULL, point, ent->s.number, MASK_SHOT );
-
- traceEnt = &g_entities[ trace.entityNum ];
+ VectorAdd( client->ps.origin, range, maxs );
+ VectorSubtract( client->ps.origin, range, mins );
- if( traceEnt && traceEnt->buildableTeam == client->ps.stats[ STAT_TEAM ] && traceEnt->use )
- traceEnt->use( traceEnt, ent, ent ); //other and activator are the same in this context
- else
+ num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
+ for( i = 0; i < num; i++ )
{
- //no entity in front of player - do a small area search
+ traceEnt = &g_entities[ entityList[ i ] ];
- VectorAdd( client->ps.origin, range, maxs );
- VectorSubtract( client->ps.origin, range, mins );
-
- num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
- for( i = 0; i < num; i++ )
+ if( traceEnt && traceEnt->buildableTeam == client->ps.stats[ STAT_TEAM ] && traceEnt->use )
{
- traceEnt = &g_entities[ entityList[ i ] ];
-
- if( traceEnt && traceEnt->buildableTeam == client->ps.stats[ STAT_TEAM ] && traceEnt->use )
- {
- traceEnt->use( traceEnt, ent, ent ); //other and activator are the same in this context
- break;
- }
+ traceEnt->use( traceEnt, ent, ent ); //other and activator are the same in this context
+ break;
}
+ }
- if( i == num && client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS )
+ if( i == num && client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS )
+ {
+ if( BG_AlienCanEvolve( client->ps.stats[ STAT_CLASS ],
+ client->pers.credit,
+ g_alienStage.integer ) )
{
- if( BG_AlienCanEvolve( client->ps.stats[ STAT_CLASS ],
- client->pers.credit,
- g_alienStage.integer ) )
- {
- //no nearby objects and alien - show class menu
- G_TriggerMenu( ent->client->ps.clientNum, MN_A_INFEST );
- }
- else
- {
- //flash frags
- G_AddEvent( ent, EV_ALIEN_EVOLVE_FAILED, 0 );
- }
+ //no nearby objects and alien - show class menu
+ G_TriggerMenu( ent->client->ps.clientNum, MN_A_INFEST );
+ }
+ else
+ {
+ //flash frags
+ G_AddEvent( ent, EV_ALIEN_EVOLVE_FAILED, 0 );
}
}
}
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 6317cbdf..08a39062 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1302,225 +1302,6 @@ void AHive_Pain( gentity_t *self, gentity_t *attacker, int damage )
//==================================================================================
-
-
-#define HOVEL_TRACE_DEPTH 128.0f
-
-/*
-================
-AHovel_Blocked
-
-Is this hovel entrance blocked?
-================
-*/
-qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideExit )
-{
- vec3_t forward, normal, origin, start, end, angles, hovelMaxs;
- vec3_t mins, maxs;
- float displacement;
- trace_t tr;
-
- BG_BuildableBoundingBox( BA_A_HOVEL, NULL, hovelMaxs );
- BG_ClassBoundingBox( player->client->ps.stats[ STAT_CLASS ],
- mins, maxs, NULL, NULL, NULL );
-
- VectorCopy( hovel->s.origin2, normal );
- AngleVectors( hovel->s.angles, forward, NULL, NULL );
- VectorInverse( forward );
-
- displacement = VectorMaxComponent( maxs ) * M_ROOT3 +
- VectorMaxComponent( hovelMaxs ) * M_ROOT3 + 1.0f;
-
- VectorMA( hovel->s.origin, displacement, forward, origin );
-
- VectorCopy( hovel->s.origin, start );
- VectorCopy( origin, end );
-
- // see if there's something between the hovel and its exit
- // (eg built right up against a wall)
- trap_Trace( &tr, start, NULL, NULL, end, player->s.number, MASK_PLAYERSOLID );
- if( tr.fraction < 1.0f )
- return qtrue;
-
- vectoangles( forward, angles );
-
- VectorMA( origin, HOVEL_TRACE_DEPTH, normal, start );
-
- //compute a place up in the air to start the real trace
- trap_Trace( &tr, origin, mins, maxs, start, player->s.number, MASK_PLAYERSOLID );
-
- VectorMA( origin, ( HOVEL_TRACE_DEPTH * tr.fraction ) - 1.0f, normal, start );
- VectorMA( origin, -HOVEL_TRACE_DEPTH, normal, end );
-
- trap_Trace( &tr, start, mins, maxs, end, player->s.number, MASK_PLAYERSOLID );
-
- VectorCopy( tr.endpos, origin );
-
- trap_Trace( &tr, origin, mins, maxs, origin, player->s.number, MASK_PLAYERSOLID );
-
- if( tr.fraction < 1.0f )
- return qtrue;
-
- if( provideExit )
- {
- G_SetOrigin( player, origin );
- VectorCopy( origin, player->client->ps.origin );
- // nudge
- VectorMA( normal, 200.0f, forward, player->client->ps.velocity );
- G_SetClientViewAngle( player, angles );
- }
-
- return qfalse;
-}
-
-/*
-================
-APropHovel_Blocked
-
-Wrapper to test a hovel placement for validity
-================
-*/
-static qboolean APropHovel_Blocked( vec3_t origin, vec3_t angles, vec3_t normal,
- gentity_t *player )
-{
- gentity_t hovel;
-
- VectorCopy( origin, hovel.s.origin );
- VectorCopy( angles, hovel.s.angles );
- VectorCopy( normal, hovel.s.origin2 );
-
- return AHovel_Blocked( &hovel, player, qfalse );
-}
-
-/*
-================
-AHovel_Use
-
-Called when an alien uses a hovel
-================
-*/
-void AHovel_Use( gentity_t *self, gentity_t *other, gentity_t *activator )
-{
- vec3_t hovelOrigin, hovelAngles, inverseNormal;
-
- if( self->spawned && self->powered )
- {
- if( self->active )
- {
- //this hovel is in use
- G_TriggerMenu( activator->client->ps.clientNum, MN_A_HOVEL_OCCUPIED );
- }
- else if( ( ( activator->client->ps.stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0 ) ||
- ( activator->client->ps.stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0_UPG ) ) &&
- activator->health > 0 && self->health > 0 )
- {
- if( AHovel_Blocked( self, activator, qfalse ) )
- {
- //you can get in, but you can't get out
- G_TriggerMenu( activator->client->ps.clientNum, MN_A_HOVEL_BLOCKED );
- return;
- }
-
- self->active = qtrue;
- G_SetBuildableAnim( self, BANIM_ATTACK1, qfalse );
-
- //prevent lerping
- activator->client->ps.eFlags ^= EF_TELEPORT_BIT;
- activator->client->ps.eFlags |= EF_NODRAW;
- G_UnlaggedClear( activator );
-
- // Cancel pending suicides
- activator->suicideTime = 0;
-
- activator->client->ps.stats[ STAT_STATE ] |= SS_HOVELING;
- activator->client->hovel = self;
- self->builder = activator;
-
- VectorCopy( self->s.pos.trBase, hovelOrigin );
- VectorMA( hovelOrigin, 128.0f, self->s.origin2, hovelOrigin );
-
- VectorCopy( self->s.origin2, inverseNormal );
- VectorInverse( inverseNormal );
- vectoangles( inverseNormal, hovelAngles );
-
- VectorCopy( activator->s.pos.trBase, activator->client->hovelOrigin );
-
- G_SetOrigin( activator, hovelOrigin );
- VectorCopy( hovelOrigin, activator->client->ps.origin );
- G_SetClientViewAngle( activator, hovelAngles );
- }
- }
-}
-
-
-/*
-================
-AHovel_Think
-
-Think for alien hovel
-================
-*/
-void AHovel_Think( gentity_t *self )
-{
- AGeneric_Think( self );
-
- if( self->spawned )
- {
- if( self->active )
- G_SetIdleBuildableAnim( self, BANIM_IDLE2 );
- else
- G_SetIdleBuildableAnim( self, BANIM_IDLE1 );
- }
-}
-
-/*
-================
-AHovel_Die
-
-Die for alien hovel
-================
-*/
-void AHovel_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
-{
- //if the hovel is occupied free the occupant
- if( self->active )
- {
- gentity_t *builder = self->builder;
- vec3_t newOrigin;
- vec3_t newAngles;
-
- VectorCopy( self->s.angles, newAngles );
- newAngles[ ROLL ] = 0;
-
- VectorCopy( self->s.origin, newOrigin );
- VectorMA( newOrigin, 1.0f, self->s.origin2, newOrigin );
-
- //prevent lerping
- builder->client->ps.eFlags ^= EF_TELEPORT_BIT;
- builder->client->ps.eFlags &= ~EF_NODRAW;
- G_UnlaggedClear( builder );
-
- G_SetOrigin( builder, newOrigin );
- VectorCopy( newOrigin, builder->client->ps.origin );
- G_SetClientViewAngle( builder, newAngles );
-
- //client leaves hovel
- builder->client->ps.stats[ STAT_STATE ] &= ~SS_HOVELING;
- }
-
- AGeneric_Die( self, inflictor, attacker, damage, mod );
- self->nextthink = level.time + 100;
-}
-
-
-
-
-
-//==================================================================================
-
-
-
-
/*
================
ABooster_Touch
@@ -2348,8 +2129,7 @@ qboolean HMGTurret_CheckTarget( gentity_t *self, gentity_t *target,
vec3_t dir, end;
if( !target || target->health <= 0 || !target->client ||
- target->client->pers.teamSelection != TEAM_ALIENS ||
- ( target->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) )
+ target->client->pers.teamSelection != TEAM_ALIENS )
return qfalse;
if( !los_check )
@@ -3023,7 +2803,6 @@ static int G_CompareBuildablesForRemoval( const void *a, const void *b )
BA_A_TRAPPER,
BA_A_HIVE,
BA_A_BOOSTER,
- BA_A_HOVEL,
BA_A_SPAWN,
BA_A_OVERMIND,
@@ -3311,10 +3090,6 @@ static itemBuildError_t G_SufficientBPAvailable( buildable_t buildable,
if( ent->buildableTeam != team )
continue;
- // Don't allow destruction of hovel with granger inside
- if( ent->s.modelindex == BA_A_HOVEL && ent->active )
- continue;
-
// Explicitly disallow replacement of the core buildable with anything
// other than the core buildable
if( ent->s.modelindex == core && buildable != core )
@@ -3507,17 +3282,6 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
reason = IBE_NOCREEP;
}
- if( buildable == BA_A_HOVEL )
- {
- vec3_t builderMins, builderMaxs;
-
- //this assumes the adv builder is the biggest thing that'll use the hovel
- BG_ClassBoundingBox( PCL_ALIEN_BUILDER0_UPG, builderMins, builderMaxs, NULL, NULL, NULL );
-
- if( APropHovel_Blocked( origin, angles, normal, ent ) )
- reason = IBE_HOVELEXIT;
- }
-
// Check permission to build here
if( tr1.surfaceFlags & SURF_NOALIENBUILD || contents & CONTENTS_NOALIENBUILD )
reason = IBE_PERMISSION;
@@ -3572,10 +3336,6 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
reason = IBE_ONEOVERMIND;
break;
- case BA_A_HOVEL:
- reason = IBE_ONEHOVEL;
- break;
-
case BA_H_REACTOR:
reason = IBE_ONEREACTOR;
break;
@@ -3733,13 +3493,6 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable, vec3_t ori
built->pain = AGeneric_Pain;
break;
- case BA_A_HOVEL:
- built->die = AHovel_Die;
- built->use = AHovel_Use;
- built->think = AHovel_Think;
- built->pain = AGeneric_Pain;
- break;
-
case BA_H_SPAWN:
built->die = HSpawn_Die;
built->think = HSpawn_Think;
@@ -3898,14 +3651,6 @@ qboolean G_BuildIfValid( gentity_t *ent, buildable_t buildable )
G_TriggerMenu( ent->client->ps.clientNum, MN_A_ONEOVERMIND );
return qfalse;
- case IBE_ONEHOVEL:
- G_TriggerMenu( ent->client->ps.clientNum, MN_A_ONEHOVEL );
- return qfalse;
-
- case IBE_HOVELEXIT:
- G_TriggerMenu( ent->client->ps.clientNum, MN_A_HOVEL_EXIT );
- return qfalse;
-
case IBE_NORMAL:
G_TriggerMenu( ent->client->ps.clientNum, MN_B_NORMAL );
return qfalse;
@@ -4055,8 +3800,8 @@ void G_LayoutSave( char *name )
if( ent->s.eType != ET_BUILDABLE )
continue;
- s = va( "%i %f %f %f %f %f %f %f %f %f %f %f %f\n",
- ent->s.modelindex,
+ s = va( "%s %f %f %f %f %f %f %f %f %f %f %f %f\n",
+ BG_Buildable( ent->s.modelindex )->name,
ent->s.pos.trBase[ 0 ],
ent->s.pos.trBase[ 1 ],
ent->s.pos.trBase[ 2 ],
@@ -4239,7 +3984,8 @@ void G_LayoutLoad( void )
int len;
char *layout, *layoutHead;
char map[ MAX_QPATH ];
- int buildable = BA_NONE;
+ char buildName[ MAX_TOKEN_CHARS ];
+ int buildable;
vec3_t origin = { 0.0f, 0.0f, 0.0f };
vec3_t angles = { 0.0f, 0.0f, 0.0f };
vec3_t origin2 = { 0.0f, 0.0f, 0.0f };
@@ -4275,18 +4021,19 @@ void G_LayoutLoad( void )
if( *layout == '\n' )
{
i = 0;
- sscanf( line, "%d %f %f %f %f %f %f %f %f %f %f %f %f\n",
- &buildable,
+ sscanf( line, "%s %f %f %f %f %f %f %f %f %f %f %f %f\n",
+ buildName,
&origin[ 0 ], &origin[ 1 ], &origin[ 2 ],
&angles[ 0 ], &angles[ 1 ], &angles[ 2 ],
&origin2[ 0 ], &origin2[ 1 ], &origin2[ 2 ],
&angles2[ 0 ], &angles2[ 1 ], &angles2[ 2 ] );
- if( buildable > BA_NONE && buildable < BA_NUM_BUILDABLES )
- G_LayoutBuildItem( buildable, origin, angles, origin2, angles2 );
+ buildable = BG_BuildableByName( buildName )->number;
+ if( buildable <= BA_NONE || buildable >= BA_NUM_BUILDABLES )
+ G_Printf( S_COLOR_YELLOW "WARNING: bad buildable name (%s) in layout."
+ " skipping\n", buildName );
else
- G_Printf( S_COLOR_YELLOW "WARNING: bad buildable number (%d) in "
- " layout. skipping\n", buildable );
+ G_LayoutBuildItem( buildable, origin, angles, origin2, angles2 );
}
layout++;
}
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index d6774950..951a0567 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -490,12 +490,6 @@ Cmd_Kill_f
*/
void Cmd_Kill_f( gentity_t *ent )
{
- if( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING )
- {
- trap_SendServerCommand( ent-g_entities, "print \"Leave the Hovel first (use your destroy key)\n\"" );
- return;
- }
-
if( g_cheats.integer )
{
ent->flags &= ~FL_GODMODE;
@@ -1486,8 +1480,7 @@ void Cmd_Class_f( gentity_t *ent )
if( ent->health <= 0 )
return;
- if( ent->client->pers.teamSelection == TEAM_ALIENS &&
- !( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) )
+ if( ent->client->pers.teamSelection == TEAM_ALIENS )
{
if( newClass == PCL_NONE )
{
@@ -1614,9 +1607,6 @@ void Cmd_Destroy_f( gentity_t *ent )
if( Q_stricmp( cmd, "destroy" ) == 0 )
deconstruct = qfalse;
- if( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING )
- G_Damage( ent->client->hovel, ent, ent, forward, ent->s.origin, 10000, 0, MOD_SUICIDE );
-
AngleVectors( ent->client->ps.viewangles, forward, NULL, NULL );
VectorMA( ent->client->ps.origin, 100, forward, end );
@@ -1665,10 +1655,6 @@ void Cmd_Destroy_f( gentity_t *ent )
return;
}
- // Don't allow destruction of hovel with granger inside
- if( traceEnt->s.modelindex == BA_A_HOVEL && traceEnt->active )
- return;
-
// Don't allow destruction of buildables that cannot be rebuilt
if( G_TimeTilSuddenDeath( ) <= 0 )
{
@@ -2208,7 +2194,6 @@ void Cmd_Build_f( gentity_t *ent )
if( buildable != BA_NONE &&
( ( 1 << ent->client->ps.weapon ) & BG_Buildable( buildable )->buildWeapon ) &&
- !( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) &&
BG_BuildableIsAllowed( buildable ) &&
( ( team == TEAM_ALIENS && BG_BuildableAllowedInStage( buildable, g_alienStage.integer ) ) ||
( team == TEAM_HUMANS && BG_BuildableAllowedInStage( buildable, g_humanStage.integer ) ) ) )
@@ -2234,7 +2219,6 @@ void Cmd_Build_f( gentity_t *ent )
// can't place yet but maybe soon: start with valid togglebit off
case IBE_NORMAL:
- case IBE_HOVELEXIT:
case IBE_NOCREEP:
case IBE_NOROOM:
case IBE_NOOVERMIND:
@@ -2251,10 +2235,6 @@ void Cmd_Build_f( gentity_t *ent )
err = MN_A_ONEOVERMIND;
break;
- case IBE_ONEHOVEL:
- err = MN_A_ONEHOVEL;
- break;
-
case IBE_ONEREACTOR:
err = MN_H_ONEREACTOR;
break;
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 83e0c557..71121569 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -225,8 +225,6 @@ struct gentity_s
vec4_t animation; // animated map objects
- gentity_t *builder; // occupant of this hovel
-
qboolean nonSegModel; // this entity uses a nonsegmented player model
buildable_t bTriggers[ BA_NUM_BUILDABLES ]; // which buildables are triggers
@@ -408,8 +406,6 @@ struct gclient_s
char *areabits;
- gentity_t *hovel;
-
int lastPoisonTime;
int poisonImmunityTime;
gentity_t *lastPoisonClient;
@@ -424,8 +420,6 @@ struct gclient_s
qboolean charging;
- vec3_t hovelOrigin; // player origin before entering hovel
-
int lastFlameBall; // s.number of the last flame ball fired
unlagged_t unlaggedHist[ MAX_UNLAGGED_MARKERS ];
@@ -710,8 +704,6 @@ typedef enum
IBE_NOALIENBP,
IBE_SPWNWARN, // not currently used
IBE_NOCREEP,
- IBE_ONEHOVEL,
- IBE_HOVELEXIT,
IBE_ONEREACTOR,
IBE_NOPOWERHERE,
@@ -729,7 +721,6 @@ typedef enum
IBE_MAXERRORS
} itemBuildError_t;
-qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideExit );
gentity_t *G_CheckSpawnPoint( int spawnNum, vec3_t origin, vec3_t normal,
buildable_t spawn, vec3_t spawnOrigin );
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 0085b07d..183d8f1d 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -324,15 +324,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define OVERMIND_ATTACK_REPEAT 1000
#define OVERMIND_VALUE ABVM(30)
-#define HOVEL_BP 0
-#define HOVEL_BT 15000
-#define HOVEL_HEALTH ABHM(375)
-#define HOVEL_REGEN 20
-#define HOVEL_SPLASHDAMAGE 20
-#define HOVEL_SPLASHRADIUS 200
-#define HOVEL_CREEPSIZE 120
-#define HOVEL_VALUE ABVM(8)
-
/*
* ALIEN misc
*