diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 12:56:31 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:20 +0000 |
commit | 325024e110f555fb49d7a74a5b614cc00de99549 (patch) | |
tree | c43ae0bafa3a8252bb831a280c5865302afe3618 /src/game | |
parent | 14e2615133a3bb635e9d7fd20a3ac716e57435f2 (diff) |
Remove repeater overlap prevention code
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_public.h | 1 | ||||
-rw-r--r-- | src/game/g_buildable.c | 60 | ||||
-rw-r--r-- | src/game/g_cmds.c | 1 | ||||
-rw-r--r-- | src/game/g_local.h | 1 | ||||
-rw-r--r-- | src/game/tremulous.h | 1 |
5 files changed, 0 insertions, 64 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 20dd5eaf..e1654ef8 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -626,7 +626,6 @@ typedef enum MN_H_NODCC, MN_H_ONEREACTOR, MN_H_RPTPOWERHERE, - MN_H_RPWCAUSEOVRL, } dynMenu_t; // animations diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index d72b7352..ff5622db 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -348,48 +348,6 @@ buildable_t G_IsPowered( vec3_t origin ) return BA_NONE; } -/* -================ -G_RepeaterWouldOverlap - -Check if a repeater would create an overlapping power zone -================ -*/ -static gentity_t *G_RepeaterWouldOverlap( vec3_t origin ) -{ - int i; - gentity_t *ent; - int distance; - vec3_t temp_v; - - // Iterate through entities - for( i = MAX_CLIENTS, ent = g_entities + i; i < level.num_entities; i++, ent++ ) - { - if( ent->s.eType != ET_BUILDABLE ) - continue; - - // If entity is a power item calculate the distance to it - if( ( ent->s.modelindex == BA_H_REACTOR || ent->s.modelindex == BA_H_REPEATER ) && - ent->spawned && ent->powered ) - { - VectorSubtract( origin, ent->s.origin, temp_v ); - distance = VectorLength( temp_v ); - - if( ent->s.modelindex == BA_H_REACTOR ) - { - if( distance <= REACTOR_BASESIZE + REPEATER_BASESIZE ) - return ent; - } - else if( ent->s.modelindex == BA_H_REPEATER ) - { - if( distance <= REPEATER_BASESIZE + REPEATER_BASESIZE ) - return ent; - } - } - } - - return NULL; -} /* ================== @@ -3490,20 +3448,6 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance reason = IBE_RPTPOWERHERE; else if( !g_markDeconstruct.integer && G_IsPowered( entity_origin ) ) reason = IBE_RPTPOWERHERE; - else if( !REPEATER_ALLOWOVERLAP ) - { - tempent = G_RepeaterWouldOverlap( entity_origin ); - - if( tempent ) - { - // If mark deconstruct is enabled, allow the marked repeater to be moved and replaced - if( !( g_markDeconstruct.integer > 1 && - tempent->s.modelindex == BA_H_REPEATER && tempent->deconstruct ) ) - { - reason = IBE_RPWCAUSEOVRL; - } - } - } } // Check permission to build here @@ -3873,10 +3817,6 @@ qboolean G_BuildIfValid( gentity_t *ent, buildable_t buildable ) G_TriggerMenu( ent->client->ps.clientNum, MN_H_RPTPOWERHERE ); return qfalse; - case IBE_RPWCAUSEOVRL: - G_TriggerMenu( ent->client->ps.clientNum, MN_H_RPWCAUSEOVRL ); - return qfalse; - case IBE_LASTSPAWN: G_TriggerMenu( ent->client->ps.clientNum, MN_B_LASTSPAWN ); return qfalse; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index d2bbf97b..4b691a01 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2527,7 +2527,6 @@ void Cmd_Build_f( gentity_t *ent ) case IBE_NOROOM: case IBE_NOOVERMIND: case IBE_NOPOWERHERE: - case IBE_RPWCAUSEOVRL: err = MN_NONE; break; diff --git a/src/game/g_local.h b/src/game/g_local.h index e24d6f89..a99b2341 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -731,7 +731,6 @@ typedef enum IBE_TNODEWARN, // not currently used IBE_RPTNOREAC, IBE_RPTPOWERHERE, - IBE_RPWCAUSEOVRL, IBE_NOHUMANBP, IBE_NODCC, diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 26265536..d3d0d1dc 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -616,7 +616,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define REPEATER_SPLASHRADIUS 100 #define REPEATER_INACTIVE_TIME 90000 #define REPEATER_VALUE HBVM(2) -#define REPEATER_ALLOWOVERLAP qtrue /* * HUMAN misc |