mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed unit payloads, spread update load from mission update
This commit is contained in:
@@ -12,6 +12,7 @@ public:
|
||||
void appendCommand(Command* command);
|
||||
void execute(lua_State* L);
|
||||
void handleRequest(wstring key, json::value value);
|
||||
|
||||
|
||||
private:
|
||||
list<Command*> commands;
|
||||
|
||||
@@ -65,9 +65,9 @@ void Scheduler::handleRequest(wstring key, json::value value)
|
||||
wstring unitName = unit->getUnitName();
|
||||
json::value path = value[L"path"];
|
||||
list<Coords> newPath;
|
||||
for (auto const& e : path.as_object())
|
||||
for (int i = 1; i <= path.as_object().size(); i++)
|
||||
{
|
||||
wstring WP = e.first;
|
||||
wstring WP = to_wstring(i);
|
||||
double lat = path[WP][L"lat"].as_double();
|
||||
double lng = path[WP][L"lng"].as_double();
|
||||
log(unitName + L" set path destination " + WP + L" (" + to_wstring(lat) + L", " + to_wstring(lng) + L")");
|
||||
|
||||
@@ -98,6 +98,7 @@ json::value Unit::json()
|
||||
auto json = json::value::object();
|
||||
|
||||
json[L"alive"] = alive;
|
||||
json[L"AI"] = AI;
|
||||
json[L"name"] = json::value::string(name);
|
||||
json[L"unitName"] = json::value::string(unitName);
|
||||
json[L"groupName"] = json::value::string(groupName);
|
||||
|
||||
Reference in New Issue
Block a user