1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-26 02:07:26 +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; Vector accum;
int c = 0; int c = 0;
bool isInWaterBubble = false; bool isInWaterBubble = false;
if (waterBubble && isUnderWater()) if (isUnderWater() && waterBubble) // isUnderWater() may set waterBubble
{ {
//debugLog("collision avoidance in bubble"); //debugLog("collision avoidance in bubble");
isInWaterBubble = true; isInWaterBubble = true;