View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0005056 | Spring engine | Lua | public | 2016-02-05 15:30 | 2017-05-09 16:29 | ||||
Reporter | Google_Frog | ||||||||
Assigned To | Kloot | ||||||||
Priority | none | Severity | feature | Reproducibility | N/A | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 100.0+git | ||||||||
Target Version | Fixed in Version | 103.0 +git | |||||||
Summary | 0005056: Feature: Get weapon blocked state. | ||||||||
Description | The debug collision volume view places little red or yellow spheres on the pieces returned by script.QueryWeapon. If the unit has an attack command then colour of these spheres seems to indicate whether the weapon is able to fire. Whether it is able to fire depends partially on whether something that it avoids is in the way (eg. avoid Friendly). I would like lua to be able to know whether a weapon is blocked from firing because of the presence of something it avoids. A more powerful feature would be to be able to check whether an arbitrary projectile, emit position, target position and unitID would be blocked by something the weapon avoids. The unitID argument is required for allyTeamID and because units do not consider their own collision volume when firing. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Kloot (developer) 2016-02-05 15:45 |
"I would like lua to be able to know whether a weapon is blocked from firing because of the presence of something it avoids" Spring.GetUnitWeaponHaveFreeLineOfFire |
Google_Frog (reporter) 2016-02-05 16:29 |
Nice, I had thought it would be part of the GetUnitWeaponState return table. It looks like all that is left to this request is a version of Spring.GetUnitWeaponHaveFreeLineOfFire which takes firing location as an argument. This would be useful for detecting when a burst weapon will hit a friendly when the emit piece changes during the burst. I would detect these cases and change the barrels which are used for the burst. If causing new line of fire checks is too expensive or messy I can probably find another workaround. |
Kloot (developer) 2016-02-05 16:33 Last edited: 2016-02-05 16:38 |
"a version of Spring.GetUnitWeaponHaveFreeLineOfFire which takes firing location as an argument" That would be easy, but won't be in 101. |
Anonymous (viewer) 2017-05-09 16:27 |
Fix 7ab766502390c115037695a5142c67f8daf57a63 committed to develop branch: fix 0005056 (extend Spring.GetUnitWeaponHaveFreeLineOfFire to take aiming-from coors) old API: Spring.GetUnitWeaponHaveFreeLineOfFire(unitID, weaponNum, targetID | [ tgtPosX [, tgtPosY [, tgtPosZ ]]]]) new API: Spring.GetUnitWeaponHaveFreeLineOfFire(unitID, weaponNum, targetID | [srcPosX [, srcPosY [, srcPosZ [, tgtPosX [, tgtPosY [, tgtPosZ]]]]]]) if the srcPos* arguments are all nil, the default aiming location is used as before., repo: spring changeset id: 8177 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2016-02-05 15:30 | Google_Frog | New Issue | |
2016-02-05 15:45 | Kloot | Note Added: 0015627 | |
2016-02-05 16:29 | Google_Frog | Note Added: 0015629 | |
2016-02-05 16:33 | Kloot | Note Added: 0015630 | |
2016-02-05 16:33 | Kloot | Status | new => resolved |
2016-02-05 16:33 | Kloot | Resolution | open => no change required |
2016-02-05 16:33 | Kloot | Assigned To | => Kloot |
2016-02-05 16:36 | Kloot | Assigned To | Kloot => |
2016-02-05 16:36 | Kloot | Status | resolved => feedback |
2016-02-05 16:36 | Kloot | Resolution | no change required => reopened |
2016-02-05 16:38 | Kloot | Note Edited: 0015630 | View Revisions |
2016-02-05 16:42 | Kloot | Assigned To | => Kloot |
2016-02-05 16:42 | Kloot | Status | feedback => assigned |
2017-05-09 16:27 | Changeset attached | => spring develop 7ab76650 | |
2017-05-09 16:27 | Anonymous | Note Added: 0017578 | |
2017-05-09 16:29 | Kloot | Status | assigned => resolved |
2017-05-09 16:29 | Kloot | Resolution | reopened => fixed |
2017-05-09 16:29 | Kloot | Fixed in Version | => 103.0 +git |