1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

fix possible crash when leaving waterbubble while underwater

This commit is contained in:
fgenesis 2023-11-17 01:39:31 +01:00
parent ec5f50e41e
commit 04c7d84b2e

View file

@ -2444,7 +2444,7 @@ bool Entity::doCollisionAvoidance(float dt, int search, float mod, Vector *vp, f
Vector accum;
int c = 0;
bool isInWaterBubble = false;
if (waterBubble && isUnderWater())
if (isUnderWater() && waterBubble) // isUnderWater() may set waterBubble
{
//debugLog("collision avoidance in bubble");
isInWaterBubble = true;