Fixed character movement by ignoring key repeats
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
#include "base_character.hpp"
|
||||
|
||||
//TODO: remove this
|
||||
#include "config_utility.hpp"
|
||||
|
||||
//-------------------------
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user