forked from teamnwah/openmw-tes3coop
Send ID_WORLD_OBJECT_LOCK from ingame scripts
This commit is contained in:
parent
3fd93896f2
commit
aed884949c
1 changed files with 8 additions and 0 deletions
|
@ -186,6 +186,14 @@ namespace MWScript
|
|||
runtime.pop();
|
||||
}
|
||||
|
||||
// Added by tes3mp
|
||||
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
|
||||
event->cell = *ptr.getCell()->getCell();
|
||||
event->cellRef.mRefID = ptr.getCellRef().getRefId();
|
||||
event->cellRef.mRefNum = ptr.getCellRef().getRefNum();
|
||||
event->lockLevel = lockLevel;
|
||||
mwmp::Main::get().getNetworking()->GetWorldPacket(ID_WORLD_OBJECT_LOCK)->Send(event);
|
||||
|
||||
ptr.getClass().lock (ptr, lockLevel);
|
||||
|
||||
// Instantly reset door to closed state
|
||||
|
|
Loading…
Reference in a new issue