View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003013 | FSSCP | SEXPs | public | 2014-03-05 12:16 | 2014-04-04 19:47 |
Reporter | karajorma | Assigned To | karajorma | ||
Priority | normal | Severity | major | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | 3.7.1 | ||||
Target Version | 3.7.2 | Fixed in Version | 3.7.2 | ||
Summary | 0003013: is-in-box fails to get correct position | ||||
Description | Since the release of Diaspora patch 1.1, many people have reported that they are suddenly unable to land on the Theseus even though they could in 1.0.4. http://www.hard-light.net/forums/index.php?topic=86565.0 I've traced the problem back the is-in-box SEXP and more specifically the test_point_within_box() function which is quite clearly reporting the player as not being within the box when as far as I can see tell, the definitely are. Unfortunately I don't have the vector maths skills to figure out why. A test mission I made does not show this behaviour so the cause appears to be something the Theseus is doing in the real mission but not in the test. | ||||
Steps To Reproduce | Run Diaspora with the 1.1 patch installed. Run mission 1 on advanced (medium) skill level or above. At the end of the mission try to land on the Theseus by entering the flight pod and slowing down below 5m/s. The game should allow you to land but it won't. If you breakpoint the sexp_is_in_box() function you'll see that the SEXP returns false twice for Blue 1. It should return true from one of those two calls (depending on which flight pod you are in). | ||||
Tags | No tags attached. | ||||
|
Is there a way to test this without installing Diaspora? Also, as I recall there was an error in test_point_within_box sometime recently, but it was fixed following feedback from somebody else. I don't recall the details but they should be in the SVN log. As far as the test case goes, have you tried rotating the Theseus through various orientations? |
|
There's no way to test without Diaspora. I can't even reproduce in Diaspora except in the official missions. Although rotating the Theseus isn't something I tried in the test mission (nor is ordering it to move from its starting rotation). I'll try reverting the test_point_within_box fix and see if that fixes the issue. |
|
Well, the fix was in revision 9642, but the commit message doesn't say what needed to be fixed. :sigh: It was fairly critical to the correct operation of the sexp; it broke something important as I recall. Though I concede the possibility of the fix breaking something else that I didn't test for. |
|
IIRC, is-in-box was changing the position of the object it was testing. This resulted in the object being flung around the mission space at great speed. See 0002937 (oops - actually 0002937 was fixing an issue introduced by 9642...) |
|
Aha, so that fits my memory of one fix (9642) being amended by another fix (9946). |
|
The feedback from Diaspora testers seems to indicate that if r9642 and r9946 are rolled back, the problem goes away. |
|
Well, that's frustrating. I'll give Diaspora a try myself and see if I spot anything. |
|
What's the status on this? |
|
I'm going to take a look at Diaspora and see if I can resolve the bug. I suppose I can assign it to myself in the meantime. |
|
Ummm. Just spotted this. In the original we have vec3d tempv; vm_vec_sub(&tempv, &test_point, &reference_ship_obj->pos); vm_vec_rotate(&test_point, &tempv, &reference_ship_obj->orient); And in the new code we have vec3d tempv; vm_vec_sub(&tempv, test_point, &reference_ship_obj->pos); vm_vec_unrotate(test_point, &tempv, &reference_ship_obj->orient); Why the switch from vm_vec_rotate to vm_vec_unrotate? |
|
Oh, well done. That must be the cause of the error. I suppose what I must have done is rewritten that section of code rather than simply copying and pasting it. I must have gotten wires crossed with sexp_calculate_coordinate, which does the opposite -- transforms relative coordinates into global coordinates. |
|
Fix committed to trunk@10530. |
|
Despite Mantis's auto-resolution of the ticket, I want to leave this open until it's confirmed fixed. I've credited karajorma as he's the one that tracked down the likely root cause. Are there any Diaspora testers who would be able to evaluate the next nightly build? |
|
We don't have a proper test group set up. I'll post the build and get some responses. |
|
Based on the two positive reports in this thread... http://www.hard-light.net/forums/index.php?topic=87201.0 ...I think we can now mark this as fixed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-03-05 12:16 | karajorma | New Issue | |
2014-03-05 20:19 | Goober5000 | Note Added: 0015637 | |
2014-03-05 23:11 | karajorma | Note Added: 0015638 | |
2014-03-05 23:11 | karajorma | Note Edited: 0015638 | |
2014-03-06 02:20 | Goober5000 | Note Added: 0015639 | |
2014-03-06 03:08 | niffiwan | Note Added: 0015640 | |
2014-03-06 03:14 | niffiwan | Note Edited: 0015640 | |
2014-03-06 03:53 | Goober5000 | Note Added: 0015641 | |
2014-03-16 13:27 | karajorma | Note Added: 0015665 | |
2014-03-16 17:24 | Goober5000 | Note Added: 0015666 | |
2014-03-24 15:15 | The_E | Note Added: 0015679 | |
2014-03-25 00:30 | Goober5000 | Note Added: 0015680 | |
2014-03-25 00:30 | Goober5000 | Assigned To | => Goober5000 |
2014-03-25 00:30 | Goober5000 | Status | new => assigned |
2014-03-25 08:21 | karajorma | Note Added: 0015681 | |
2014-03-26 01:47 | Goober5000 | Note Added: 0015683 | |
2014-03-26 01:47 | Goober5000 | Changeset attached | => fs2open trunk r10530 |
2014-03-26 01:47 | Goober5000 | Note Added: 0015684 | |
2014-03-26 01:47 | Goober5000 | Status | assigned => resolved |
2014-03-26 01:47 | Goober5000 | Resolution | open => fixed |
2014-03-26 01:49 | Goober5000 | Note Added: 0015685 | |
2014-03-26 01:49 | Goober5000 | Assigned To | Goober5000 => karajorma |
2014-03-26 01:49 | Goober5000 | Status | resolved => feedback |
2014-03-28 13:03 | karajorma | Note Added: 0015691 | |
2014-03-28 13:03 | karajorma | Status | feedback => assigned |
2014-04-04 19:47 | Goober5000 | Note Added: 0015696 | |
2014-04-04 19:47 | Goober5000 | Status | assigned => resolved |
2014-04-04 19:47 | Goober5000 | Fixed in Version | => 3.7.2 |