mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 11:09:41 +00:00
[Client] Disable leveled creatures from their class instead of scene.cpp
This commit is contained in:
parent
aaaed8ab8b
commit
34f0a5e076
2 changed files with 11 additions and 14 deletions
|
@ -120,8 +120,17 @@ namespace MWClass
|
||||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
MWWorld::ManualRef manualRef(store, id);
|
MWWorld::ManualRef manualRef(store, id);
|
||||||
manualRef.getPtr().getCellRef().setPosition(ptr.getCellRef().getPosition());
|
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;
|
customData.mSpawn = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
Include additional headers for multiplayer purposes
|
Include additional headers for multiplayer purposes
|
||||||
*/
|
*/
|
||||||
#include <components/openmw-mp/Log.hpp>
|
|
||||||
#include "../mwmp/Main.hpp"
|
#include "../mwmp/Main.hpp"
|
||||||
#include "../mwmp/LocalPlayer.hpp"
|
#include "../mwmp/LocalPlayer.hpp"
|
||||||
/*
|
/*
|
||||||
|
@ -154,17 +153,6 @@ namespace
|
||||||
ptr.getCellRef().setScale(2);
|
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())
|
if (!ptr.getRefData().isDeleted() && ptr.getRefData().isEnabled())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in a new issue