diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/bg_public.h | 1 | ||||
| -rw-r--r-- | src/game/g_buildable.c | 11 | ||||
| -rw-r--r-- | src/game/g_cmds.c | 1 | ||||
| -rw-r--r-- | src/game/g_local.h | 1 | 
4 files changed, 14 insertions, 0 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h index cfd603d6..9663e884 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -566,6 +566,7 @@ typedef enum    MN_D_HIVEMIND,    MN_D_NOASSERT,    MN_D_SPWNWARN, +  MN_D_NORMAL,    MN_H_SPAWN,    MN_H_BUILD,    MN_H_MCU, 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; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 1f6c5e68..d99013b1 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2120,6 +2120,7 @@ void Cmd_Build_f( gentity_t *ent )        case IBE_RPTWARN:        case IBE_SPWNWARN:        case IBE_NOROOM: +      case IBE_NORMAL:          ent->client->ps.stats[ STAT_BUILDABLE ] = ( buildable | SB_VALID_TOGGLEBIT );          break; diff --git a/src/game/g_local.h b/src/game/g_local.h index c9a78a5e..7ad59093 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -537,6 +537,7 @@ typedef enum    IBE_RPLWARN,    IBE_RPTWARN,    IBE_NOPOWER, +  IBE_NORMAL,    IBE_MAXERRORS  } itemBuildError_t;  | 
