Avoid bounce karts from edges in soccer field.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14428 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
59f2e7ff75
commit
ea2b34c52e
@ -458,6 +458,10 @@ Material::Material(const XMLNode *node, int index, bool deprecated)
|
||||
{
|
||||
m_collision_reaction = PUSH_BACK;
|
||||
}
|
||||
else if (creaction == "push-soccer")
|
||||
{
|
||||
m_collision_reaction = PUSH_SOCCER_BALL;
|
||||
}
|
||||
else if (creaction.size() > 0)
|
||||
{
|
||||
fprintf(stderr, "[Material] WARNING: Unknown collision reaction '%s'\n", creaction.c_str());
|
||||
|
@ -73,7 +73,8 @@ public:
|
||||
{
|
||||
NORMAL,
|
||||
RESCUE,
|
||||
PUSH_BACK
|
||||
PUSH_BACK,
|
||||
PUSH_SOCCER_BALL
|
||||
};
|
||||
|
||||
private:
|
||||
|
@ -544,7 +544,7 @@ bool PhysicalObject::isSoccerBall() const
|
||||
*/
|
||||
void PhysicalObject::hit(const Material *m, const Vec3 &normal)
|
||||
{
|
||||
if(isSoccerBall() && m->getCollisionReaction() == Material::PUSH_BACK)
|
||||
if(isSoccerBall() && m->getCollisionReaction() == Material::PUSH_SOCCER_BALL)
|
||||
{
|
||||
m_body->applyCentralImpulse(normal * 1000.0f);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user