diff --git a/Source/gs-entbase/server/infodecal.cpp b/Source/gs-entbase/server/infodecal.cpp index 67bb2a1c..181aa817 100644 --- a/Source/gs-entbase/server/infodecal.cpp +++ b/Source/gs-entbase/server/infodecal.cpp @@ -47,8 +47,13 @@ void infodecal(void) } if (!self.texture) { - print("^1ERROR:^7 infodecal with no .texture\n"); - remove(self); + dprint("^1ERROR:^7 infodecal with no .texture\n"); + /* Tempdecals == decals that are not spawned by the map, but by the + * decal-que (see shared/decals.c), so you can't remove them without + * causing a pointer error - just abort. */ + if (self.classname != "tempdecal") { + remove(self); + } return; } @@ -91,8 +96,11 @@ void infodecal(void) } if (frac == 1.0f) { - print(sprintf("infodecal tracing failed at %v\n", self.origin)); - remove(self); + dprint(sprintf("infodecal tracing failed at %v\n", self.origin)); + + if (self.classname != "tempdecal") { + remove(self); + } return; } diff --git a/Source/shared/decals.c b/Source/shared/decals.c index 7f1643d3..f06eb62b 100644 --- a/Source/shared/decals.c +++ b/Source/shared/decals.c @@ -47,6 +47,7 @@ void Decals_PlaceBig(vector pos) #else entity decal = Decals_Next(); setorigin(decal, pos); + decal.classname = "tempdecal"; decal.texture = sprintf("{bigshot%d", floor(random(1,6))); decal.think = infodecal; decal.nextthink = time /*+ 0.1f*/; diff --git a/Source/shared/effects.c b/Source/shared/effects.c index 76ea7469..cd86d820 100755 --- a/Source/shared/effects.c +++ b/Source/shared/effects.c @@ -16,6 +16,7 @@ void Effect_CreateExplosion( vector vPos ) { WriteCoord( MSG_MULTICAST, vPos_z ); msg_entity = self; multicast( vPos, MULTICAST_PVS ); + Decals_PlaceScorch(vPos); #else sprite eExplosion = spawn(sprite); setorigin( eExplosion, vPos ); @@ -31,7 +32,6 @@ void Effect_CreateExplosion( vector vPos ) { eExplosion.nextthink = time + 0.05f; te_explosion( vPos ); - Decals_PlaceScorch(vPos); #endif }