summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheriaca <reichmeister@protonmail.com>2018-04-01 18:11:12 +0200
committerTheriaca <reichmeister@protonmail.com>2018-04-02 17:50:13 +0200
commitcf7abe9e92bb8ee9ad3d07f05003177e60fc7d43 (patch)
tree7f65df532651dee0d01576c2637366e5a1850277
parentc17c9c0f4d000a6765653a1168453a830e403117 (diff)
allow building on moversbuild-on-movers
update buildable origin when moved
-rw-r--r--src/game/g_buildable.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index a65f2a0..164bbcf 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2915,6 +2915,8 @@ void G_BuildableThink( gentity_t *ent, int msec )
//fall back on normal physics routines
G_Physics( ent, msec );
+
+ VectorCopy(ent->r.currentOrigin, ent->s.origin);
}
@@ -3420,13 +3422,13 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
if( !( normal[ 2 ] >= minNormal || ( invert && normal[ 2 ] <= -minNormal ) ) )
reason = IBE_NORMAL;
- if( tr1.entityNum != ENTITYNUM_WORLD )
- reason = IBE_NORMAL;
-
// check nobuild zones
if( nobuild_check( entity_origin ) >= 0 )
reason = IBE_PERMISSION;
+ if( tr1.entityNum != ENTITYNUM_WORLD && g_entities[ tr1.entityNum ].s.eType != ET_MOVER )
+ reason = IBE_NORMAL;
+
contents = trap_PointContents( entity_origin, -1 );
if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )