forked from Mirrors/openclonk
prevent floor switch from making object stuck while moving
parent
a023b63fda
commit
a2d7374302
|
@ -44,6 +44,10 @@ public func CheckObjects()
|
|||
for (var obj in obj_on_switch)
|
||||
obj->SetPosition(obj->GetX(), obj->GetY() + change);
|
||||
SetPosition(GetX(), GetY() + change);
|
||||
// Do not make objects stuck.
|
||||
for (var obj in obj_on_switch)
|
||||
if (obj->Stuck())
|
||||
obj->SetPosition(obj->GetX(), obj->GetY() - change);
|
||||
y_position += change;
|
||||
// Do moving of target door or perform user actions.
|
||||
if (y_position == desired_y)
|
||||
|
|
Loading…
Reference in New Issue