Fixing bugs, one at a time
This commit is contained in:
@@ -196,6 +196,14 @@ void entityWalk(entity_t *entity, const entitydir_t direction) {
|
||||
// Can we walk here?
|
||||
if(!raise && !fall && !tileIsWalkable(tileNew)) return;// Blocked
|
||||
|
||||
// Raise/fall must be applied before checking for blocking entities,
|
||||
// otherwise the check compares against the wrong z-level.
|
||||
if(raise) {
|
||||
newPos.z += 1;
|
||||
} else if(fall) {
|
||||
newPos.z -= 1;
|
||||
}
|
||||
|
||||
// Entity in way?
|
||||
entity_t *other = ENTITIES;
|
||||
do {
|
||||
@@ -209,12 +217,6 @@ void entityWalk(entity_t *entity, const entitydir_t direction) {
|
||||
entity->position = newPos;
|
||||
entity->animation = ENTITY_ANIM_WALK;
|
||||
entity->animTime = ENTITY_ANIM_WALK_DURATION;// TODO: Running vs walking
|
||||
|
||||
if(raise) {
|
||||
entity->position.z += 1;
|
||||
} else if(fall) {
|
||||
entity->position.z -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void entityRun(entity_t *entity, const entitydir_t direction) {
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#define DUSK_DISPLAY_SCALE_UI 2
|
||||
#define DUSK_DISPLAY_SCALE_3D 2
|
||||
#include "displaydolphin.h"
|
||||
|
||||
#define displayPlatformInit displayInitDolphin
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#define DUSK_DISPLAY_SCALE_UI 1
|
||||
#define DUSK_DISPLAY_SCALE_3D 2
|
||||
#include "display/displaysdl2.h"
|
||||
|
||||
typedef displaysdl2_t displayplatform_t;
|
||||
|
||||
Reference in New Issue
Block a user