forked from Mirrors/openclonk
UseControl: Merge the two if-blocks that share the same condition
parent
0fd9d1f40b
commit
92e53fe09f
|
@ -440,9 +440,9 @@ func FxItemRemovalCheckStop(object target, proplist effect, int reason, bool tem
|
|||
// Control use redirected to script
|
||||
func ControlUse2Script(int ctrl, int x, int y, int strength, bool repeat, int status, object obj)
|
||||
{
|
||||
// standard use
|
||||
if (ctrl == CON_Use || ctrl == CON_UseAlt)
|
||||
{
|
||||
// standard use
|
||||
if (status == CONS_Down && !repeat)
|
||||
{
|
||||
return StartUseControl(ctrl, x, y, obj);
|
||||
|
@ -451,11 +451,8 @@ func ControlUse2Script(int ctrl, int x, int y, int strength, bool repeat, int st
|
|||
{
|
||||
return StopUseControl(x, y, obj);
|
||||
}
|
||||
}
|
||||
|
||||
// more use (holding)
|
||||
if (ctrl == CON_Use || ctrl == CON_UseAlt)
|
||||
{
|
||||
|
||||
// more use (holding)
|
||||
if (status == CONS_Up)
|
||||
{
|
||||
// leftover use release
|
||||
|
|
Loading…
Reference in New Issue