From 7abb7141444a04fcb07e1d395ca8f7e2a4d590dd Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 10 Jan 2024 04:08:52 -0600 Subject: [PATCH] Remove diagonal pathfinding from A*, since tiles may not necessarily consume a full tile. Adjusted Wizard Teleport range accordingly. --- Adventures in Lestoria/AdventuresInLestoria.cpp | 2 +- Adventures in Lestoria/Pathfinding.cpp | 4 ++-- Adventures in Lestoria/Player.cpp | 2 +- Adventures in Lestoria/Version.h | 2 +- Adventures in Lestoria/assets/config/classes/Wizard.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index f69b78cc..edc0e14a 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -840,7 +840,7 @@ void AiL::RenderWorld(float fElapsedTime){ #pragma region Basic Tile Layer Rendering 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{ FillRectDecal({0,0},GetScreenSize(),{100,180,100}); } diff --git a/Adventures in Lestoria/Pathfinding.cpp b/Adventures in Lestoria/Pathfinding.cpp index c50adce5..907b10cd 100644 --- a/Adventures in Lestoria/Pathfinding.cpp +++ b/Adventures in Lestoria/Pathfinding.cpp @@ -70,14 +70,14 @@ void Pathfinding::Initialize(){ nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 0) * game->GetCurrentMapData().width + (x - 1)]); if(xGetCurrentMapData().width-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)]); if (yGetCurrentMapData().height-1 && x>0) nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x - 1)]); if (y>0 && xGetCurrentMapData().width-1) nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y - 1) * game->GetCurrentMapData().width + (x + 1)]); if (yGetCurrentMapData().height - 1 && xGetCurrentMapData().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 diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 45138684..1007c40b 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -370,7 +370,7 @@ void Player::Update(float fElapsedTime){ case State::TELEPORT:{ teleportAnimationTimer=std::max(0.f,teleportAnimationTimer-fElapsedTime); if(teleportAnimationTimer<=0){ - SetPos(teleportTarget); + ForceSetPos(teleportTarget); SetState(State::NORMAL); } animation.UpdateState(internal_animState,fElapsedTime); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 733683ee..ca94b38f 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 1 -#define VERSION_BUILD 5568 +#define VERSION_BUILD 5574 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/config/classes/Wizard.txt b/Adventures in Lestoria/assets/config/classes/Wizard.txt index de42f474..8281e20d 100644 --- a/Adventures in Lestoria/assets/config/classes/Wizard.txt +++ b/Adventures in Lestoria/assets/config/classes/Wizard.txt @@ -63,7 +63,7 @@ Wizard # The minimum tile range required for a teleport. TilesMin = 1 # The maximum tile range a teleport is allowed to go. - TilesMax = 8 + TilesMax = 12 # Number of teleport particles to spawn. ParticleCount = 16