Anonymous Login
2017-11-20 21:47 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001590OpenClonkObjectspublic2017-06-20 15:20
ReporterMaikel 
Assigned ToClonkonaut 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version7.0 
Target Version7.1 (Bugfix update)Fixed in Version 
Summary0001590: Can't finish shooting when riding
DescriptionCurrently the only object you can ride is the balloon. Use the balloon and take the bow and try to shoot an arrow. This will fail because its use is cancelled when the mouse button is released. The control libraries do not handle this correctly as it should be a stop call to the the object ridden and then a stop call to the object used by the rider.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0004874

Maikel (developer)

A hotfix could be this:


@@ -871,7 +871,7 @@ func ControlUse2Script(int ctrl, int x, int y, int strength, bool repeat, bool r
         {
             return StartUseControl(ctrl,x, y, obj);
         }
- else if (release && obj == this.control.current_object)
+ else if (release && (obj == this.control.current_object || obj == GetActionTarget()))
         {
             return StopUseControl(x, y, obj);
         }
@@ -883,7 +883,7 @@ func ControlUse2Script(int ctrl, int x, int y, int strength, bool repeat, bool r
         {
             return StartUseDelayedControl(ctrl, obj);
         }
- else if (release && obj == this.control.current_object)
+ else if (release && (obj == this.control.current_object || obj == GetActionTarget()))
         {
             return StopUseDelayedControl(obj);
         }

~0005056

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/b7a8b3067f34c54edeb3c2e0527fab7aeacf6da5

Changeset b7a8b30 by Maikel de Vries <mdt.maikel@gmail.com>
correctly stop use control when clonk is attached (0001590)

~0005057

Maikel (developer)

I added this hotfix, a real solution is still needed of course.

~0005078

Clonkonaut (developer)

I wanted to fix riding & shooting anyway for ridable lorries.

What would be your preferred behaviour with the balloon? Can you shoot from it yay/nay?

~0005081

Maikel (developer)

Yes, you should be able to shoot from it. Combinations are cool.

~0005082

Clonkonaut (developer)

Well, I don't see the real problem with your hotfix. Current behaviour is as intended (I'd guess):
You get Start/Stop calls for the ridden object. If not handled, the currently selected item is called instead.

~0005083

Maikel (developer)

I fixed the problem, yes, but I did not test extensively and I did not understand fully why this fixes the problem.

If you say this is a complete fix we can close the report I guess.

~0005086

Clonkonaut (developer)

I gave this some thought and came to the conclusion to close it.
It may not be the best solution but not the worst either. I don't feel like adding another variable to the controls library to keep track of the vehicle (in addition to the selected item).

There is only one bad thing though. If a vehicle return true in ControlUseStop the item doesn't receive a stop callback. While I think this is wrong usage of the interface, we might want to do something about. I just don't know what yet.
+Notes

-Issue History
Date Modified Username Field Change
2016-01-11 19:42 Maikel New Issue
2016-01-24 19:53 Maikel Note Added: 0004874
2016-01-24 19:53 Maikel Assigned To => Zapper
2016-01-24 19:53 Maikel Status new => assigned
2016-01-29 17:27 Zapper Status assigned => new
2016-01-29 17:30 Zapper Assigned To Zapper =>
2016-04-17 15:13 occ Note Added: 0005056
2016-04-17 15:16 Maikel Note Added: 0005057
2016-04-25 10:34 Clonkonaut Note Added: 0005078
2016-04-25 10:34 Clonkonaut Assigned To => Clonkonaut
2016-04-25 10:34 Clonkonaut Status new => confirmed
2016-04-25 10:35 Clonkonaut Status confirmed => assigned
2016-04-25 15:54 Maikel Note Added: 0005081
2016-04-26 21:27 Clonkonaut Note Added: 0005082
2016-04-26 21:27 Clonkonaut Status assigned => feedback
2016-04-26 21:39 Maikel Note Added: 0005083
2016-04-26 21:39 Maikel Status feedback => assigned
2016-05-01 11:47 Clonkonaut Note Added: 0005086
2016-05-01 11:47 Clonkonaut Status assigned => resolved
2016-05-01 11:47 Clonkonaut Resolution open => fixed
+Issue History