clonks do not attempt to scale underwater (#1176)

stable-6.1
Maikel de Vries 2015-03-26 19:52:11 +01:00
parent 0843c29f42
commit 6d9cb0c411
1 changed files with 3 additions and 3 deletions

View File

@ -3089,7 +3089,7 @@ void C4Object::ContactAction()
break; break;
case DFA_SWIM: case DFA_SWIM:
// Try corner scale out // Try corner scale out
if (!GBackLiquid(GetX(),GetY()-1+Def->Float*Con/FullCon-1)) if (!GBackSemiSolid(GetX(),GetY()-1+Def->Float*Con/FullCon-1))
if (ObjectActionCornerScale(this)) return; if (ObjectActionCornerScale(this)) return;
break; break;
} }
@ -3159,7 +3159,7 @@ void C4Object::ContactAction()
return; return;
case DFA_SWIM: case DFA_SWIM:
// Only scale if swimming at the surface // Only scale if swimming at the surface
if (!GBackLiquid(GetX(),GetY()-1+Def->Float*Con/FullCon-1)) if (!GBackSemiSolid(GetX(),GetY()-1+Def->Float*Con/FullCon-1))
{ {
// Try scale, only if swimming at the surface. // Try scale, only if swimming at the surface.
if (ComDirLike(Action.ComDir, COMD_Left)) if (ComDirLike(Action.ComDir, COMD_Left))
@ -3213,7 +3213,7 @@ void C4Object::ContactAction()
return; return;
case DFA_SWIM: case DFA_SWIM:
// Only scale if swimming at the surface // Only scale if swimming at the surface
if (!GBackLiquid(GetX(),GetY()-1+Def->Float*Con/FullCon-1)) if (!GBackSemiSolid(GetX(),GetY()-1+Def->Float*Con/FullCon-1))
{ {
// Try scale // Try scale
if (ComDirLike(Action.ComDir, COMD_Right)) if (ComDirLike(Action.ComDir, COMD_Right))