View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002730 | Spring engine | General | public | 2011-11-12 17:19 | 2011-11-12 18:36 | ||||
Reporter | Google_Frog | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | block | Reproducibility | have not tried | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | 84.0 | |||||||
Summary | 0002730: All weapons mostly ignore "aimReady" | ||||||||
Description | The visible effect is this. Once a unit has fired it is able to fire regardless of which way it's gun is pointing. Before it fires the normal restriction of only firing when it has finished aiming applies. Given what tvo said in 2728 here is what it looks like happens: * Units spawn with aimReady = false. * The unit script does Spring.SetUnitWeaponState(unitID, num, "aimReady", true) to let the weapon fire when it has finished aiming. * Calling Spring.SetUnitWeaponState(unitID, num, "aimReady", false) appears to have no effect at all. That probably isn't what is going on in the engine but to an outside observer (testing with lua) it looks if aimReady=true it cannot be set to false. | ||||||||
Additional Information | Engine 83.0.1-96-gd8e23a8 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
Notes | |
Google_Frog (reporter) 2011-11-12 17:21 |
Oops it's always reproducible I just forgot that menu. Also +83.0 should be added as an engine option. |
Kloot (developer) 2011-11-12 17:24 Last edited: 2011-11-12 18:00 |
from unit_script.lua: local function AimWeaponThread(weaponNum, heading, pitch) if AimWeapon(weaponNum, heading, pitch) then -- SetUnitWeaponState counts weapons from 0 return sp_SetUnitWeaponState(unitID, weaponNum - 1, "aimReady", 1) end end so, change "if AimWeapon(...) ... then ... end" to return sp_SetUnitWeaponState(unitID, weaponNum - 1, "aimReady", AimWeapon(weaponNum, heading, pitch)) edit1: did this in the engine-supplied unit_script.lua now, so you do not have to override it. edit2: just saw it also affects COB if AimWeapon spawns a thread |
Kloot (developer) 2011-11-12 18:35 Last edited: 2011-11-12 18:36 |
fixed, but see the code comment how this relates to 0002685 |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-11-12 17:19 | Google_Frog | New Issue | |
2011-11-12 17:21 | Google_Frog | Note Added: 0007587 | |
2011-11-12 17:24 | Kloot | Note Added: 0007588 | |
2011-11-12 17:25 | Kloot | Note Edited: 0007588 | |
2011-11-12 17:26 | Kloot | Status | new => feedback |
2011-11-12 17:36 | Kloot | Note Edited: 0007588 | |
2011-11-12 18:00 | Kloot | Note Edited: 0007588 | |
2011-11-12 18:35 | Kloot | Note Added: 0007589 | |
2011-11-12 18:36 | Kloot | Note Edited: 0007589 | |
2011-11-12 18:36 | Kloot | Note Edited: 0007589 | |
2011-11-12 18:36 | Kloot | Status | feedback => resolved |
2011-11-12 18:36 | Kloot | Fixed in Version | => 84.0 |
2011-11-12 18:36 | Kloot | Resolution | open => fixed |
2011-11-12 18:36 | Kloot | Assigned To | => Kloot |