| 1868 | } |
| 1869 | |
| 1870 | bool PlantComponent::IsActive() { |
| 1871 | static const float _angle_threshold = 0.0001f; |
| 1872 | static const float _plant_shake_threshold = 0.0001f; |
| 1873 | bool active = plant_shake > _plant_shake_threshold || |
| 1874 | length_squared(angle) > _angle_threshold; |
| 1875 | if (was_active && !active) { |
| 1876 | needs_set_inactive = true; |
| 1877 | plant_shake = 0.0f; |
| 1878 | } |
| 1879 | was_active = active; |
| 1880 | return active; |
| 1881 | } |
| 1882 | |
| 1883 | bool PlantComponent::NeedsSetInactive() { |
| 1884 | bool val = needs_set_inactive; |
no test coverage detected