[Client] Disable leveled creatures from their class instead of scene.cpp

0.6.1
David Cernat 8 years ago
parent aaaed8ab8b
commit 34f0a5e076

@ -120,8 +120,17 @@ namespace MWClass
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
MWWorld::ManualRef manualRef(store, id);
manualRef.getPtr().getCellRef().setPosition(ptr.getCellRef().getPosition());
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->placeObject(manualRef.getPtr(), ptr.getCell() , ptr.getCellRef().getPosition());
customData.mSpawnActorId = placed.getClass().getCreatureStats(placed).getActorId();
/*
Start of tes3mp change (major)
Don't spawn leveled creatures in multiplayer; they'll be spawned when the server requests them
*/
//MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->placeObject(manualRef.getPtr(), ptr.getCell() , ptr.getCellRef().getPosition());
//customData.mSpawnActorId = placed.getClass().getCreatureStats(placed).getActorId();
/*
End of tes3mp change (major)
*/
customData.mSpawn = false;
}
else

@ -8,7 +8,6 @@
Include additional headers for multiplayer purposes
*/
#include <components/openmw-mp/Log.hpp>
#include "../mwmp/Main.hpp"
#include "../mwmp/LocalPlayer.hpp"
/*
@ -154,17 +153,6 @@ namespace
ptr.getCellRef().setScale(2);
}
/*
Start of tes3mp change (major)
Don't insert leveled creatures; they'll be inserted later on when the server needs them
*/
if (ptr.getTypeName() == typeid(ESM::CreatureLevList).name())
continue;
/*
End of tes3mp change (major)
*/
if (!ptr.getRefData().isDeleted() && ptr.getRefData().isEnabled())
{
try

Loading…
Cancel
Save