mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix(map): reconnecting players will not be displayed with wrong name or wrong coalition
This commit is contained in:
parent
5cd566c7ca
commit
064c24e023
@ -57,6 +57,21 @@ void Unit::initialize(json::value json)
|
||||
|
||||
void Unit::update(json::value json, double dt)
|
||||
{
|
||||
if (json.has_string_field(L"name"))
|
||||
setName(to_string(json[L"name"]));
|
||||
|
||||
if (json.has_string_field(L"unitName"))
|
||||
setUnitName(to_string(json[L"unitName"]));
|
||||
|
||||
if (json.has_string_field(L"groupName"))
|
||||
setGroupName(to_string(json[L"groupName"]));
|
||||
|
||||
if (json.has_string_field(L"callsign"))
|
||||
setCallsign(to_string(json[L"callsign"]));
|
||||
|
||||
if (json.has_number_field(L"coalitionID"))
|
||||
setCoalition(json[L"coalitionID"].as_number().to_int32());
|
||||
|
||||
if (json.has_object_field(L"position"))
|
||||
{
|
||||
setPosition({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user