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.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 5d014a22..083e0662 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2508,9 +2508,23 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance
if( tempent->s.eType != ET_BUILDABLE )
continue;
- if( tempent->s.modelindex == BA_A_OVERMIND )
+ if( tempent->s.modelindex == buildable )
{
- reason = IBE_OVERMIND;
+ switch( buildable )
+ {
+ case BA_A_OVERMIND:
+ reason = IBE_OVERMIND;
+ break;
+
+ case BA_A_HOVEL:
+ reason = IBE_HOVEL;
+ break;
+
+ default:
+ Com_Error( ERR_FATAL, "No reason for denying build of %d\n", buildable );
+ break;
+ }
+
break;
}
}
@@ -2832,6 +2846,10 @@ qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable )
G_TriggerMenu( ent->client->ps.clientNum, MN_A_OVERMIND );
return qfalse;
+ case IBE_HOVEL:
+ G_TriggerMenu( ent->client->ps.clientNum, MN_A_HOVEL );
+ return qfalse;
+
case IBE_HOVELEXIT:
G_TriggerMenu( ent->client->ps.clientNum, MN_A_HOVEL_EXIT );
return qfalse;