Fixed character movement by ignoring key repeats

This commit is contained in:
2015-08-23 02:48:58 +10:00
parent 563a217237
commit 3e42371e02
6 changed files with 20 additions and 7 deletions
+1
View File
@@ -21,6 +21,7 @@
*/
#include "base_character.hpp"
//TODO: remove this
#include "config_utility.hpp"
//-------------------------
+1
View File
@@ -26,6 +26,7 @@
#include "vector2.hpp"
//The base class for all objects in the world
//TODO: write a better hierarchy
class Entity {
public:
virtual void Update();
+1
View File
@@ -26,6 +26,7 @@
bool LocalCharacter::ProcessCollisionGrid(std::list<BoundingBox> boxList) {
for(auto& box : boxList) {
if (box.CheckOverlap(origin + bounds)) {
//TODO: write a better collision system
origin -= motion;
motion = {0, 0};
return true;