ref: aa3570b9b17ae71fb8dbd5c53948cbd3781a24ad
parent: a71e36307ff986c2aef20afb1507de1d74d4508a
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Oct 16 05:56:18 EDT 2023
add EF_NODRAW support
--- a/cl_main.c
+++ b/cl_main.c
@@ -560,7 +560,7 @@
ent->forcelink = false;
- if (i == cl.viewentity && !chase_active.value)
+ if ((ent->effects & EF_NODRAW) != 0 || (i == cl.viewentity && !chase_active.value))
continue;
if (cl_numvisedicts < MAX_VISEDICTS)
--- a/server.h
+++ b/server.h
@@ -136,6 +136,7 @@
EF_MUZZLEFLASH = 1<<1,
EF_BRIGHTLIGHT = 1<<2,
EF_DIMLIGHT = 1<<3,
+ EF_NODRAW = 1<<4,
SPAWNFLAG_NOT_EASY = 1<<8,
SPAWNFLAG_NOT_MEDIUM = 1<<9,
--- a/sv_main.c
+++ b/sv_main.c
@@ -454,6 +454,8 @@
model = ent->v.modelindex;
if (ent != clent) // clent is ALLWAYS sent
{
+ if(ent->v.effects == EF_NODRAW)
+ continue;
// ignore ents without visible models
if(!model || !*PR_Str(ent->v.model))
continue;