View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000445 | FSSCP | gameplay | public | 2005-06-04 15:05 | 2005-06-22 20:04 |
| Reporter | SuperCoolAl | Assigned To | taylor | ||
| Priority | normal | Severity | minor | Reproducibility | random |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000445: Hidden objects are targetable when hit by EMP or friendly AI targets it | ||||
| Description | If, while playing, you are hit by an EMP missile it is possible to have a hidden object targeted after all the targetting is scrambled up. Apparently it is also possible if a friendly AI manages to target a hidden object. | ||||
| Additional Information | Apparently this has been occuring since retail. http://dynamic.gamespy.com/~freespace/forums/showthread.php?s=&postid=681942#post681926 | ||||
| Tags | No tags attached. | ||||
|
|
Scroll down a bit on that link after you click it (the chopped off bit doesn't make a difference). |
|
|
You do not have permission to access this page. This could be due to one of several reasons: 1. You do not have permission to access the page that you were trying to. Are you trying to edit someone else's post or trying to access administrative features? Check that you are allowed to perform this action in the Forum Rules. 2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation. |
|
|
Also, I may have commited a fix to CVS for the emp problem, at least. |
|
|
The thread is in the Inferno private forum, but it doesn't say anything that isn't said here. WMC, I looked over your ship_get_random_targetable_ship and it seemed rather inelegant. Might it be better to build a list of all targetable ships and *then* pick a random one? This would avoid "rolling the dice" possibly several times in a row. You wouldn't have to make a linked list or anything fancy; just create an integer array of MAX_SHIPS size. Then copy all the indexes of the targetable ships into the array, and pick a random index from the ships available. |
|
|
Yea sorry bout that WMC I just can't figure out how to edit the original bug report :) |
|
|
Ok, bit cleaner code in now. Even Goober deserves to be happy. :P So the other problem is that if a friendly AI targets a hidden object then you can target it as well? That's what I get from reading what you wrote so please correct me if I'm wrong. If the friendly ship get's hit by EMP and that's why it's happening then I think this should fix both cases. |
|
|
Thanks, taylor. :) As I understand it, the only thing "hidden-from-sensors" does is affect the player ship's sensors. AI ships do not suffer from this handicap (they aren't as smart as us, apparently). So Volition simply added hooks throughout the code wherever the player's target is changed. The problem occurs when you add a new targeting key or method and forget to add the hook. This is one instance. I'm not sure which other instances there are; the "J" key is a problem in FS1 but I think it was fixed in FS2. |
|
|
I meant you can target a hidden object when you target your target's attacker. Example is targetting the Chimeras in Inferno R1 M15. |
|
|
Ok, I know I've been awake a while but this code looks so backwards to me right now I must be imagining things. Assuming the "pre" tag works here (EDIT: nope, it doesn't)... Should this, in hud_target_closest(): // bail if player does not have target if ( Player_ai->target_objnum == -1) { if ( Objects[attacked_objnum].type != OBJ_SHIP ) { goto Target_closest_done; } // bail if ship is to be ignored if (!(Ships[Objects[attacked_objnum].instance].flags & TARGET_SHIP_IGNORE_FLAGS)) { goto Target_closest_done; } } be this: // bail if player does not have target if ( Player_ai->target_objnum == -1) { goto Target_closest_done; } if ( Objects[attacked_objnum].type != OBJ_SHIP ) { goto Target_closest_done; } // bail if ship is to be ignored if (Ships[Objects[attacked_objnum].instance].flags & TARGET_SHIP_IGNORE_FLAGS) { goto Target_closest_done; } The modified version appears to work, the original version never appeared to happen (in a right world). I'm not going to commit that until I've looked at it again with more sleep but a second opinion would help. Also found another targetting issue when target-subsys-in-reticle gets pressed. It never even checked for hidden ships before giving you the target. edited on: 06-20-05 04:48 |
|
|
Umm, might as well mark this as fixed I guess. It looks to be working just as required and no side effects have been noticed. I'll reopen/fix if it turns out to cause issues in my newest build. Fixered. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-06-04 15:05 | SuperCoolAl | New Issue | |
| 2005-06-04 15:08 | SuperCoolAl | Note Added: 0002590 | |
| 2005-06-07 04:45 | WMCoolmon | Note Added: 0002604 | |
| 2005-06-07 05:04 | WMCoolmon | Note Added: 0002605 | |
| 2005-06-07 06:53 | Goober5000 | Note Added: 0002608 | |
| 2005-06-07 18:01 | SuperCoolAl | Note Added: 0002609 | |
| 2005-06-20 03:12 | taylor | Note Added: 0002654 | |
| 2005-06-20 03:12 | taylor | Status | new => assigned |
| 2005-06-20 03:12 | taylor | Assigned To | => taylor |
| 2005-06-20 06:35 | Goober5000 | Note Added: 0002656 | |
| 2005-06-20 07:53 | SuperCoolAl | Note Added: 0002657 | |
| 2005-06-20 08:45 | taylor | Note Added: 0002658 | |
| 2005-06-20 08:48 | taylor | Note Edited: 0002658 | |
| 2005-06-22 20:04 | taylor | Status | assigned => resolved |
| 2005-06-22 20:04 | taylor | Resolution | open => fixed |
| 2005-06-22 20:04 | taylor | Note Added: 0002676 |