| 147 | } |
| 148 | |
| 149 | void Tr2GpuSharedEmitter::SpawnParticles( const UpdateArguments& arguments, const Vector3* position, const Vector3* velocity, float rateModifier ) |
| 150 | { |
| 151 | if( !arguments.system || !m_enabled ) |
| 152 | { |
| 153 | return; |
| 154 | } |
| 155 | Vector3 pos( XMVector3TransformCoord( position ? *position : m_position, arguments.parentTransform ) ); |
| 156 | Vector3 vel = Vector3( 0.f, 0.f, 0.f ); |
| 157 | if( velocity ) |
| 158 | { |
| 159 | vel = XMVector3TransformNormal( *velocity, arguments.parentTransform ); |
| 160 | } |
| 161 | auto emitter = m_emitter; |
| 162 | SpawnParticles( emitter, arguments, pos, pos, vel, vel, 0.f, rateModifier ); |
| 163 | } |
| 164 | |
| 165 | void Tr2GpuSharedEmitter::SpawnParticles( |
| 166 | const UpdateArguments& arguments, |