mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +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 <cfloat>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <stdio.h>
|
#include <iomanip>
|
||||||
|
|
||||||
#include <boost/format.hpp>
|
#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
|
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;
|
std::vector<std::string>::iterator it;
|
||||||
it = projectileIDs.begin();
|
it = projectileIDs.begin();
|
||||||
char numstr[8];
|
it = projectileIDs.insert(it, ID.str());
|
||||||
sprintf(numstr, "%d", (int)(effects.mList.size()));
|
|
||||||
std::string ID = "VFX_Multiple";
|
|
||||||
ID = ID + numstr;
|
|
||||||
it = projectileIDs.insert(it, ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fall back to a "caster to target" direction if we have no other means of determining it
|
// 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 "projectilemanager.hpp"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <iomanip>
|
||||||
|
|
||||||
#include <osg/PositionAttitudeTransform>
|
#include <osg/PositionAttitudeTransform>
|
||||||
|
|
||||||
|
@ -99,10 +99,8 @@ namespace MWWorld
|
||||||
if (state.mIdMagic.size() > 1)
|
if (state.mIdMagic.size() > 1)
|
||||||
for (size_t iter = 1; iter != state.mIdMagic.size(); ++iter)
|
for (size_t iter = 1; iter != state.mIdMagic.size(); ++iter)
|
||||||
{
|
{
|
||||||
char numstr[8];
|
std::ostringstream nodeName;
|
||||||
sprintf(numstr, "%d", (int)iter);
|
nodeName << "Dummy" << std::setw(2) << std::setfill('0') << iter;
|
||||||
std::string node = "Dummy0";
|
|
||||||
node = node + numstr;
|
|
||||||
const ESM::Weapon* weapon = MWBase::Environment::get().getWorld()->getStore().get<ESM::Weapon>().find (state.mIdMagic.at(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);
|
mResourceSystem->getSceneManager()->getInstance("meshes\\" + weapon->mModel, attachTo);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue