83 if (afterburner_flame !=
nullptr)
164 Vector3 paxis = Plane(laxis, 0).projectVector(node_buf[
m_node_ref].AbsPosition - node_buf[
m_node_back].AbsPosition);
166 Vector3 taxis = laxis.crossProduct(paxis);
167 Quaternion dir = Quaternion(laxis, paxis, taxis);
174 flamelength = flamelength * (1.0 + (((Real)rand() / (Real)RAND_MAX) - 0.5) / 10.0);
189 emit->setDirection(-laxis);
195 emit->setEnabled(
true);
201 emit->setEnabled(
false);
206 emit->setDirection(Vector3(0, 1, 0));
207 emit->setParticleVelocity(7.0);
208 emit->setEnabled(
true);
209 emit->setColour(ColourValue(0.0, 0.0, 0.0, 0.1));
210 emit->setTimeToLive(0.1 / 0.1);
235 float axlen =
m_axis.length();
243 float warmupfactor = 1.0;
247 if (warmupfactor >= 1.0)
258 torque += ((0.2 +
m_throtle * 0.8) * warmupfactor);
262 float enginethrust = 0;
Central state/object manager and communications hub.
#define ROR_ASSERT(_EXPR)
Manager for all visuals belonging to a single actor.
Core data structures for simulation; Everything affected by by either physics, network or user intera...
#define SOUND_START(_ACTOR_, _TRIG_)
#define SOUND_STOP(_ACTOR_, _TRIG_)
#define SOUND_MODULATE(_ACTOR_, _MOD_, _VALUE_)
ActorSB & GetSimDataBuffer()
NodeSB * GetSimNodeBuffer()
void AdjustParticleSystemTimeFactor(Ogre::ParticleSystem *psys)
Ogre::SceneManager * GetSceneManager()
void updateForces(float dt, int doUpdate)
void setReverse(bool val)
Turbojet(ActorPtr actor, NodeNum_t tnodefront, NodeNum_t tnodeback, NodeNum_t tnoderef, RigDef::Turbojet &def)
TurbojetVisual tjet_visual
void setVisible(bool visible) override
bool m_afterburner_active
float m_rpm_percent
in percent!
float m_exhaust_velocity
in m/s
void setThrottle(float val)
void updateVisuals(RoR::GfxActor *gfx_actor) override
virtual ~Turbojet() override
float m_max_dry_thrust
in kN
float m_afterburn_thrust
in kN
Ogre::SceneNode * m_smoke_scenenode
void SetupVisuals(RigDef::Turbojet &def, int num, std::string const &propname, Ogre::Entity *nozzle, Ogre::Entity *afterburner_flame)
void UpdateVisuals(RoR::GfxActor *gfx_actor)
Ogre::Entity * m_flame_entity
Ogre::Entity * m_nozzle_entity
Ogre::SceneNode * m_flame_scenenode
void SetNodes(NodeNum_t front, NodeNum_t back, NodeNum_t ref)
Ogre::SceneNode * m_nozzle_scenenode
void SetVisible(bool visible)
Ogre::ParticleSystem * m_smoke_particle
static const NodeNum_t NODENUM_INVALID
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
bool simbuf_smoke_enabled
std::vector< AeroEngineSB > simbuf_aeroengines
float simbuf_tj_ab_thrust
bool simbuf_ae_ignition
Turbojet.
float simbuf_tj_exhaust_velo
Turbojet afterburner.
Ogre::Vector3 AbsPosition
Ogre::Vector3 RelPosition
relative to the local physics origin (one origin per actor) (shaky)