mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 21:09:45 +00:00
Merge branch 'at' into 'master'
Use operator[] instead of at() when the idx is checked See merge request OpenMW/openmw!916
This commit is contained in:
commit
047d993cf4
2 changed files with 2 additions and 2 deletions
|
@ -220,7 +220,7 @@ namespace MWRender
|
||||||
calculator.reset();
|
calculator.reset();
|
||||||
for (size_t i=0; i<cell->mContextList.size(); ++i)
|
for (size_t i=0; i<cell->mContextList.size(); ++i)
|
||||||
{
|
{
|
||||||
unsigned int index = cell->mContextList.at(i).index;
|
unsigned int index = cell->mContextList[i].index;
|
||||||
if (esm.size() <= index)
|
if (esm.size() <= index)
|
||||||
esm.resize(index+1);
|
esm.resize(index+1);
|
||||||
cell->restore(esm[index], i);
|
cell->restore(esm[index], i);
|
||||||
|
|
|
@ -319,7 +319,7 @@ namespace MWWorld
|
||||||
|
|
||||||
// in case there are multiple effects, the model is a dummy without geometry. Use the second effect for physics shape
|
// in case there are multiple effects, the model is a dummy without geometry. Use the second effect for physics shape
|
||||||
if (state.mIdMagic.size() > 1)
|
if (state.mIdMagic.size() > 1)
|
||||||
model = "meshes\\" + MWBase::Environment::get().getWorld()->getStore().get<ESM::Weapon>().find(state.mIdMagic.at(1))->mModel;
|
model = "meshes\\" + MWBase::Environment::get().getWorld()->getStore().get<ESM::Weapon>().find(state.mIdMagic[1])->mModel;
|
||||||
state.mProjectileId = mPhysics->addProjectile(caster, pos, model, true, false);
|
state.mProjectileId = mPhysics->addProjectile(caster, pos, model, true, false);
|
||||||
state.mToDelete = false;
|
state.mToDelete = false;
|
||||||
mMagicBolts.push_back(state);
|
mMagicBolts.push_back(state);
|
||||||
|
|
Loading…
Reference in a new issue