void PhysicalObj::Drown() { ASSERT (m_alive != DROWNED); MSG_DEBUG("physic.state", "%s - Drowned...", GetName().c_str()); m_alive = DROWNED; // Set the air grab to water resist factor. SetAirResistFactor(m_cfg.m_water_resist_factor); // Ensure the gravity factor is upper than 0.0 if (EqualsZero(GetGravityFactor())) SetGravityFactor(0.1); // If fire, do smoke... if (m_is_fire) GetWorld().water.Smoke(GetPosition()); // make a splash in the water :-) else if (GetMass() >= 2 && GetName() != "water_particle") GetWorld().water.Splash(GetPosition()); StopMoving(); StartMoving(); SignalDrowning(); }
void Vessel::FactorVel() { FactorVel(GetGravityFactor()); }