View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004825 | Spring engine | Unit Scripting | public | 2015-06-20 06:35 | 2015-06-20 12:43 | ||||
Reporter | Google_Frog | ||||||||
Assigned To | hokomoko | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 98.0.1+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004825: 98.0.1-841 Weapons fire from the wrong gun | ||||||||
Description | There are units which have two guns which fire alternately. These guns are implemented by a single weapon with alternating return value in QueryWeapon. These guns also tend to have animation (mostly recoil or muzzle effects) implemented in their script. The bug is that in the latest engine versions the animation and projectile spawn occur at different barrels. This is not technically an engine bug. But I want to know whether the behaviour change is accidentally/unnecessary before I change several scripts. Also many other game devs would have to do similar work if the change in behaviour is required. The spiderassault script is a simple example which works with the old behaviour: https://github.com/ZeroK-RTS/Zero-K/blob/master/scripts/spiderassault.lua The old behaviour seemed to call FireWeapon before calling QueryWeapon to get the piece which should emit the projectile. For example in the spiderassault script the barrel shoot from is swapped when FireWeapon is called and the recoil is done with the new barrel. Then (I assume) the engine calls QueryWeapon because QueryWeapon would only return the correct flare if FireWeapon was called first. | ||||||||
Steps To Reproduce | Start ZK and spawn spiderassault. Tell the unit to attack ground and watch the muzzle effect and recoil. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Google_Frog (reporter) 2015-06-20 09:04 |
Cob scripts appear to be unaffected. I tested this with corflak from ZK. |
hokomoko (developer) 2015-06-20 12:43 |
Fix 820fefa9765f1d8360895f72c921f0079ab1268e committed to develop branch: Fix 0004825, repo: spring changeset id: 5175 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-06-20 06:35 | Google_Frog | New Issue | |
2015-06-20 09:04 | Google_Frog | Note Added: 0014649 | |
2015-06-20 12:43 | hokomoko | Changeset attached | => spring develop 820fefa9 |
2015-06-20 12:43 | hokomoko | Note Added: 0014651 | |
2015-06-20 12:43 | hokomoko | Assigned To | => hokomoko |
2015-06-20 12:43 | hokomoko | Status | new => resolved |
2015-06-20 12:43 | hokomoko | Resolution | open => fixed |