Remove hit effect in physics for no graphics STK
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "script_physics.hpp"
|
||||
#include "graphics/explosion.hpp"
|
||||
#include "graphics/hit_effect.hpp"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "items/projectile_manager.hpp"
|
||||
|
||||
namespace Scripting
|
||||
@@ -33,6 +34,8 @@ namespace Scripting
|
||||
void createExplosion(asIScriptGeneric *gen)
|
||||
{
|
||||
//TODO: allow different types? sand etc
|
||||
if (GUIEngine::isNoGraphics())
|
||||
return;
|
||||
Vec3 *explosion_loc = (Vec3*)gen->GetArgAddress(0);
|
||||
HitEffect *he = new Explosion(*explosion_loc, "explosion", "explosion_bomb.xml");
|
||||
projectile_manager->addHitEffect(he);
|
||||
|
||||
Reference in New Issue
Block a user