[Client] Rename LocalEvent into WorldEvent

coverity_scan^2
David Cernat 8 years ago
parent 182b238b5f
commit e703dd42aa

@ -96,7 +96,7 @@ add_openmw_dir (mwbase
inputmanager windowmanager statemanager
)
add_openmw_dir (mwmp DedicatedPlayer LocalEvent LocalPlayer Networking Main GUIChat GUILogin GUIController PlayerMarkerCollection GUIDialogList WorldController)
add_openmw_dir (mwmp DedicatedPlayer WorldEvent LocalPlayer Networking Main GUIChat GUILogin GUIController PlayerMarkerCollection GUIDialogList WorldController)
# Main executable

@ -6,7 +6,7 @@
#include <components/openmw-mp/Log.hpp>
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwmp/WorldController.hpp"
#include "../mwbase/environment.hpp"
@ -102,7 +102,7 @@ namespace MWGui
return;
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *mPtr.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -155,7 +155,7 @@ namespace MWGui
}
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *mPtr.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -301,7 +301,7 @@ namespace MWGui
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *mPtr.getCell()->getCell();
mwmp::WorldObject worldObject;

@ -2,7 +2,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwmp/LocalPlayer.hpp"
#include "../mwworld/cellstore.hpp"
@ -67,7 +67,7 @@ namespace MWGui
dropped.getCellRef().setRefNumIndex(cellStore->getLastRefNumIndex());
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *dropped.getCell()->getCell();
mwmp::WorldObject worldObject;

@ -18,7 +18,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwmp/LocalPlayer.hpp"
#include "../mwworld/cellstore.hpp"
@ -636,7 +636,7 @@ namespace MWGui
MWWorld::Ptr newObject = *player.getClass().getContainerStore (player).add (object, object.getRefData().getCount(), player);
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *object.getCell()->getCell();
mwmp::WorldObject worldObject;

@ -2,7 +2,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwworld/cellstore.hpp"
@ -59,7 +59,7 @@ namespace MWMechanics
if (Misc::Rng::roll0to99() <= x)
{
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *lock.getCell()->getCell();
mwmp::WorldObject worldObject;

@ -734,7 +734,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
pl = Players::getPlayer(guid);
WorldPacket *myPacket = worldController.GetPacket(packet->data[0]);
LocalEvent *event = new LocalEvent(guid);
WorldEvent *event = new WorldEvent(guid);
myPacket->Packet(&bsIn, event, false);
switch (packet->data[0])
@ -935,9 +935,9 @@ LocalPlayer *Networking::getLocalPlayer()
return mwmp::Main::get().getLocalPlayer();
}
LocalEvent *Networking::createLocalEvent()
WorldEvent *Networking::createWorldEvent()
{
return new LocalEvent(getLocalPlayer()->guid);
return new WorldEvent(getLocalPlayer()->guid);
}
bool Networking::isDedicatedPlayer(const MWWorld::Ptr &ptr)

@ -9,7 +9,7 @@
#include <BitStream.h>
#include <string>
#include "LocalEvent.hpp"
#include "WorldEvent.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Controllers/PlayerPacketController.hpp>
#include <components/openmw-mp/Controllers/WorldPacketController.hpp>
@ -40,7 +40,7 @@ namespace mwmp
bool isConnected();
LocalEvent *createLocalEvent();
WorldEvent *createWorldEvent();
private:
bool connected;

@ -1,4 +1,4 @@
#include "LocalEvent.hpp"
#include "WorldEvent.hpp"
#include "Main.hpp"
#include "Networking.hpp"
#include "LocalPlayer.hpp"
@ -20,32 +20,32 @@
using namespace mwmp;
using namespace std;
LocalEvent::LocalEvent(RakNet::RakNetGUID guid)
WorldEvent::WorldEvent(RakNet::RakNetGUID guid)
{
this->guid = guid;
}
LocalEvent::~LocalEvent()
WorldEvent::~WorldEvent()
{
}
Networking *LocalEvent::getNetworking()
Networking *WorldEvent::getNetworking()
{
return mwmp::Main::get().getNetworking();
}
void LocalEvent::addObject(WorldObject worldObject)
void WorldEvent::addObject(WorldObject worldObject)
{
objectChanges.objects.push_back(worldObject);
}
void LocalEvent::addContainerItem(ContainerItem containerItem)
void WorldEvent::addContainerItem(ContainerItem containerItem)
{
containerChanges.items.push_back(containerItem);
}
void LocalEvent::editContainer(MWWorld::CellStore* cellStore)
void WorldEvent::editContainer(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -103,7 +103,7 @@ void LocalEvent::editContainer(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::placeObjects(MWWorld::CellStore* cellStore)
void WorldEvent::placeObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -141,7 +141,7 @@ void LocalEvent::placeObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::deleteObjects(MWWorld::CellStore* cellStore)
void WorldEvent::deleteObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -167,7 +167,7 @@ void LocalEvent::deleteObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::lockObjects(MWWorld::CellStore* cellStore)
void WorldEvent::lockObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -193,7 +193,7 @@ void LocalEvent::lockObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::unlockObjects(MWWorld::CellStore* cellStore)
void WorldEvent::unlockObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -219,7 +219,7 @@ void LocalEvent::unlockObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::scaleObjects(MWWorld::CellStore* cellStore)
void WorldEvent::scaleObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -245,7 +245,7 @@ void LocalEvent::scaleObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::moveObjects(MWWorld::CellStore* cellStore)
void WorldEvent::moveObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -272,7 +272,7 @@ void LocalEvent::moveObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::rotateObjects(MWWorld::CellStore* cellStore)
void WorldEvent::rotateObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -299,7 +299,7 @@ void LocalEvent::rotateObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::animateObjects(MWWorld::CellStore* cellStore)
void WorldEvent::animateObjects(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -326,7 +326,7 @@ void LocalEvent::animateObjects(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::activateDoors(MWWorld::CellStore* cellStore)
void WorldEvent::activateDoors(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -353,7 +353,7 @@ void LocalEvent::activateDoors(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::playMusic()
void WorldEvent::playMusic()
{
WorldObject worldObject;
@ -368,7 +368,7 @@ void LocalEvent::playMusic()
}
}
void LocalEvent::playVideo()
void WorldEvent::playVideo()
{
WorldObject worldObject;
@ -384,7 +384,7 @@ void LocalEvent::playVideo()
}
}
void LocalEvent::setLocalShorts(MWWorld::CellStore* cellStore)
void WorldEvent::setLocalShorts(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -412,7 +412,7 @@ void LocalEvent::setLocalShorts(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::setLocalFloats(MWWorld::CellStore* cellStore)
void WorldEvent::setLocalFloats(MWWorld::CellStore* cellStore)
{
WorldObject worldObject;
@ -440,7 +440,7 @@ void LocalEvent::setLocalFloats(MWWorld::CellStore* cellStore)
}
}
void LocalEvent::setMemberShorts()
void WorldEvent::setMemberShorts()
{
WorldObject worldObject;
@ -472,7 +472,7 @@ void LocalEvent::setMemberShorts()
}
}
void LocalEvent::setGlobalShorts()
void WorldEvent::setGlobalShorts()
{
WorldObject worldObject;

@ -1,5 +1,5 @@
#ifndef OPENMW_LOCALEVENT_HPP
#define OPENMW_LOCALEVENT_HPP
#ifndef OPENMW_WORLDEVENT_HPP
#define OPENMW_WORLDEVENT_HPP
#include <components/openmw-mp/Base/BaseEvent.hpp>
#include "../mwworld/cellstore.hpp"
@ -8,12 +8,12 @@
namespace mwmp
{
class Networking;
class LocalEvent : public BaseEvent
class WorldEvent : public BaseEvent
{
public:
LocalEvent(RakNet::RakNetGUID guid);
virtual ~LocalEvent();
WorldEvent(RakNet::RakNetGUID guid);
virtual ~WorldEvent();
void addObject(WorldObject worldObject);
void addContainerItem(ContainerItem containerItem);
@ -43,4 +43,4 @@ namespace mwmp
};
}
#endif //OPENMW_LOCALEVENT_HPP
#endif //OPENMW_WORLDEVENT_HPP

@ -5,7 +5,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/class.hpp"
@ -66,7 +66,7 @@ namespace MWScript
// Added by tes3mp to check and set whether packets should be sent about this script
if (mwmp::Main::isValidPacketScript(ptr.getClass().getScript(ptr)))
{
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *ptr.getCell()->getCell();
mwmp::WorldObject worldObject;

@ -13,7 +13,7 @@
#include <components/openmw-mp/Log.hpp>
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwworld/esmstore.hpp"
@ -189,7 +189,7 @@ namespace MWScript
// Added by tes3mp
if (sendPackets)
{
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *mReference.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -233,7 +233,7 @@ namespace MWScript
// Only send a packet if this float has no decimals (to avoid spam)
if (sendPackets && value == (int) value)
{
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *mReference.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -301,7 +301,7 @@ namespace MWScript
// Added by tes3mp
if (sendPackets)
{
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
mwmp::WorldObject worldObject;
worldObject.varName = name;
@ -641,7 +641,7 @@ namespace MWScript
// Added by tes3mp
if (sendPackets && !global)
{
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
mwmp::WorldObject worldObject;
worldObject.refId = id;

@ -4,7 +4,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include <components/compiler/extensions.hpp>
#include <components/compiler/opcodes.hpp>
@ -90,7 +90,7 @@ namespace MWScript
runtime.pop();
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
mwmp::WorldObject worldObject;
worldObject.filename = name;
@ -200,7 +200,7 @@ namespace MWScript
}
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *ptr.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -240,7 +240,7 @@ namespace MWScript
MWWorld::Ptr ptr = R()(runtime);
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *ptr.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -713,7 +713,7 @@ namespace MWScript
if (parameter == 1)
{
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *ptr.getCell()->getCell();
mwmp::WorldObject worldObject;

@ -2,7 +2,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include <components/compiler/extensions.hpp>
#include <components/compiler/opcodes.hpp>
@ -71,7 +71,7 @@ namespace MWScript
runtime.pop();
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
mwmp::WorldObject worldObject;
worldObject.filename = sound;

@ -2,7 +2,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include <components/sceneutil/positionattitudetransform.hpp>
@ -47,7 +47,7 @@ namespace MWScript
runtime.pop();
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *ptr.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -552,7 +552,7 @@ namespace MWScript
ptr.getCellRef().setRefNumIndex(cellStore->getLastRefNumIndex());
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *ptr.getCell()->getCell();
mwmp::WorldObject worldObject;

@ -3,7 +3,7 @@
#include <components/openmw-mp/Log.hpp>
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwmp/LocalPlayer.hpp"
#include "../mwworld/cellstore.hpp"
@ -26,7 +26,7 @@ namespace MWWorld
MWWorld::Ptr newitem = *actor.getClass().getContainerStore (actor).add (getTarget(), getTarget().getRefData().getCount(), actor);
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *getTarget().getCell()->getCell();
mwmp::WorldObject worldObject;

@ -7,7 +7,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/LocalEvent.hpp"
#include "../mwmp/WorldEvent.hpp"
#include <components/esm/esmreader.hpp>
#include <components/esm/esmwriter.hpp>
@ -2266,7 +2266,7 @@ namespace MWWorld
}
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *door.getCell()->getCell();
mwmp::WorldObject worldObject;
@ -2293,7 +2293,7 @@ namespace MWWorld
void World::activateDoor(const Ptr &door, int state)
{
// Added by tes3mp
mwmp::LocalEvent *event = mwmp::Main::get().getNetworking()->createLocalEvent();
mwmp::WorldEvent *event = mwmp::Main::get().getNetworking()->createWorldEvent();
event->cell = *door.getCell()->getCell();
mwmp::WorldObject worldObject;

Loading…
Cancel
Save