Remove diagonal pathfinding from A*, since tiles may not necessarily consume a full tile. Adjusted Wizard Teleport range accordingly.
This commit is contained in:
@@ -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});
|
||||
}
|
||||
|
||||
@@ -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(x<game->GetCurrentMapData().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 (y<game->GetCurrentMapData().height-1 && x>0)
|
||||
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)
|
||||
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)
|
||||
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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user