From 978d071c90d8d5e60ae1a21407865c9d3c1b75da Mon Sep 17 00:00:00 2001 From: Erik Persson Date: Thu, 27 Feb 2014 12:09:51 +0100 Subject: [PATCH] GL - blablafixes --- Code/Game/GameLogic/AttatchmentMassDriver.cpp | 21 +++++++------------ Code/Game/GameLogic/AttatchmentMassDriver.h | 2 +- Code/Game/GameLogic/CollisionManager.cpp | 2 +- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Code/Game/GameLogic/AttatchmentMassDriver.cpp b/Code/Game/GameLogic/AttatchmentMassDriver.cpp index 401c40f8..6abe81b6 100644 --- a/Code/Game/GameLogic/AttatchmentMassDriver.cpp +++ b/Code/Game/GameLogic/AttatchmentMassDriver.cpp @@ -44,7 +44,7 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage, switch (usage) { case WEAPON_FIRE::WEAPON_USE_PRIMARY_PRESS: - if(currentEnergy >= 9.0f) + //if(currentEnergy >= 9.0f) { currentEnergy -= 9.0f; ForcePush(usage,dt); @@ -128,11 +128,6 @@ void AttatchmentMassDriver::Update(float dt) if(currentEnergy < maxEnergy) { currentEnergy += rechargeRate; - - if(currentEnergy == maxEnergy) - { - int trap = 0; - } } } @@ -157,15 +152,15 @@ void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &usage, float ((DynamicObject*)(this->heldObject->GetCustomTag()))->RemoveManipulation(); this->hasObject = false; this->heldObject = NULL; - return ; + return; } Oyster::Math::Float radius = 4; Oyster::Math::Float3 look = owner->GetLookDir().GetNormalized(); - Oyster::Math::Float lenght = 10; + Oyster::Math::Float lenght = 20; Oyster::Math::Float3 pos = owner->GetRigidBody()->GetState().centerPos; - pushForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (this->force * 0.6f); + pushForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (this->force * 0.9f); Oyster::Collision3D::Cone *hitCone = new Oyster::Collision3D::Cone(lenght,pos,(Oyster::Math::Float4)owner->GetRigidBody()->GetState().quaternion,radius); @@ -201,10 +196,10 @@ void AttatchmentMassDriver::ForcePull(const WEAPON_FIRE &usage, float dt) //if no object has been picked up then suck objects towards you Oyster::Math::Float radius = 4; Oyster::Math::Float3 look = owner->GetLookDir().GetNormalized(); - Oyster::Math::Float lenght = 10; + Oyster::Math::Float lenght = 20; Oyster::Math::Float3 pos = owner->GetRigidBody()->GetState().centerPos; - Oyster::Math::Float4 pullForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (this->force * 0.2); + Oyster::Math::Float4 pullForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (this->force * 0.3f); Oyster::Collision3D::Cone hitCone(lenght,pos,(Oyster::Math::Float4)owner->GetRigidBody()->GetState().quaternion,radius); forcePushData args; @@ -218,7 +213,7 @@ void AttatchmentMassDriver::PickUpObject(const WEAPON_FIRE &usage, float dt) { //DEBUG: MessageBeep(MB_ICONINFORMATION); - Oyster::Math::Float3 pos = owner->GetPosition() + owner->GetLookDir().GetNormalized() * 2; + Oyster::Math::Float3 pos = owner->GetPosition() + owner->GetLookDir().GetNormalized() * 1.5f; //Do ray test first! //Oyster::Collision3D::Ray r(pos, owner->GetLookDir()); @@ -226,7 +221,7 @@ void AttatchmentMassDriver::PickUpObject(const WEAPON_FIRE &usage, float dt) if(this->hasObject) return; - Oyster::Collision3D::Sphere hitSphere = Oyster::Collision3D::Sphere(pos , 1); + Oyster::Collision3D::Sphere hitSphere = Oyster::Collision3D::Sphere(pos , 0.5); Oyster::Physics::API::Instance().ApplyEffect(&hitSphere,this,AttemptPickUp); return; } diff --git a/Code/Game/GameLogic/AttatchmentMassDriver.h b/Code/Game/GameLogic/AttatchmentMassDriver.h index 385fcca3..d37b7dd4 100644 --- a/Code/Game/GameLogic/AttatchmentMassDriver.h +++ b/Code/Game/GameLogic/AttatchmentMassDriver.h @@ -11,7 +11,7 @@ namespace GameLogic { const Oyster::Math::Float StandardMaxEnergy = 100.0f; const Oyster::Math::Float StandardrechargeRate = 0.5f; - const Oyster::Math::Float Standardforce = 1000.0f; + const Oyster::Math::Float Standardforce = 2000.0f; class AttatchmentMassDriver : public IAttatchment { diff --git a/Code/Game/GameLogic/CollisionManager.cpp b/Code/Game/GameLogic/CollisionManager.cpp index 928ddaac..d6ebe095 100644 --- a/Code/Game/GameLogic/CollisionManager.cpp +++ b/Code/Game/GameLogic/CollisionManager.cpp @@ -193,7 +193,7 @@ using namespace GameLogic; Oyster::Math::Float damageDone = 0.0f; - Oyster::Math::Float forceThreashHold = 30.0f; //FIX: balance this + Oyster::Math::Float forceThreashHold = 100.0f; //FIX: balance this if(impactPower > forceThreashHold) //should only take damage if the force is high enough {