View Issue Details

IDProjectCategoryView StatusLast Update
0002318FSSCPAIpublic2010-12-09 20:12
ReporterGeneralBattuta Assigned ToSushi_CW  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0002318: AI becomes locked in glide when issuing some orders.
DescriptionUnder Antipodes 6, maybe earlier, the AI can become locked in Glide mode if you issue a 'form on my wing' command while they are gliding.

They will then drift off away from the battle at top speed until you issue another order.

Will attempt to repro on earlier builds.
Additional InformationSUSHIIIIIII
TagsNo tags attached.

Activities

Sushi_CW

2010-10-04 00:30

developer   ~0012382

Test build for fixing this:
http://www.mediafire.com/?mmhyufa3rwwcc73


Battuta, if you could confirm that this fixes the problem, I'll get it committed to trunk right away.

2010-10-12 14:24

 

2318.patch (722 bytes)   
Index: code/ai/aicode.cpp
===================================================================
--- code/ai/aicode.cpp	(revision 6564)
+++ code/ai/aicode.cpp	(working copy)
@@ -12954,10 +12954,6 @@
 //	Execute behavior given by aip->mode.
 void ai_execute_behavior(ai_info *aip)
 {
-
-	//Default to glide OFF
-	Pl_objp->phys_info.flags &= ~PF_GLIDING;
-
 	switch (aip->mode) {
 	case AIM_CHASE:
 		if (En_objp) {
@@ -13936,6 +13932,9 @@
 	// Set globals defining the current object and its enemy object.
 	Pl_objp = &Objects[objnum];
 
+	//Default to glide OFF
+	Pl_objp->phys_info.flags &= ~PF_GLIDING;
+
 	// warping out?
 	if ((aip->mode == AIM_WARP_OUT) || (aip->ai_flags & AIF_TRYING_UNSUCCESSFULLY_TO_WARP))
 	{
2318.patch (722 bytes)   

Sushi_CW

2010-10-12 14:25

developer   ~0012409

Uploaded the patch before it gets lost.

Battuta... nudge nudge...

GeneralBattuta

2010-10-19 23:46

reporter   ~0012415

Testing now.

2010-10-19 23:59

 

fs2_open.log (94,309 bytes)

GeneralBattuta

2010-10-19 23:59

reporter   ~0012416

Very difficult to confirm this as the mission crashed out with the following report:


Assert: Weapon_info[Weapons[hobjp->instance].weapon_info_index].wi_flags & WIF_BOMB
File: weapons.cpp
Line: 3935

ntdll.dll! KiFastSystemCallRet
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2_2318.exe! <no symbol>
kernel32.dll! BaseThreadInitThunk + 18 bytes
ntdll.dll! RtlInitializeExceptionChain + 99 bytes
ntdll.dll! RtlInitializeExceptionChain + 54 bytes

Attaching log file.

I can try again, but it'd be better if we had a clean test mission where this behavior could be easily reproduced, as the mission where I observed the behavior is all kinds of laggy in a non-Antipodes 6 debug.

Sushi_CW

2010-10-20 00:08

developer   ~0012417

New test build (vs latest trunk) available at: http://www.mediafire.com/?s61ajsux3bzm2ym

GeneralBattuta

2010-10-20 15:52

reporter   ~0012418

I believe that build resolves it. I did not see any immediate problems associated with the fix but we should keep our eyes open.

Thanks.

FUBAR-BDHR

2010-10-20 19:02

developer   ~0012419

Off topic but that previous assert is normally caused by invalid target priority groups.

GeneralBattuta

2010-10-20 19:22

reporter   ~0012420

Could a modification to objecttypes.tbl have caused it?

FUBAR-BDHR

2010-10-21 03:20

developer   ~0012421

Definitely. Checks were added to prevent this from happening but it doesn't mean they are all getting caught.

The_E

2010-12-09 20:12

administrator   ~0012519

Bug seems fixed. Closing.

Issue History

Date Modified Username Field Change
2010-10-02 03:24 GeneralBattuta New Issue
2010-10-02 03:24 GeneralBattuta Status new => assigned
2010-10-02 03:24 GeneralBattuta Assigned To => Sushi_CW
2010-10-04 00:30 Sushi_CW Note Added: 0012382
2010-10-12 14:24 Sushi_CW File Added: 2318.patch
2010-10-12 14:25 Sushi_CW Note Added: 0012409
2010-10-12 14:25 Sushi_CW Status assigned => confirmed
2010-10-19 23:46 GeneralBattuta Note Added: 0012415
2010-10-19 23:59 GeneralBattuta File Added: fs2_open.log
2010-10-19 23:59 GeneralBattuta Note Added: 0012416
2010-10-20 00:08 Sushi_CW Note Added: 0012417
2010-10-20 15:52 GeneralBattuta Note Added: 0012418
2010-10-20 19:02 FUBAR-BDHR Note Added: 0012419
2010-10-20 19:22 GeneralBattuta Note Added: 0012420
2010-10-21 03:20 FUBAR-BDHR Note Added: 0012421
2010-12-09 20:12 The_E Note Added: 0012519
2010-12-09 20:12 The_E Status confirmed => resolved
2010-12-09 20:12 The_E Resolution open => fixed