GL - correction of dmg and jumppad foce

This commit is contained in:
Erik Persson 2014-02-27 11:01:55 +01:00
parent 5ad5ad6f5f
commit 44ec232310
2 changed files with 7 additions and 11 deletions

View File

@ -167,9 +167,6 @@ using namespace GameLogic;
{
Player *hitPlayer = (Player*)realObj;
hitPlayer->DamageLife(ExplosionSource->extraDamageOnCollision);
//hitPlayer->GetRigidBody()->ApplyImpulse(force);
//hitPlayer->DamageLife(ExplosionSource->getExtraDamageOnCollision());
realObj->GetRigidBody()->ApplyImpulse(force * 5);
//do shredding damage
}
@ -192,11 +189,11 @@ using namespace GameLogic;
Oyster::Math::Float angularFactor = deltaPos.GetNormalized().Dot( (objPrevVel - playerPrevVel).GetNormalized());
Oyster::Math::Float impactPower = deltaSpeed * angularFactor;
Oyster::Math::Float damageFactor = 0.01f;
Oyster::Math::Float damageFactor = 0.1f;
int damageDone = 0;
int forceThreashHold = 30; //FIX: balance this
Oyster::Math::Float damageDone = 0.0f;
Oyster::Math::Float forceThreashHold = 30.0f; //FIX: balance this
if(impactPower > forceThreashHold) //should only take damage if the force is high enough
{

View File

@ -68,8 +68,8 @@ Object* Level::CreateGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
break;
case ObjectSpecialType_RedExplosiveBox:
{
Oyster::Math::Float dmg = 120;
Oyster::Math::Float force = 500;
Oyster::Math::Float dmg = 50;
Oyster::Math::Float force = 800;
Oyster::Math::Float radie = 3;
gameObj = new ExplosiveCrate(rigidBody, (ObjectSpecialType)obj->specialTypeID, objIDCounter, dmg, force, radie);
}
@ -90,8 +90,7 @@ Object* Level::CreateGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
break;
case ObjectSpecialType_CrystalFormation:
{
int dmg = 50;
//gameObj = new Crystal(rigidBody);
int dmg = 30;
gameObj = new StaticObject(rigidBody, Object::DefaultOnCollision, (ObjectSpecialType)obj->specialTypeID, objIDCounter);
}
break;
@ -102,7 +101,7 @@ Object* Level::CreateGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
break;
case ObjectSpecialType_JumpPad:
{
float power = 500; //((JumpPadAttributes*)obj)->power;
float power = ((JumpPadAttributes*)obj)->power;
Oyster::Math::Float3 dir = ((JumpPadAttributes*)obj)->direction;
Oyster::Math::Float3 pushForce = dir * power;
gameObj = new JumpPad(rigidBody, (ObjectSpecialType)obj->specialTypeID, objIDCounter , pushForce);