[General] Use separate variables for video & music filenames in packets

0.6.3
David Cernat 7 years ago
parent 509882b5f6
commit 3ed9d89280

@ -735,9 +735,9 @@ void ObjectList::playMusic()
{
for (const auto &baseObject : baseObjects)
{
LOG_APPEND(Log::LOG_VERBOSE, "- filename: %s", baseObject.filename.c_str());
LOG_APPEND(Log::LOG_VERBOSE, "- filename: %s", baseObject.musicFilename.c_str());
MWBase::Environment::get().getSoundManager()->streamMusic(baseObject.filename);
MWBase::Environment::get().getSoundManager()->streamMusic(baseObject.musicFilename);
}
}
@ -745,10 +745,10 @@ void ObjectList::playVideo()
{
for (const auto &baseObject : baseObjects)
{
LOG_APPEND(Log::LOG_VERBOSE, "- filename: %s, allowSkipping: %s", baseObject.filename.c_str(),
LOG_APPEND(Log::LOG_VERBOSE, "- filename: %s, allowSkipping: %s", baseObject.videoFilename.c_str(),
baseObject.allowSkipping ? "true" : "false");
MWBase::Environment::get().getWindowManager()->playVideo(baseObject.filename, baseObject.allowSkipping);
MWBase::Environment::get().getWindowManager()->playVideo(baseObject.videoFilename, baseObject.allowSkipping);
}
}
@ -956,14 +956,14 @@ void ObjectList::addDoorState(const MWWorld::Ptr& ptr, int state)
void ObjectList::addMusicPlay(std::string filename)
{
mwmp::BaseObject baseObject;
baseObject.filename = filename;
baseObject.musicFilename = filename;
addObject(baseObject);
}
void ObjectList::addVideoPlay(std::string filename, bool allowSkipping)
{
mwmp::BaseObject baseObject;
baseObject.filename = filename;
baseObject.videoFilename = filename;
baseObject.allowSkipping = allowSkipping;
addObject(baseObject);
}

@ -43,7 +43,9 @@ namespace mwmp
ESM::Cell destinationCell;
ESM::Position destinationPosition;
std::string filename;
std::string musicFilename;
std::string videoFilename;
bool allowSkipping;
std::string animGroup;

@ -10,5 +10,5 @@ PacketMusicPlay::PacketMusicPlay(RakNet::RakPeerInterface *peer) : ObjectPacket(
void PacketMusicPlay::Object(BaseObject &baseObject, bool send)
{
RW(baseObject.filename, send);
RW(baseObject.musicFilename, send);
}

@ -10,6 +10,6 @@ PacketVideoPlay::PacketVideoPlay(RakNet::RakPeerInterface *peer) : ObjectPacket(
void PacketVideoPlay::Object(BaseObject &baseObject, bool send)
{
RW(baseObject.filename, send);
RW(baseObject.videoFilename, send);
RW(baseObject.allowSkipping, send);
}

Loading…
Cancel
Save