summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 475b1e67..3a8fb639 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1218,8 +1218,7 @@ Is this hovel entrance blocked?
*/
qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideExit )
{
- return qfalse;
- /*vec3_t forward, normal, origin, start, end, angles, hovelMaxs;
+ vec3_t forward, normal, origin, start, end, angles, hovelMaxs;
vec3_t mins, maxs;
float displacement;
trace_t tr;
@@ -1263,7 +1262,7 @@ qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideEx
G_SetClientViewAngle( player, angles );
}
- return tr.fraction < 1.0f;*/
+ return tr.fraction < 1.0f;
}
/*
@@ -1273,7 +1272,6 @@ 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 )
{
@@ -1285,7 +1283,6 @@ static qboolean APropHovel_Blocked( vec3_t origin, vec3_t angles, vec3_t normal,
return AHovel_Blocked( &hovel, player, qfalse );
}
-*/
/*
================
@@ -2680,7 +2677,7 @@ static int G_CompareBuildablesForRemoval( const void *a, const void *b )
BA_A_TRAPPER,
BA_A_HIVE,
BA_A_BOOSTER,
- /*BA_A_HOVEL,*/
+ BA_A_HOVEL,
BA_A_SPAWN,
BA_A_OVERMIND,
@@ -2891,8 +2888,8 @@ static itemBuildError_t G_SufficientBPAvailable( buildable_t buildable,
continue;
// Don't allow destruction of hovel with granger inside
- /*if( ent->s.modelindex == BA_A_HOVEL && ent->active )
- continue;*/
+ if( ent->s.modelindex == BA_A_HOVEL && ent->active )
+ continue;
// Explicitly disallow replacement of the core buildable with anything
// other than the core buildable
@@ -3061,7 +3058,7 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
reason = IBE_NOCREEP;
}
- /*if( buildable == BA_A_HOVEL )
+ if( buildable == BA_A_HOVEL )
{
vec3_t builderMins, builderMaxs;
@@ -3070,7 +3067,7 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
if( APropHovel_Blocked( angles, origin, normal, ent ) )
reason = IBE_HOVELEXIT;
- }*/
+ }
// Check permission to build here
if( tr1.surfaceFlags & SURF_NOALIENBUILD || contents & CONTENTS_NOALIENBUILD )
@@ -3124,9 +3121,9 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
reason = IBE_ONEOVERMIND;
break;
- /*case BA_A_HOVEL:
+ case BA_A_HOVEL:
reason = IBE_ONEHOVEL;
- break;*/
+ break;
case BA_H_REACTOR:
reason = IBE_ONEREACTOR;
@@ -3280,12 +3277,12 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable, vec3_t ori
built->pain = AGeneric_Pain;
break;
- /*case BA_A_HOVEL:
+ case BA_A_HOVEL:
built->die = AHovel_Die;
built->use = AHovel_Use;
built->think = AHovel_Think;
built->pain = AGeneric_Pain;
- break;*/
+ break;
case BA_H_SPAWN:
built->die = HSpawn_Die;