over9000 всяких фиксов
This commit is contained in:
@@ -51,16 +51,16 @@ void UcppGI::cppLvlManage(UObject* WorldContextObject, Fcppcoords currentCoords,
|
||||
for (const auto& crd : cpplvlsForLoading) // here is filter code
|
||||
{
|
||||
cppCoordsEq(crd, lvl.coords, true, false, ceq[0], ceq[1], ceq[2], ceq[3], ceq[4], ceq[5], ceq[6]);
|
||||
|
||||
|
||||
if (
|
||||
(
|
||||
((ceq[0] || !is3DTour || lvl.coords.flat == -1) && ceq[5])
|
||||
|| (is3DTour ? lvl.anotherLvl >= 1 && lvl.anotherLvl == crd.flat : lvl.anotherLvl >= 1 && (crd.flat>=0 ? lvl.anotherLvl == crd.flat:true) && lvl.coords.floor < crd.floor)
|
||||
)
|
||||
|| (is3DTour ? lvl.anotherLvl >= 1 && lvl.anotherLvl == crd.flat : lvl.anotherLvl >= 1 && (crd.flat >= 0 ? lvl.anotherLvl == crd.flat : true) && lvl.coords.floor < crd.floor)
|
||||
)
|
||||
&& ceq[3] && ceq[4]
|
||||
) loadthis = true; //load all on floor and under 2-floor flat, and full 2-floor flat in 3d tour
|
||||
|
||||
|
||||
) loadthis = true; //load all on floor and under 2-floor flat, and full 2-floor flat in 3d tour
|
||||
|
||||
|
||||
//if (ceq[6]) loadthis = true; //classic load with parallax
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,8 @@ void UcppGI::avoidAutoState()
|
||||
if (!soc)return;
|
||||
|
||||
DECLARE_CMD(CMD_NOP, cmd);
|
||||
sendCommand(*soc, cmd);
|
||||
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [cmd]()
|
||||
{sendCommand(*soc, cmd); });
|
||||
}
|
||||
|
||||
void UcppGI::makeSocket(FString ip, int port)
|
||||
@@ -149,11 +150,11 @@ void UcppGI::makeSocket(FString ip, int port)
|
||||
void UcppGI::setColor(uint8 code, FColor color)
|
||||
{
|
||||
if (!soc)return;
|
||||
|
||||
DECLARE_CMD(CMD_SET_COLOR, cmd);
|
||||
cmd.code = code;
|
||||
cmd.r = color.R, cmd.g = color.G, cmd.b = color.B;
|
||||
sendCommand(*soc, cmd);
|
||||
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [cmd]()
|
||||
{sendCommand(*soc, cmd);});
|
||||
|
||||
}
|
||||
|
||||
@@ -166,20 +167,23 @@ void UcppGI::setLight(int house, int floor, int strip, uint8 state)
|
||||
if (house < 0) {
|
||||
DECLARE_CMD(CMD_SET_ALL_STATE, cmd);
|
||||
cmd.state = state;
|
||||
sendCommand(*soc, cmd);
|
||||
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [cmd]()
|
||||
{sendCommand(*soc, cmd); });
|
||||
return;
|
||||
}
|
||||
DECLARE_CMD(CMD_SET_BUILDING_STATE, cmd);
|
||||
cmd.state = state;
|
||||
cmd.building = house;
|
||||
sendCommand(*soc, cmd);
|
||||
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [cmd]()
|
||||
{sendCommand(*soc, cmd); });
|
||||
return;
|
||||
}
|
||||
DECLARE_CMD(CMD_SET_FLOOR_STATE, cmd);
|
||||
cmd.state = state;
|
||||
cmd.building = house;
|
||||
cmd.floor = floor;
|
||||
sendCommand(*soc, cmd);
|
||||
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [cmd]()
|
||||
{sendCommand(*soc, cmd); });
|
||||
return;
|
||||
}
|
||||
DECLARE_CMD(CMD_SET_ROOM_STATE, cmd);
|
||||
@@ -187,7 +191,8 @@ void UcppGI::setLight(int house, int floor, int strip, uint8 state)
|
||||
cmd.building = house;
|
||||
cmd.floor = floor;
|
||||
cmd.strip = strip;
|
||||
sendCommand(*soc, cmd);
|
||||
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [cmd]()
|
||||
{sendCommand(*soc, cmd); });
|
||||
|
||||
}
|
||||
|
||||
@@ -197,7 +202,8 @@ void UcppGI::setPartState(uint8 part, uint8 state)
|
||||
DECLARE_CMD(CMD_SET_PART_MODE, cmd);
|
||||
cmd.mode = state;
|
||||
cmd.part = part;
|
||||
sendCommand(*soc, cmd);
|
||||
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [cmd]()
|
||||
{sendCommand(*soc, cmd); });
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user