forked from mirror/openmw-tes3mp
[Server] Store data from ActorPosition in the ActorLists of Cells
This commit is contained in:
parent
1a699329e5
commit
fafed96bf4
2 changed files with 10 additions and 2 deletions
|
@ -81,8 +81,15 @@ void Cell::readActorList(unsigned char packetID, const mwmp::BaseActorList *newA
|
||||||
|
|
||||||
switch (packetID)
|
switch (packetID)
|
||||||
{
|
{
|
||||||
|
case ID_ACTOR_POSITION:
|
||||||
|
|
||||||
|
cellActor->hasPositionData = true;
|
||||||
|
cellActor->position = newActor.position;
|
||||||
|
break;
|
||||||
|
|
||||||
case ID_ACTOR_STATS_DYNAMIC:
|
case ID_ACTOR_STATS_DYNAMIC:
|
||||||
|
|
||||||
|
cellActor->hasStatsDynamicData = true;
|
||||||
cellActor->creatureStats.mDynamic[0] = newActor.creatureStats.mDynamic[0];
|
cellActor->creatureStats.mDynamic[0] = newActor.creatureStats.mDynamic[0];
|
||||||
cellActor->creatureStats.mDynamic[1] = newActor.creatureStats.mDynamic[1];
|
cellActor->creatureStats.mDynamic[1] = newActor.creatureStats.mDynamic[1];
|
||||||
cellActor->creatureStats.mDynamic[2] = newActor.creatureStats.mDynamic[2];
|
cellActor->creatureStats.mDynamic[2] = newActor.creatureStats.mDynamic[2];
|
||||||
|
|
|
@ -19,9 +19,10 @@ namespace mwmp
|
||||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||||
|
|
||||||
if (serverCell != nullptr)
|
if (serverCell != nullptr)
|
||||||
|
{
|
||||||
|
serverCell->readActorList(packetID, &actorList);
|
||||||
serverCell->sendToLoaded(&packet, &actorList);
|
serverCell->sendToLoaded(&packet, &actorList);
|
||||||
|
}
|
||||||
//Script::Call<Script::CallbackIdentity("OnActorPosition")>(player.getId(), actorList.cell.getDescription().c_str());
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue