View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000525 | FSSCP | docking | public | 2005-08-28 07:19 | 2006-01-12 23:11 |
| Reporter | StratComm | Assigned To | taylor | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000525: Enif Station suddenly relocates shortly after the start of "The Sixth Wonder" - initial docking problem | ||||
| Description | When playing mission SM1-08 (The Sixth Wonder), Enif Station suddenly swings around, destroying the Calypso and anything else in its vacenity. On closer inspection, the station is supposed to be initially docked with an Elysium transport, Mannheim. Here I draw your attention to the attached files. File 1: enif-mannheim1.jpg I'm closer than I'd like to be, but here you can see the Mannheim flying along free, while the docking status clearly states that it is docked with Enif station. Suspect problem one: Mannheim is supposed to start connected with Enif. It's in the right place and has the right orientation to have started where it was placed in FRED, but it seems to have a life of its own. Please note the time is 33 seconds in. File 2: enif-mannheim2.jpg Timestamp now 40 seconds. My speed is at 0, and I've shifted my perspective only slightly. Note that Enif station is now in a completely different orientation, and that Mannheim, which was right in front of me only seven seconds before, is now 1.5 clicks away. What you can't see is that the solid end of Enif Station, which ended up to my left, smacked the Calypso with some rediculous speed and destroyed it (along with all of the fighters attacking it) on contact. File 3: enif-mannheim3.jpg As I suspected, after that wierd warp, the Mannheim is now actually docked with Enif station. It took me 15 seconds just to get close enough to visually confirm it. All three shots clearly indicate that the Mannheim is docked with Enif, but only here can I actually visually confirm that. I also saw this happen in the late-game mission (the name escapes me) where you defend 3rd fleet headquarters, this time with an argo and arcadia. It was far enough away from everything there though that it wasn't an issue. So either there is something stupid about the arcadia model, or AI is seriously screwed up. | ||||
| Tags | No tags attached. | ||||
|
2005-08-28 07:19
|
|
|
2005-08-28 07:20
|
|
|
2005-08-28 07:20
|
|
|
|
I always manage to leave something important out. This started happening after 7-22-05, Goober's build from that date being the newest build that doesn't cause this, (I don't have 7-28-05 here to check) but is present in everything I've tried from august. I suspect this has to do with the AI rollback that was done around that time, but I can't confirm that. edited on: 08-28-05 03:23 |
|
|
I'm assigning this to Goober, since he ought to know the docking code best. |
|
|
Ugh... crap. Okay, I really don't have that much time to spend on this so I'd appreciate as much help as possible. Could you try a bunch of builds from http://fs2source.warpcore.org/exes/latest/ and see if you can pinpoint exactly when this bug appeared? Also try to verify that the bug did not appear in earlier builds. |
|
|
The bug comes from aicode.cpp, in the if statement at line 11096, inside the ai_dock function. The aip->active_goal seems to be set at -1, forcing the execution of the ai_cleanup_dock_mode function. Quick fix: Change line 11096 from if ((aip->active_goal < 0) || (aip->goal_objnum == -1) || (Objects[aip->goal_objnum].signature != aip->goal_signature)) to if ((aip->goal_objnum == -1) || (Objects[aip->goal_objnum].signature != aip->goal_signature)) Goober, you may want to check that this change does not mess up anything in the docking code. FYI, the newest CVS image that does not have this bug is dated around 21 or 22 July 2005. Edit: Clarify location of the offending line a little bit more. edited on: 08-28-05 09:38 |
|
|
@#$^*&. That line is there based on a careful examination of the code to fix a few other bugs while still keeping in line with what the dock code is supposed to do. This means the bug is going to take at least an evening or two of concentrated debugging and I don't have the time right now. :( |
|
|
A little more information on what exactly happens during the first moments of "The Sixth Wonder", after running it using a debugger: 1) Mission begins. The Mannheim starts docked with Enif station. The program arrives at aicode.cpp, line 11096 and performs the check described in the if statement. 2) The value of aip->active_goal at the time (Missiontime equals 16384) is -1. Regarding the other key values of the aip structure, aip->mode has a value of 8 (AIM_DOCK) - fine - and aip->submode is 27 (AIS_DOCK_4A) - perfect. However, since aip->active_goal is -1, the call to ai_cleanup_dock_mode_subjective is executed. Program flow goes to line 10918 in aicode.cpp. 3) Because the submode is 27, the if statement becomes true and the two statements within it are executed. In doing so, the ai submode takes the value of 33 (AIS_UNDOCK_3). Now the Mannheim is actually trying to undock from Enif station, when in fact it should maintain its docked position until the event to undock is invoked. The ai submode remains at AIS_UNDOCK_3 from this point on. I am not entirely sure why exactly this results in Enif spinning like it does, but definitely the docking behavior of the Mannheim (and more specifically the change in its ai submode) is where it all starts, since if I comment out line 11098 of aicode.cpp (the call to ai_cleanup_dock_mode_subjective), all goes fine in the mission with no problem. Goober is right. It is a quite "deeper" issue than it originally looked. |
|
|
Could it be moving when the Mannheim has completed its undock behavior and the game can't resolve the conflict between the transport's position and the fact that it's still "docked" to the installation? (though that doesn't explain WHERE it ends up). And I would have used the "docking" (or even AI) category had I seen one when I submitted this bug :p EDIT: on closer inspection, this seems to be a common problem for ALL missions in which initial docking has been used and when neither ship has any orders to start out with (what they are assigned later is irrelivant). edited on: 08-30-05 16:41 |
|
|
Well, Alpha0, that was immensely helpful. :) Do you think you might want to join the SCP? ;) I now think I understand this bug. I'll have to make it uglier than I wanted, but it looks like taylor's commit of 2005/06/01 is what I'm shooting for. StratComm: I only added the "dock" category after you submitted the bug. ;) |
|
|
Fixed. Check the next CVS build and see if it works. |
|
|
Looks good. Initial docking seems to be working ok. If I don't post anything else about this in the next 24 hours (as I'll do a more thurough test of docking behavior after class), I'd say this one's ready to be closed. edited on: 08-31-05 09:03 |
|
|
Yep, looks ok here as well. The fix works. |
|
|
Great. :) |
|
|
Erinnerung gesendet an Goober5000 I could not write a comment, so I hope it's okay to send a reminder... I hate to say it, but the bug still exists here... The Mannheim KEEPS docked with the Enif-Station. I even tried to edit the mission... No luck.. It just won't undock... Build: Every CVS-Build in the past two months or so... |
|
|
Okay... can you look through the Recent Builds archive here: http://fs2source.warpcore.org/exes/latest/ and tell me which builds (within two weeks or so) work and which don't? |
|
|
Erinnerung gesendet an Goober5000 It happens since... Well... For me, it never stopped happening... I'm always using the newest CVS-Builds (Linux, self-compiled). |
|
|
This bug has been reopened, so please post your comments directly to Mantis. Can you try CVS checkouts by date during the month of September? The bug should have been fixed on August 30. |
|
|
Okay... Maybe I'll try it... As for now: CVS Build - 02 January 2006 MediaVP 3.6.8 Beta |
|
|
No luck with any CVS-Date/Build... Can it be a Linux-specific problem? I'll try it with Windows now and then edit this message... EDIT: Okay... It IS a Linux-only-bug! Everything went fine in Windows... EDIT 2: Okay... Taylor seems to know what it is :) bearbeitet am: 01-08-06 14:54 |
|
|
The fix has worked every time in my tests and in all of the other missions that I've played I haven't found any new problems as a result of the change. I'll commit the fix and then we'll just see if anyone using the CVS builds notice a problem with events. |
|
|
Did your changes already hit CVS? If yes: It's still happening :( If no: I'll wait ;) |
|
|
No. :) I have been trying to complete the FRED2 changes for the new dynamic starfield code before I commit that and just haven't yet. It will be done today though and I'll get both things in CVS (or at least this one bug fix). The reason I've held off is that I just wanted to give it a quick test under Windows to make sure it did't break (though it shouldn't have). |
|
|
Ok, in CVS now. :) Give it a try in both Linux and Windows please and let me know if it's totally fixed. |
|
|
Okay... Seems to work... You're really a SCP-Linux Guru ;) |
|
|
Ok, I guess we can consider this fixed now. If you see it show up again or notice any issues which look like it might be linked please just reopen this. Oh and that's *Super* SCP-Linux Guru! ;) |
|
|
Fixered. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-08-28 07:19 | StratComm | New Issue | |
| 2005-08-28 07:19 | StratComm | File Added: enif-mannheim1.jpg | |
| 2005-08-28 07:20 | StratComm | File Added: enif-mannheim2.jpg | |
| 2005-08-28 07:20 | StratComm | File Added: enif-mannheim3.jpg | |
| 2005-08-28 07:22 | StratComm | Note Added: 0003190 | |
| 2005-08-28 07:23 | StratComm | Note Edited: 0003190 | |
| 2005-08-28 07:45 | kasperl | Note Added: 0003191 | |
| 2005-08-28 07:45 | kasperl | Assigned To | => Goober5000 |
| 2005-08-28 07:45 | kasperl | Status | new => assigned |
| 2005-08-28 08:36 | Goober5000 | Note Added: 0003192 | |
| 2005-08-28 08:37 | Goober5000 | Category | physics => docking |
| 2005-08-28 13:36 | Alpha0 | Note Added: 0003193 | |
| 2005-08-28 13:38 | Alpha0 | Note Edited: 0003193 | |
| 2005-08-28 16:16 | Goober5000 | Note Added: 0003194 | |
| 2005-08-30 16:46 | Alpha0 | Note Added: 0003210 | |
| 2005-08-30 20:23 | StratComm | Note Added: 0003211 | |
| 2005-08-30 20:40 | StratComm | Note Edited: 0003211 | |
| 2005-08-30 20:41 | StratComm | Note Edited: 0003211 | |
| 2005-08-30 23:36 | Goober5000 | Note Added: 0003215 | |
| 2005-08-31 00:04 | Goober5000 | Note Added: 0003218 | |
| 2005-08-31 13:03 | StratComm | Note Added: 0003234 | |
| 2005-08-31 13:03 | StratComm | Note Edited: 0003234 | |
| 2005-08-31 16:28 | Alpha0 | Note Added: 0003237 | |
| 2005-08-31 17:06 | Goober5000 | Status | assigned => resolved |
| 2005-08-31 17:06 | Goober5000 | Resolution | open => fixed |
| 2005-08-31 17:06 | Goober5000 | Note Added: 0003238 | |
| 2005-12-22 19:47 | Mr_Maniac | Note Added: 0004035 | |
| 2005-12-23 01:52 | Goober5000 | Status | resolved => feedback |
| 2005-12-23 01:52 | Goober5000 | Resolution | fixed => reopened |
| 2005-12-23 01:52 | Goober5000 | Note Added: 0004039 | |
| 2005-12-29 16:31 | Mr_Maniac | Note Added: 0004071 | |
| 2006-01-02 17:02 | Goober5000 | Note Added: 0004101 | |
| 2006-01-02 18:15 | Mr_Maniac | Note Added: 0004103 | |
| 2006-01-07 15:48 | Mr_Maniac | Note Added: 0004141 | |
| 2006-01-07 16:37 | Mr_Maniac | Note Edited: 0004141 | |
| 2006-01-08 19:54 | Mr_Maniac | Note Edited: 0004141 | |
| 2006-01-09 04:01 | taylor | Note Added: 0004164 | |
| 2006-01-09 04:01 | taylor | Status | feedback => assigned |
| 2006-01-09 04:01 | taylor | Assigned To | Goober5000 => taylor |
| 2006-01-10 14:23 | Mr_Maniac | Note Added: 0004186 | |
| 2006-01-10 14:29 | taylor | Note Added: 0004187 | |
| 2006-01-11 06:33 | taylor | Note Added: 0004193 | |
| 2006-01-12 22:35 | Mr_Maniac | Note Added: 0004207 | |
| 2006-01-12 23:10 | taylor | Note Added: 0004209 | |
| 2006-01-12 23:11 | taylor | Status | assigned => resolved |
| 2006-01-12 23:11 | taylor | Resolution | reopened => fixed |
| 2006-01-12 23:11 | taylor | Note Added: 0004210 |