forked from Mirrors/openclonk
carry heavy: remove special treatment of CON_Interact
Because it's an interaction. It should use the interaction interface and not some self-made hack. Previously, setting down a carry heavy object would always be executed even if aborted with Space+S.shapetextures
parent
4b398f95eb
commit
22d9a21ff7
|
@ -99,23 +99,6 @@ public func GetExtraInteractions()
|
|||
return functions;
|
||||
}
|
||||
|
||||
public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool repeat, bool release)
|
||||
{
|
||||
if (!this)
|
||||
return false;
|
||||
var handled = _inherited(plr, ctrl, x, y, strength, repeat, release, ...);
|
||||
if(handled) return handled;
|
||||
|
||||
if(ctrl == CON_Interact)
|
||||
{
|
||||
if(IsCarryingHeavy() && GetAction() == "Walk")
|
||||
{
|
||||
DropCarryHeavy();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Carry heavy stuff */
|
||||
|
||||
/** Tells the clonk that he is carrying the given carry heavy object */
|
||||
|
|
Loading…
Reference in New Issue