diff --git a/src/client/entities.qc b/src/client/entities.qc index 88a65792..79d90e54 100644 --- a/src/client/entities.qc +++ b/src/client/entities.qc @@ -272,13 +272,20 @@ Entities_ParseLump(void) void Entities_RendererRestarted(void) { - int c = 0; + int c = 0i; + int f = 0i; for (entity b = world; (b = findfloat(b, ::isCSQC, TRUE));) { NSEntity pf = (NSEntity) b; - pf.RendererRestarted(); - c++; + + if (pf.vv_flags & VFL_VIDREMOVE) { + pf.Destroy(); + f++; + } else { + pf.RendererRestarted(); + c++; + } } - NSLog("...resource reload called on %i entities", c); + NSLog("...resource reload called on %i entities, flushed %i", c, f); } diff --git a/src/shared/flags.h b/src/shared/flags.h index 940e6c9c..5274820c 100644 --- a/src/shared/flags.h +++ b/src/shared/flags.h @@ -47,3 +47,4 @@ #define VFL_PRIMEDFUSE (1<<11) /**< Entity is not allowed to fire. */ #define VFL_REDRAW (1<<12) /**< Entity is not allowed to fire. */ #define VFL_FIRING (1<<13) /**< Entity is firing. */ +#define VFL_VIDREMOVE (1<<14) /**< Entity will be flushed upon vid_reload. */