Have a way to detect the best rotation but it's still off a bit. Seems to choose wrong in simple situations. Look in System::shortest_rotate.

This commit is contained in:
Zed A. Shaw 2025-09-01 01:37:03 -04:00
parent f98cc543f6
commit d822cb3438
6 changed files with 32 additions and 48 deletions

View file

@ -5,6 +5,10 @@
#include "spatialmap.hpp"
#include "game_level.hpp"
namespace gui {
enum class Event;
}
namespace System {
using namespace components;
using namespace DinkyECS;
@ -45,6 +49,8 @@ namespace System {
void set_position(DinkyECS::World& world, SpatialMap& collision, Entity entity, Position pos);
bool use_item(const std::string& slot_name);
gui::Event shortest_rotate(Point player_at, Point aiming_at, Point turning_to);
template <typename T>
void multi_path(GameDB::Level& level, Pathing& paths, Matrix& walls) {
// first, put everything of this type as a target