From 501fa5ab18bac11a1906e5f23306bc607b481351 Mon Sep 17 00:00:00 2001 From: RGreenlees Date: Tue, 12 Sep 2023 11:08:42 +0100 Subject: [PATCH] Fixed func_nobuild being invisible to clients * The client build preview now respects func_nobuild, fixing situations where the client thought it could build somewhere, but nothing would appear when clicking. --- main/source/mod/AvHEntities.cpp | 2 +- main/source/mod/AvHSharedUtil.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main/source/mod/AvHEntities.cpp b/main/source/mod/AvHEntities.cpp index ad34181d..bcd09f63 100644 --- a/main/source/mod/AvHEntities.cpp +++ b/main/source/mod/AvHEntities.cpp @@ -679,7 +679,7 @@ void AvHNoBuild::Spawn() this->pev->rendermode = kRenderTransAdd; this->pev->renderamt = 0; - this->pev->effects = EF_NODRAW; + //this->pev->effects = EF_NODRAW; } diff --git a/main/source/mod/AvHSharedUtil.cpp b/main/source/mod/AvHSharedUtil.cpp index 9591cef1..ca0faa24 100644 --- a/main/source/mod/AvHSharedUtil.cpp +++ b/main/source/mod/AvHSharedUtil.cpp @@ -3257,8 +3257,10 @@ bool AvHSHUClientTraceWaypoint(const vec3_t& inStartPos, const vec3_t& inEndPos, { // and if surface isn't under water, lava, in the sky, etc. int thePointContents = gEngfuncs.PM_PointContents(tr.endpos, NULL); - if(thePointContents == CONTENTS_EMPTY) + if(thePointContents == CONTENTS_EMPTY || thePointContents == 0) { + + // and if there's enough room to build // we can build here, and we're done