From c14ca10f89e456b2d864796ae9450ec5fb521339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Brammer?= Date: Thu, 14 Oct 2010 23:24:16 +0200 Subject: [PATCH] Remove unused engine internal Explosion function --- src/game/script/C4Effect.cpp | 48 ------------------------------------ src/game/script/C4Effects.h | 1 - 2 files changed, 49 deletions(-) diff --git a/src/game/script/C4Effect.cpp b/src/game/script/C4Effect.cpp index 43c320b21..5f1859efd 100644 --- a/src/game/script/C4Effect.cpp +++ b/src/game/script/C4Effect.cpp @@ -853,51 +853,3 @@ void Smoke(int32_t tx, int32_t ty, int32_t level, DWORD dwClr) if ((pObj = Game.CreateObjectConstruction(C4Id2Def(C4ID("FXS1")),NULL,NO_OWNER,tx,ty,FullCon*level/32))) pObj->Call(PSF_Activate); } - -void Explosion(int32_t tx, int32_t ty, int32_t level, C4Object *inobj, int32_t iCausedBy, C4Object *pByObj, C4ID idEffect, const char *szEffect) -{ - int32_t grade=BoundBy((level/10)-1,1,3); - // Sound - StdStrBuf sound = FormatString("Blast%c", '0'+grade); - StartSoundEffect(sound.getData(),false,100,pByObj); - // Check blast containment - C4Object *container=inobj; - while (container && !container->Def->ContainBlast) container=container->Contained; - // Uncontained blast effects - if (!container) - { - // Incinerate landscape - if (!::Landscape.Incinerate(tx,ty)) - if (!::Landscape.Incinerate(tx,ty-10)) - if (!::Landscape.Incinerate(tx-5,ty-5)) - ::Landscape.Incinerate(tx+5,ty-5); - // Create blast object or particle - C4Object *pBlast; - C4ParticleDef *pPrtDef = ::Particles.pBlast; - // particle override - if (szEffect) - { - C4ParticleDef *pPrtDef2 = ::Particles.GetDef(szEffect); - if (pPrtDef2) pPrtDef = pPrtDef2; - } - else if (idEffect) pPrtDef = NULL; - // create particle - if (pPrtDef) - { - ::Particles.Create(pPrtDef, (float) tx, (float) ty, 0.0f, 0.0f, (float) level, 0); - if (SEqual2(pPrtDef->Name.getData(), "Blast")) - ::Particles.Cast(::Particles.pFSpark, level/5+1, (float) tx, (float) ty, level, level/2+1.0f, 0x00ef0000, level+1.0f, 0xffff1010); - } - else if ((pBlast = Game.CreateObjectConstruction(C4Id2Def(idEffect ? idEffect : C4ID("FXB1")),pByObj,iCausedBy,tx,ty+level,FullCon*level/20))) - pBlast->Call(PSF_Activate); - } - // Blast objects - Game.BlastObjects(tx,ty,level,inobj,iCausedBy,pByObj); - if (container!=inobj) Game.BlastObjects(tx,ty,level,container,iCausedBy,pByObj); - if (!container) - { - // Blast free landscape. After blasting objects so newly mined materials don't get flinged - ::Landscape.BlastFree(tx,ty,level,grade, iCausedBy); - } -} - diff --git a/src/game/script/C4Effects.h b/src/game/script/C4Effects.h index ca01ca020..48c9a792e 100644 --- a/src/game/script/C4Effects.h +++ b/src/game/script/C4Effects.h @@ -165,7 +165,6 @@ class C4Value &FxFireVarCausedBy(C4Effect *pEffect); // some other hardcoded engine effects void Splash(int32_t tx, int32_t ty, int32_t amt, C4Object *pByObj); -void Explosion(int32_t tx, int32_t ty, int32_t level, C4Object *inobj, int32_t iCausedBy, C4Object *pByObj, C4ID idEffect, const char *szEffect); void Smoke(int32_t tx, int32_t ty, int32_t level, DWORD dwClr=0); void BubbleOut(int32_t tx, int32_t ty);