experimental fix for pickup

This commit is contained in:
verysecrethero
2016-02-25 15:23:00 +01:00
parent bc227c3d61
commit 8740e8b77a
5 changed files with 81 additions and 13 deletions
@@ -192,6 +192,8 @@ bool FirstPersonInputController<EventContext>::OnLockMouse(const Events::LockMou
template <typename EventContext>
void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer) {
ImGui::Text(std::to_string(m_AssaultDashCoolDownTimer).c_str());
m_AssaultDashDoubleTapDeltaTime += dt;
m_AssaultDashCoolDownTimer -= dt;
//cooldown = assaultDashCoolDownMaxTimer sec, pretend the dash lasts 0.25 sec (for friction to do its work)
+9
View File
@@ -20,6 +20,8 @@ public:
private:
EventRelay<AmmoPickupSystem, Events::TriggerTouch> m_ETriggerTouch;
bool OnTriggerTouch(Events::TriggerTouch& e);
EventRelay<AmmoPickupSystem, Events::TriggerLeave> m_ETriggerLeave;
bool OnTriggerLeave(Events::TriggerLeave& e);
struct NewAmmoPickup {
glm::vec3 Pos;
@@ -28,6 +30,13 @@ private:
double DecreaseThisRespawnTimer;
EntityID parentID;
};
struct EntityAtMaxValuePickupStruct {
EntityWrapper player;
EntityWrapper pickup;
};
std::vector<NewAmmoPickup> m_ETriggerTouchVector;
std::vector<EntityAtMaxValuePickupStruct> m_AmmoPickupAtMaxHealthAmmo;
void DoPickup(EntityWrapper &player, EntityWrapper &trigger);
};
#endif