diff --git a/Crawler/Class.cpp b/Crawler/Class.cpp index 40f907d1..bee6837a 100644 --- a/Crawler/Class.cpp +++ b/Crawler/Class.cpp @@ -304,6 +304,7 @@ bool Wizard::RightClickAbility(){ float pointMouseDirection=atan2(game->GetWorldMousePos().y-p.GetPos().y,game->GetWorldMousePos().x-p.GetPos().x); vf2d pointTowardsMouse={cos(pointMouseDirection),sin(pointMouseDirection)}; float dist=std::clamp(geom2d::line{p.GetPos(),game->GetWorldMousePos()}.length(),0.f,6.5f*24); + if(dist<12)return false; vf2d teleportPoint=p.GetPos()+pointTowardsMouse*dist; while(dist>0&&game->HasTileCollision(game->GetCurrentLevel(),teleportPoint)&&p.CanPathfindTo(p.GetPos(),teleportPoint)){ dist-=24; @@ -317,7 +318,7 @@ bool Wizard::RightClickAbility(){ p.iframe_time=0.35; return true; } else { - p.notificationDisplay={"Cannot Teleport to that location!",1}; + p.notificationDisplay={"Cannot Teleport to that location!",0.5}; return false; } } diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp index 08ef1bf8..4945b3b9 100644 --- a/Crawler/Crawler.cpp +++ b/Crawler/Crawler.cpp @@ -837,8 +837,8 @@ void Crawler::RenderHud(){ DrawShadowStringPropDecal(vf2d{float(ScreenWidth()/2),float(ScreenHeight()/4)}-GetTextSizeProp(displayText)/2,displayText,DARK_RED,VERY_DARK_RED); } if(player.notificationDisplay.second>0){ - std::string displayText=player.notEnoughManaDisplay.first; - DrawShadowStringPropDecal(vf2d{float(ScreenWidth()/2),float(ScreenHeight()/4)}-GetTextSizeProp(displayText)/2,displayText,DARK_BLUE,VERY_DARK_BLUE); + std::string displayText=player.notificationDisplay.first; + DrawShadowStringPropDecal(vf2d{float(ScreenWidth()/2),float(ScreenHeight()/4)-24}-GetTextSizeProp(displayText)/2,displayText,BLUE,VERY_DARK_BLUE); } std::string versionStr("v" + std::to_string(VERSION_MAJOR) + "." + std::to_string(VERSION_MINOR) + "." + std::to_string(VERSION_PATCH) + "." + std::to_string(VERSION_BUILD)); DrawShadowStringDecal(vf2d{ GetScreenSize() } - vf2d{ GetTextSize(versionStr) }*0.4,versionStr,WHITE,BLACK,{0.4,0.4},0.4); diff --git a/Crawler/Pathfinding.cpp b/Crawler/Pathfinding.cpp index 883bae0f..66857cd6 100644 --- a/Crawler/Pathfinding.cpp +++ b/Crawler/Pathfinding.cpp @@ -28,6 +28,14 @@ void Pathfinding::Initialize(){ nodes[y*game->WORLD_SIZE.x + x].vecNeighbours.push_back(&nodes[(y + 0) * game->WORLD_SIZE.x + (x - 1)]); if(xWORLD_SIZE.x-1) nodes[y*game->WORLD_SIZE.x + x].vecNeighbours.push_back(&nodes[(y + 0) * game->WORLD_SIZE.x + (x + 1)]); + if (y>0 && x>0) + nodes[y*game->WORLD_SIZE.x + x].vecNeighbours.push_back(&nodes[(y - 1) * game->WORLD_SIZE.x + (x - 1)]); + if (yWORLD_SIZE.y-1 && x>0) + nodes[y*game->WORLD_SIZE.x + x].vecNeighbours.push_back(&nodes[(y + 1) * game->WORLD_SIZE.x + (x - 1)]); + if (y>0 && xWORLD_SIZE.x-1) + nodes[y*game->WORLD_SIZE.x + x].vecNeighbours.push_back(&nodes[(y - 1) * game->WORLD_SIZE.x + (x + 1)]); + if (yWORLD_SIZE.y - 1 && xWORLD_SIZE.x-1) + nodes[y*game->WORLD_SIZE.x + x].vecNeighbours.push_back(&nodes[(y + 1) * game->WORLD_SIZE.x + (x + 1)]); } // Manually positio the start and end markers so they are not nullptr diff --git a/Crawler/Version.h b/Crawler/Version.h index 33e4fe2b..d0acaf8d 100644 --- a/Crawler/Version.h +++ b/Crawler/Version.h @@ -2,7 +2,7 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 0 -#define VERSION_BUILD 440 +#define VERSION_BUILD 448 #define stringify(a) stringify_(a) #define stringify_(a) #a