Remove diagonal pathfinding from A*, since tiles may not necessarily consume a full tile. Adjusted Wizard Teleport range accordingly.

pull/29/head
sigonasr2 1 year ago
parent 803e2caf23
commit 7abb714144
  1. 2
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 4
      Adventures in Lestoria/Pathfinding.cpp
  3. 2
      Adventures in Lestoria/Player.cpp
  4. 2
      Adventures in Lestoria/Version.h
  5. 2
      Adventures in Lestoria/assets/config/classes/Wizard.txt

@ -840,7 +840,7 @@ void AiL::RenderWorld(float fElapsedTime){
#pragma region Basic Tile Layer Rendering #pragma region Basic Tile Layer Rendering
if(GetCurrentMap().backdrop.length()>0){ if(GetCurrentMap().backdrop.length()>0){
view.DrawPartialDecal({0,0},WINDOW_SIZE,BACKDROP_DATA[GetCurrentMap().backdrop].Decal(),"Backdrop Config.Speed Ratio"_F*-camera.GetPosition(),WINDOW_SIZE); DrawPartialDecal({0,0},WINDOW_SIZE,BACKDROP_DATA[GetCurrentMap().backdrop].Decal(),"Backdrop Config.Speed Ratio"_F*-camera.GetPosition()+view.GetWorldOffset(),WINDOW_SIZE);
}else{ }else{
FillRectDecal({0,0},GetScreenSize(),{100,180,100}); FillRectDecal({0,0},GetScreenSize(),{100,180,100});
} }

@ -70,14 +70,14 @@ void Pathfinding::Initialize(){
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 0) * game->GetCurrentMapData().width + (x - 1)]); nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 0) * game->GetCurrentMapData().width + (x - 1)]);
if(x<game->GetCurrentMapData().width-1) if(x<game->GetCurrentMapData().width-1)
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 0) * game->GetCurrentMapData().width + (x + 1)]); nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 0) * game->GetCurrentMapData().width + (x + 1)]);
if (y>0 && x>0) /*if (y>0 && x>0)
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y - 1) * game->GetCurrentMapData().width + (x - 1)]); nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y - 1) * game->GetCurrentMapData().width + (x - 1)]);
if (y<game->GetCurrentMapData().height-1 && x>0) if (y<game->GetCurrentMapData().height-1 && x>0)
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x - 1)]); nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x - 1)]);
if (y>0 && x<game->GetCurrentMapData().width-1) if (y>0 && x<game->GetCurrentMapData().width-1)
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y - 1) * game->GetCurrentMapData().width + (x + 1)]); nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y - 1) * game->GetCurrentMapData().width + (x + 1)]);
if (y<game->GetCurrentMapData().height - 1 && x<game->GetCurrentMapData().width-1) if (y<game->GetCurrentMapData().height - 1 && x<game->GetCurrentMapData().width-1)
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x + 1)]); nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x + 1)]);*/
} }
// Manually position the start and end markers so they are not nullptr // Manually position the start and end markers so they are not nullptr

@ -370,7 +370,7 @@ void Player::Update(float fElapsedTime){
case State::TELEPORT:{ case State::TELEPORT:{
teleportAnimationTimer=std::max(0.f,teleportAnimationTimer-fElapsedTime); teleportAnimationTimer=std::max(0.f,teleportAnimationTimer-fElapsedTime);
if(teleportAnimationTimer<=0){ if(teleportAnimationTimer<=0){
SetPos(teleportTarget); ForceSetPos(teleportTarget);
SetState(State::NORMAL); SetState(State::NORMAL);
} }
animation.UpdateState(internal_animState,fElapsedTime); animation.UpdateState(internal_animState,fElapsedTime);

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_PATCH 1 #define VERSION_PATCH 1
#define VERSION_BUILD 5568 #define VERSION_BUILD 5574
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

@ -63,7 +63,7 @@ Wizard
# The minimum tile range required for a teleport. # The minimum tile range required for a teleport.
TilesMin = 1 TilesMin = 1
# The maximum tile range a teleport is allowed to go. # The maximum tile range a teleport is allowed to go.
TilesMax = 8 TilesMax = 12
# Number of teleport particles to spawn. # Number of teleport particles to spawn.
ParticleCount = 16 ParticleCount = 16

Loading…
Cancel
Save