Fixed bowing ball strike sfx, which was missing.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12134 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2012-12-02 10:29:18 +00:00
parent ccaa371bf8
commit 8a7155ba5e
2 changed files with 12 additions and 3 deletions

View File

@@ -16,9 +16,11 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "items/bowling.hpp"
#include "graphics/hit_sfx.hpp"
#include "graphics/material.hpp"
#include "io/xml_node.hpp"
#include "items/bowling.hpp"
#include "karts/abstract_kart.hpp"
#include "utils/random_generator.hpp"
@@ -212,3 +214,11 @@ bool Bowling::hit(AbstractKart* kart, PhysicalObject* obj)
explode(kart, obj, /*hit_secondary*/false);
return was_real_hit;
} // hit
// ----------------------------------------------------------------------------
/** Returns the hit effect object to use when this objects hits something.
* \returns The hit effect object, or NULL if no hit effect should be played.
*/
HitEffect* Bowling::getHitEffect() const
{
return new HitSFX(getXYZ(), "strike");
} // getHitEffect

View File

@@ -46,9 +46,8 @@ public:
virtual bool updateAndDelete(float dt);
virtual const core::stringw getHitString(const AbstractKart *kart) const;
virtual bool hit(AbstractKart* kart, PhysicalObject* obj=NULL);
virtual HitEffect *getHitEffect() const;
/** Returns the sfx to use when the bowling ball explodes. */
const char* getExplosionSound() const { return "strike"; }
}; // Bowling