Avoid summon spawn if actor isn't in a cell (bug #5644)

pull/3019/head
Alexei Dobrohotov 4 years ago
parent 9d350ec824
commit f90e403bc1

@ -55,6 +55,7 @@
Bug #5603: Setting constant effect cast style doesn't correct effects view
Bug #5611: Usable items with "0 Uses" should be used only once
Bug #5622: Can't properly interact with the console when in pause menu
Bug #5644: Summon effects running on the player during game initialization cause crashes
Feature #390: 3rd person look "over the shoulder"
Feature #2386: Distant Statics in the form of Object Paging
Feature #4894: Consider actors as obstacles for pathfinding

@ -1198,6 +1198,11 @@ namespace MWMechanics
}
}
// Summoned creature update visitor assumes the actor belongs to a cell.
// This assumption isn't always valid for the player character.
if (!ptr.isInCell())
return;
bool hasSummonEffect = false;
for (MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it)
{

@ -2182,6 +2182,8 @@ namespace MWWorld
Ptr World::copyObjectToCell(const ConstPtr &object, CellStore* cell, ESM::Position pos, int count, bool adjustPos)
{
if (!cell)
throw std::runtime_error("copyObjectToCell(): cannot copy object to null cell");
if (cell->isExterior())
{
int cellX, cellY;

Loading…
Cancel
Save