mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge branch '370-write-better-method-of-determining-if-a-command-has-been-completed' into 345-allow-for-copy-and-paste-in-rts-mode
This commit is contained in:
@@ -98,9 +98,11 @@ public:
|
||||
unsigned int getPriority() { return priority; }
|
||||
virtual string getString() = 0;
|
||||
virtual unsigned int getLoad() = 0;
|
||||
const string getHash() { return hash; }
|
||||
|
||||
protected:
|
||||
unsigned int priority = CommandPriority::LOW;
|
||||
const string hash = random_string(16);
|
||||
};
|
||||
|
||||
/* Simple low priority move command (from user click) */
|
||||
|
||||
@@ -11,9 +11,10 @@ public:
|
||||
|
||||
void appendCommand(Command* command);
|
||||
void execute(lua_State* L);
|
||||
void handleRequest(string key, json::value value, string username);
|
||||
void handleRequest(string key, json::value value, string username, json::value& answer);
|
||||
bool checkSpawnPoints(int spawnPoints, string coalition);
|
||||
|
||||
bool isCommandExecuted(string commandHash) { return (find(executedCommandsHashes.begin(), executedCommandsHashes.end(), commandHash) != executedCommandsHashes.end()); }
|
||||
|
||||
void setFrameRate(double newFrameRate) { frameRate = newFrameRate; }
|
||||
void setRestrictSpawns(bool newRestrictSpawns) { restrictSpawns = newRestrictSpawns; }
|
||||
void setRestrictToCoalition(bool newRestrictToCoalition) { restrictToCoalition = newRestrictToCoalition; }
|
||||
@@ -35,6 +36,7 @@ public:
|
||||
|
||||
private:
|
||||
list<Command*> commands;
|
||||
list<string> executedCommandsHashes;
|
||||
unsigned int load;
|
||||
double frameRate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user