Hot Ice Hotfix: Prevent grenade launcher from getting stuck uselessly in aim mode.

This fix might be dangerous, I do not know it. I have no real idea what this line was supposed to do. But it certainly prevented the release use command from getting to the used item in certain corner cases (right between loading and aiming).
I tested a bunch of vehicle and they work fine so far. So maybe this line was useless and harmful after all.
console-destruction
Clonkonaut 2016-08-20 00:56:50 +02:00
parent 568088aedb
commit 6a80ce8edb
1 changed files with 2 additions and 2 deletions

View File

@ -282,7 +282,7 @@ public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool re
return Control2Menu(ctrl, x,y,strength, repeat, status);
}
var contents = this->GetHandItem(0);
var contents = this->GetHandItem(0);
// usage
var use = (ctrl == CON_Use || ctrl == CON_UseAlt);
@ -320,7 +320,7 @@ public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool re
// object returns true on that callback. Exactly what we want)
if (this.control.current_object == vehicle) return true;
// has been cancelled (it is not the start of the usage but no object is used)
if (!this.control.current_object && (repeat || status == CONS_Up)) return true;
// if (vehicle && !this.control.current_object && (repeat || status == CONS_Up)) return true;
}
}
// releasing the use-key always cancels shelved commands (in that case no this.control.current_object exists)