Send ID_WORLD_VIDEO_PLAY from ingame scripts

This commit is contained in:
David Cernat 2016-10-24 17:55:10 +03:00
parent b6111d16cc
commit be73265848

View file

@ -88,6 +88,12 @@ namespace MWScript
bool allowSkipping = runtime[0].mInteger != 0;
runtime.pop();
// Added by tes3mp
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->video = name;
event->allowSkipping = allowSkipping;
mwmp::Main::get().getNetworking()->GetWorldPacket(ID_WORLD_VIDEO_PLAY)->Send(event);
MWBase::Environment::get().getWindowManager()->playVideo (name, allowSkipping);
}
};