1 #ifndef OPENMW_MWWORLD_PROJECTILEMANAGER_H
2 #define OPENMW_MWWORLD_PROJECTILEMANAGER_H
7 #include <osg/PositionAttitudeTransform>
11 #include "../mwbase/soundmanager.hpp"
38 class EffectAnimationTime;
39 class RenderingManager;
55 const osg::Vec3f& pos,
const osg::Quat& orient,
MWWorld::Ptr bow,
float speed,
float attackStrength);
75 osg::ref_ptr<osg::PositionAttitudeTransform>
mNode;
128 void createModel (
State& state,
const std::string& model,
const osg::Vec3f& pos,
const osg::Quat& orient,
129 bool rotate,
bool createLight, osg::Vec4 lightDiffuseColor, std::string texture =
"");
MWPhysics::PhysicsSystem * mPhysics
Definition: projectilemanager.hpp:70
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:30
void operator=(const ProjectileManager &)
void cleanupProjectile(ProjectileState &state)
Definition: projectilemanager.cpp:536
std::vector< ProjectileState > mProjectiles
Definition: projectilemanager.hpp:119
Definition: renderingmanager.hpp:72
MWWorld::Ptr getCaster()
Definition: projectilemanager.cpp:698
Definition: esmreader.hpp:21
std::string mSpellId
Definition: projectilemanager.hpp:95
std::string mBowId
Definition: projectilemanager.hpp:111
Definition: projectilemanager.hpp:108
ProjectileManager(osg::Group *parent, Resource::ResourceSystem *resourceSystem, MWRender::RenderingManager *rendering, MWPhysics::PhysicsSystem *physics)
Definition: projectilemanager.cpp:150
bool readRecord(ESM::ESMReader &reader, uint32_t type)
Definition: projectilemanager.cpp:604
void update(float dt)
Definition: projectilemanager.cpp:339
Definition: loadinglistener.hpp:8
Definition: physicssystem.hpp:52
float mSpeed
Definition: projectilemanager.hpp:102
MWWorld::Ptr mCasterHandle
Definition: projectilemanager.hpp:82
Definition: esmwriter.hpp:17
void launchMagicBolt(const std::string &spellId, const MWWorld::Ptr &caster, const osg::Vec3f &fallbackDirection)
If caster is an actor, the actor's facing orientation is used. Otherwise fallbackDirection is used...
Definition: projectilemanager.cpp:266
Definition: projectilemanager.hpp:45
int mActorId
Definition: projectilemanager.hpp:78
Definition: projectilemanager.hpp:73
void createModel(State &state, const std::string &model, const osg::Vec3f &pos, const osg::Quat &orient, bool rotate, bool createLight, osg::Vec4 lightDiffuseColor, std::string texture="")
Definition: projectilemanager.cpp:189
Resource::ResourceSystem * mResourceSystem
Definition: projectilemanager.hpp:68
float mCleanupTimer
Definition: projectilemanager.hpp:71
std::string mIdArrow
Definition: projectilemanager.hpp:90
std::vector< MWBase::Sound * > mSounds
Definition: projectilemanager.hpp:104
float mAttackStrength
Definition: projectilemanager.hpp:114
std::vector< MagicBoltState > mMagicBolts
Definition: projectilemanager.hpp:118
std::vector< std::string > mIdMagic
Definition: projectilemanager.hpp:87
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
std::shared_ptr< MWRender::EffectAnimationTime > mEffectAnimationTime
Definition: projectilemanager.hpp:76
void clear()
Removes all current projectiles. Should be called when switching to a new worldspace.
Definition: projectilemanager.cpp:550
MWRender::RenderingManager * mRendering
Definition: projectilemanager.hpp:69
int countSavedGameRecords() const
Definition: projectilemanager.cpp:693
void periodicCleanup(float dt)
Definition: projectilemanager.cpp:346
void cleanupMagicBolt(MagicBoltState &state)
Definition: projectilemanager.cpp:541
osg::Vec3f mVelocity
Definition: projectilemanager.hpp:113
osg::ref_ptr< osg::PositionAttitudeTransform > mNode
Definition: projectilemanager.hpp:75
void moveMagicBolts(float dt)
Definition: projectilemanager.cpp:384
void launchProjectile(MWWorld::Ptr actor, MWWorld::ConstPtr projectile, const osg::Vec3f &pos, const osg::Quat &orient, MWWorld::Ptr bow, float speed, float attackStrength)
Definition: projectilemanager.cpp:320
ESM::EffectList mEffects
Definition: projectilemanager.hpp:100
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
Definition: projectilemanager.hpp:93
std::string mSourceName
Definition: projectilemanager.hpp:98
void moveProjectiles(float dt)
Definition: projectilemanager.cpp:459
void write(ESM::ESMWriter &writer, Loading::Listener &progress) const
Definition: projectilemanager.cpp:564
std::vector< std::string > mSoundIds
Definition: projectilemanager.hpp:105
EffectList, ENAM subrecord.
Definition: effectlist.hpp:33
bool mThrown
Definition: projectilemanager.hpp:115
osg::ref_ptr< osg::Group > mParent
Definition: projectilemanager.hpp:67