diff options
author | Tony J. White <tjw@tjw.org> | 2007-02-19 02:00:28 +0000 |
---|---|---|
committer | Tony J. White <tjw@tjw.org> | 2007-02-19 02:00:28 +0000 |
commit | 8c5ffed1cb9a22fff0d65511e4f93e714ecafd53 (patch) | |
tree | f5e537f2298126adf00ee14c47842f1476e7f1ca /src/game/g_buildable.c | |
parent | 7d3e935cc3ca35ee9515452bf19c8d8e7a44528c (diff) |
* (bug 3021) don't let building on top of existing structures override the
unique test (kevlarman)
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index f479d353..a09ca189 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2897,6 +2897,16 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance break; } + if( tempent->s.modelindex == BA_A_HOVEL && + buildable == BA_A_HOVEL && + tempent->active ) + { + reason = IBE_HOVEL; + } + else if( tempent->s.modelindex == buildable ) + { + level.markedBuildables[ level.numBuildablesForRemoval++ ] = tempent; + } } } @@ -2972,6 +2982,8 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance reason = IBE_REACTOR; break; } + if( tempent->s.modelindex == buildable ) + level.markedBuildables[ level.numBuildablesForRemoval++ ] = tempent; } } |