void hhProjectileSoulCannon::Think( void ) { // run physics RunPhysics(); // Thrust toward enemy if ( thinkFlags & TH_THINK && thrustDir != vec3_origin ) { idVec3 vel = GetPhysics()->GetLinearVelocity(); vel += thrustDir * spawnArgs.GetFloat( "soulThrust", "5.0" ); if ( vel.Length() > maxVelocity ) { // Cap the velocity vel.Normalize(); vel *= maxVelocity; } GetPhysics()->SetLinearVelocity( vel ); GetPhysics()->SetAxis( vel.ToMat3() ); } //HUMANHEAD: aob if (thinkFlags & TH_TICKER) { Ticker(); } //HUMANHEAD Present(); }
LED::LED(const byte pin, const bool inverted) : _pin(pin) ,_inverted(inverted) { if (_pin != -1) { pinMode(_pin, OUTPUT); _ticker = Ticker(); } _lastState = NEVERSET; set(LED_FAST); }
void hhControlHand::ClientPredictionThink( void ) { RunPhysics(); // HUMANHEAD pdm if (thinkFlags & TH_TICKER) { Ticker(); } UpdateAnimation(); UpdateVisuals(); Present(); }
Ticker History::getTicker() { return Ticker(this, 0); };