mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 21:53:52 +00:00
Use C++ int-to-string conversion
This commit is contained in:
parent
60384399ee
commit
5a0d3feb98
2 changed files with 7 additions and 11 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <cfloat>
|
||||
#include <limits>
|
||||
#include <stdio.h>
|
||||
#include <iomanip>
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
|
@ -339,13 +339,11 @@ namespace MWMechanics
|
|||
|
||||
if (projectileEffects.mList.size() > 1) // add a VFX_Multiple projectile if there are multiple projectile effects
|
||||
{
|
||||
std::ostringstream ID;
|
||||
ID << "VFX_Multiple" << projectileEffects.mList.size();
|
||||
std::vector<std::string>::iterator it;
|
||||
it = projectileIDs.begin();
|
||||
char numstr[8];
|
||||
sprintf(numstr, "%d", (int)(effects.mList.size()));
|
||||
std::string ID = "VFX_Multiple";
|
||||
ID = ID + numstr;
|
||||
it = projectileIDs.insert(it, ID);
|
||||
it = projectileIDs.insert(it, ID.str());
|
||||
}
|
||||
|
||||
// Fall back to a "caster to target" direction if we have no other means of determining it
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "projectilemanager.hpp"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iomanip>
|
||||
|
||||
#include <osg/PositionAttitudeTransform>
|
||||
|
||||
|
@ -99,10 +99,8 @@ namespace MWWorld
|
|||
if (state.mIdMagic.size() > 1)
|
||||
for (size_t iter = 1; iter != state.mIdMagic.size(); ++iter)
|
||||
{
|
||||
char numstr[8];
|
||||
sprintf(numstr, "%d", (int)iter);
|
||||
std::string node = "Dummy0";
|
||||
node = node + numstr;
|
||||
std::ostringstream nodeName;
|
||||
nodeName << "Dummy" << std::setw(2) << std::setfill('0') << iter;
|
||||
const ESM::Weapon* weapon = MWBase::Environment::get().getWorld()->getStore().get<ESM::Weapon>().find (state.mIdMagic.at(iter));
|
||||
mResourceSystem->getSceneManager()->getInstance("meshes\\" + weapon->mModel, attachTo);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue