Example #1
0
	bool Muzzleflasher::getMuzzleflash(IPointableObject *unit, VisualObject *muzzleflash, const std::string &name, const std::string &helper, VC3 &pos, VC3 &scale, QUAT &rot)
	{
		game::Unit *u = (game::Unit *)unit;

		VisualObject *vo = u->getVisualObject();
		if (vo == NULL || vo->getStormModel() == NULL)
		{
			return false;
		}

		IStorm3D_Model_Object *object = vo->getStormModel()->SearchObject(name.c_str());
		if(object == NULL)
		{
			return false;
		}
		
		pos = object->GetPosition();
		scale = object->GetScale();
		rot = object->GetRotation();
		return true;
	}