View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0004883 | Spring engine | General | public | 2015-07-04 16:55 | 2015-07-07 14:03 | ||||||||
Reporter | Google_Frog | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | new | Resolution | reopened | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0004883: 99..0.1-62 Offset Beam Friendly Fire | ||||||||||||
Description | Instant hit weapons with offset weapons can cause friendly fire. Weapons are supposed to do a check from their QueryWeapon piece just before firing because AimFromWeapon and QueryWeapon do not have to be the same piece. In the replay both Freaker and Felon friendly fire. Warrior has an offset ballistic weapon and does not friendly fire. | ||||||||||||
Additional Information | Replay with ZK v1.3.7.1 | ||||||||||||
Tags | No tags attached. | ||||||||||||
Checked infolog.txt for Errors | |||||||||||||
Attached Files |
|
![]() |
||||||
|
![]() |
|
cleanrock (reporter) 2015-07-05 09:03 |
I tested replacing aimFromPos with weaponMuzzlePos in CWeapon::HaveFreeLineOfFire and it seemed to fix this issue. |
cleanrock (reporter) 2015-07-05 09:32 |
Fix 2cf6bf1de749bdddc17a893bce0545dbaaad913b committed to develop branch: fix 0004883, repo: spring changeset id: 5307 |
hokomoko (developer) 2015-07-05 11:36 |
The fix solves one issue but introduces another: When trying to acquire a target, the muzzle point can be anywhere and not necessarily where it has line of fire to the target. The aiming animation may bring it to have line of fire eventually. Even if the line of fire check switches to the muzzlepos before firing, you'd still get the alternating target behaviour from https://springrts.com/mantis/view.php?id=4865 I think the only sensible approach is to ask the script for the eventual muzzle position - maybe in the form of a fake aiming function. In the meanwhile I think it will be best to keep line of fire check to aimFrom, at least until the bugfix release. |
cleanrock (reporter) 2015-07-05 11:49 |
hokomoko, Can you give an example/setup of how i see the bug i introduced ? |
hokomoko (developer) 2015-07-05 12:06 |
I've added a picture where a unit doesn't aim since its muzzle doesn't have line of fire to the target, while it actually would after aiming. |
hokomoko (developer) 2015-07-05 12:13 |
And another with an annihilator in ZK: Told it to fire at a point it can reach but it didn't aim at first, since line of fire from muzzlepos was blocked by terraform. I then caused it to turn by aiming somewhere else, and ordered it to fire on the same target, this time there was line of fire from muzzlepos and it aimed and fired there. |
cleanrock (reporter) 2015-07-05 12:50 |
Fix 3bfb97435145d42d2531304e422a3e92268bede3 committed to develop branch: Revert "fix 0004883" This reverts commit 2cf6bf1de749bdddc17a893bce0545dbaaad913b., repo: spring changeset id: 5308 |
sprung (reporter) 2015-07-07 12:32 |
Would it be reasonable to just use the AimFrom piece when deciding whether to start aiming (fixing the Annihilator and IS-2 cases), and QueryWeapon piece when deciding whether to shoot (fixing Felon friendly fire)? |
hokomoko (developer) 2015-07-07 12:35 Last edited: 2015-07-07 12:36 |
5 comments above you: Even if the line of fire check switches to the muzzlepos before firing, you'd still get the alternating target behaviour from 0004865 |
Google_Frog (reporter) 2015-07-07 14:03 |
You would not get alternating target behaviour if the line of fire check from the muzzle position was only used as a shot blocking check. I think both the other bugs (not firing and the alternating target behaviour) are better than friendly fire. I do not see how this: "I think the only sensible approach is to ask the script for the eventual muzzle position - maybe in the form of a fake aiming function." will fix the problem for Felon. I tried changing the AimFrom piece to the muzzle but friendly fire still occurred. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-07-04 16:55 | Google_Frog | New Issue | |
2015-07-04 16:55 | Google_Frog | File Added: 20150705_004542_ScorpioBattleground_99.0.1-62-g2ce9818 develop.sdf | |
2015-07-05 09:03 | cleanrock | Note Added: 0014886 | |
2015-07-05 09:32 | cleanrock | Changeset attached | => spring develop 2cf6bf1d |
2015-07-05 09:32 | cleanrock | Note Added: 0014887 | |
2015-07-05 09:32 | cleanrock | Assigned To | => cleanrock |
2015-07-05 09:32 | cleanrock | Status | new => resolved |
2015-07-05 09:32 | cleanrock | Resolution | open => fixed |
2015-07-05 11:36 | hokomoko | Note Added: 0014889 | |
2015-07-05 11:36 | hokomoko | Status | resolved => feedback |
2015-07-05 11:36 | hokomoko | Resolution | fixed => reopened |
2015-07-05 11:49 | cleanrock | Note Added: 0014890 | |
2015-07-05 12:02 | hokomoko | File Added: is2doesntaim.png | |
2015-07-05 12:06 | hokomoko | Note Added: 0014891 | |
2015-07-05 12:11 | hokomoko | File Added: annidoesaim.png | |
2015-07-05 12:11 | hokomoko | File Added: annidoesntaim.png | |
2015-07-05 12:13 | hokomoko | Note Added: 0014892 | |
2015-07-05 12:50 | cleanrock | Changeset attached | => spring develop 3bfb9743 |
2015-07-05 12:50 | cleanrock | Note Added: 0014895 | |
2015-07-05 12:50 | cleanrock | Status | feedback => resolved |
2015-07-05 12:50 | hokomoko | Assigned To | cleanrock => |
2015-07-05 12:50 | hokomoko | Status | resolved => feedback |
2015-07-05 12:51 | hokomoko | Status | feedback => new |
2015-07-05 15:14 | hokomoko | Relationship added | related to 0004865 |
2015-07-07 12:32 | sprung | Note Added: 0014924 | |
2015-07-07 12:35 | hokomoko | Note Added: 0014925 | |
2015-07-07 12:36 | hokomoko | Note Edited: 0014925 | View Revisions |
2015-07-07 14:03 | Google_Frog | Note Added: 0014930 |