mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 12:56:42 +00:00 
			
		
		
		
	Kept some fixes from the first round of review. Found out that several targets weren't being built with the same basic warnings disabled. Disabled a few warnings for external libraries specifically, rather than applying them to all targets.
		
			
				
	
	
		
			57 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef OPENMW_MWRENDER_WEAPONANIMATION_H
 | |
| #define OPENMW_MWRENDER_WEAPONANIMATION_H
 | |
| 
 | |
| #include <OgreController.h>
 | |
| 
 | |
| #include <components/nifogre/ogrenifloader.hpp>
 | |
| 
 | |
| #include "../mwworld/ptr.hpp"
 | |
| 
 | |
| namespace MWRender
 | |
| {
 | |
| 
 | |
|     class Animation;
 | |
| 
 | |
|     class WeaponAnimationTime : public Ogre::ControllerValue<Ogre::Real>
 | |
|     {
 | |
|     private:
 | |
|         Animation* mAnimation;
 | |
|         std::string mWeaponGroup;
 | |
|         float mStartTime;
 | |
|     public:
 | |
|         WeaponAnimationTime(Animation* animation) : mAnimation(animation), mStartTime(0) {}
 | |
|         void setGroup(const std::string& group);
 | |
|         void updateStartTime();
 | |
| 
 | |
|         virtual Ogre::Real getValue() const;
 | |
|         virtual void setValue(Ogre::Real value)
 | |
|         { }
 | |
|     };
 | |
| 
 | |
|     /// Handles attach & release of projectiles for ranged weapons
 | |
|     class WeaponAnimation
 | |
|     {
 | |
|     public:
 | |
|         WeaponAnimation() : mPitchFactor(0) {}
 | |
|         virtual ~WeaponAnimation() {}
 | |
| 
 | |
|         virtual void attachArrow(MWWorld::Ptr actor);
 | |
|         virtual void releaseArrow(MWWorld::Ptr actor);
 | |
| 
 | |
|     protected:
 | |
|         NifOgre::ObjectScenePtr mAmmunition;
 | |
| 
 | |
|         virtual NifOgre::ObjectScenePtr getWeapon() = 0;
 | |
|         virtual void showWeapon(bool show) = 0;
 | |
|         virtual void configureAddedObject(NifOgre::ObjectScenePtr object, MWWorld::Ptr ptr, int slot) = 0;
 | |
| 
 | |
|         /// A relative factor (0-1) that decides if and how much the skeleton should be pitched
 | |
|         /// to indicate the facing orientation of the character, for ranged weapon aiming.
 | |
|         float mPitchFactor;
 | |
| 
 | |
|         void pitchSkeleton(float xrot, Ogre::SkeletonInstance* skel);
 | |
|     };
 | |
| 
 | |
| }
 | |
| 
 | |
| #endif
 |