MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / SpawnWetnessDrip

Function SpawnWetnessDrip

TombEngine/Game/effects/drip.cpp:81–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void SpawnWetnessDrip(const Vector3& pos, int roomNumber)
82 {
83 constexpr auto LIFE_MAX = 1.0f;
84 constexpr auto SPAWN_RADIUS = BLOCK(1 / 32.0f);
85
86 auto gravity = g_GameFlow->GetSettings()->Physics.Gravity;
87 auto sphere = BoundingSphere(pos, SPAWN_RADIUS);
88 auto dripPos = Random::GeneratePointInSphere(sphere);
89 SpawnDrip(dripPos, roomNumber, Vector3::Zero, LIFE_MAX, Random::GenerateFloat(gravity / 2, gravity));
90 }
91
92 void UpdateDrips()
93 {

Callers 1

HandlePlayerWetnessDripsFunction · 0.85

Calls 4

GeneratePointInSphereFunction · 0.85
SpawnDripFunction · 0.85
GenerateFloatFunction · 0.85
GetSettingsMethod · 0.80

Tested by

no test coverage detected