mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Refactoing of pathfinder <-> client/AI interaction to remove dependency on selected hero
- finished removal of server-side setSelection - disabled some broken code (AI & cheats). TODO: fix
This commit is contained in:
@@ -86,7 +86,7 @@ enum
|
||||
/// Central class for managing user interface logic
|
||||
class CPlayerInterface : public CGameInterface, public ILockedUpdatable
|
||||
{
|
||||
const CGObjectInstance * currentSelection;
|
||||
const CArmedInstance * currentSelection;
|
||||
public:
|
||||
bool observerInDuelMode;
|
||||
|
||||
@@ -118,6 +118,8 @@ public:
|
||||
shared_ptr<CBattleGameInterface> autofightingAI; //AI that makes decisions
|
||||
bool isAutoFightOn; //Flag, switch it to stop quick combat. Don't touch if there is no battle interface.
|
||||
|
||||
const CArmedInstance * getSelection();
|
||||
void setSelection(const CArmedInstance * obj);
|
||||
|
||||
struct SpellbookLastSetting
|
||||
{
|
||||
@@ -247,7 +249,6 @@ public:
|
||||
void movementPxStep( const TryMoveHero &details, int i, const int3 &hp, const CGHeroInstance * ho );//performing step of movement
|
||||
void finishMovement( const TryMoveHero &details, const int3 &hp, const CGHeroInstance * ho ); //finish movement
|
||||
void eraseCurrentPathOf( const CGHeroInstance * ho, bool checkForExistanceOfPath = true );
|
||||
void updateCurrentHeroPath();
|
||||
|
||||
void removeLastNodeFromPath(const CGHeroInstance *ho);
|
||||
CGPath *getAndVerifyPath( const CGHeroInstance * h );
|
||||
|
||||
Reference in New Issue
Block a user