MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / IsActive

Method IsActive

Source/Objects/envobject.cpp:1870–1881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1868}
1869
1870bool 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
1883bool PlantComponent::NeedsSetInactive() {
1884 bool val = needs_set_inactive;

Callers 12

UpdateMethod · 0.45
PreDrawCameraMethod · 0.45
DrawBoneConnectUIMethod · 0.45
UpdateMethod · 0.45
PreDrawCameraMethod · 0.45
DisconnectMethod · 0.45
ApplyPaletteMethod · 0.45
ChildLostMethod · 0.45
DrawInstancesMethod · 0.45
UpdateMethod · 0.45

Calls 1

length_squaredFunction · 0.50

Tested by

no test coverage detected