diff options
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 41b6d4f9..e7ac1cbd 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1576,6 +1576,13 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_DROIDS ) { //droid criteria + + float minNormal = BG_FindMinNormalForBuildable( buildable ); + qboolean invert = BG_FindInvertNormalForBuildable( buildable ); + + //can we build at this angle? + if( !( normal[ 2 ] >= minNormal || ( invert && normal[ 2 ] <= -minNormal ) ) ) + return IBE_NORMAL; //look for a hivemind for ( i = 1, tempent = g_entities + i; i < level.num_entities; i++, tempent++ ) @@ -1902,6 +1909,10 @@ void G_ValidateBuild( gentity_t *ent, buildable_t buildable ) G_AddPredictableEvent( ent, EV_MENU, MN_D_HIVEMIND ); break; + case IBE_NORMAL: + G_AddPredictableEvent( ent, EV_MENU, MN_D_NORMAL ); + break; + case IBE_REACTOR: G_AddPredictableEvent( ent, EV_MENU, MN_H_REACTOR ); break; |