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.
This commit is contained in:
RGreenlees 2023-09-12 11:08:42 +01:00 committed by pierow
parent 193f417144
commit 501fa5ab18
2 changed files with 4 additions and 2 deletions

View file

@ -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;
}

View file

@ -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