View Issue Details

IDProjectCategoryView StatusLast Update
0000519FSSCPgameplaypublic2005-08-31 07:49
Reportertaylor Assigned ToGoober5000  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Summary0000519: Player is able to receive invalid AI goals (acting on itself)
DescriptionI just encounterd this in WCS, the player was assigned AI_GOAL_STAY_NEAR_SHIP for itself when using autopilot. The wing that the player was in (Alpha) was assigned to stay near "Alpha 2" (the player). An AI goal of this type cannot be executed on itself and will hit an Assert().

A check needs to be added to skip the player in these instances but I'm unsure where it's best to do this. Is this something that needs to be done in sexp.cpp or does just the wing-wide goal function (ai_add_wing_goal_sexp()) need to do a check?

Leaving this one to the sexp/aigoal expert. :)
TagsNo tags attached.

Activities

Goober5000

2005-08-23 05:00

administrator   ~0003094

Last edited: 2005-08-23 05:00

This may have something to do with autopilot so I'm flagging it for Kazan as well.

Which Assert did you hit, and which mission was it in?

edited on: 08-23-05 01:00

taylor

2005-08-23 06:12

administrator   ~0003098

"objp != other_objp" in ai_do_stay_near(). It's easy to fix this for just that one thing but most of those AI goals should never be assigned to the player, whether they contain simliar Assert()'s or not.

This isn't autopilot related, though I didn't make that clear, but strictly a sexp thing. Here is the sexp in question:

$Formula: ( when
   ( >
      ( distance-ship-subsystem
         "Alpha 2"
         "TCS CV-50 Wellington"
         "fighterbay01"
      )
      500
   )
   ( clear-goals "Alpha" )
   ( add-goal
      "Alpha"
      ( ai-stay-near-ship "Alpha 2" 89 )
   )
)
+Name: Form on Alpha 2
+Repeat Count: 1
+Interval: 1
+Team: 0

Goober5000

2005-08-23 08:11

administrator   ~0003100

K, fixed and in CVS.

Kazan

2005-08-23 11:03

developer   ~0003107

i need to make sure this fix doesn't break autopilot

Goober5000

2005-08-23 19:44

administrator   ~0003112

All it does it prevent something like the following:

add-goal
--Alpha 1
--ai-chase
----Alpha 1

Replace ai-chase with ai-autopilot; same thing. It shouldn't have anything to do with autopilot.

Kazan

2005-08-23 20:13

developer   ~0003115

ok

Goober5000

2005-08-31 07:48

administrator   ~0003232

Hm, somehow this was resolved while still assigned to Kazan. Assigning to myself in case it's reopened; it probably won't be but you never know. ;)

Goober5000

2005-08-31 07:49

administrator   ~0003233

Resolvering.

Issue History

Date Modified Username Field Change
2005-08-23 04:22 taylor New Issue
2005-08-23 04:22 taylor Assigned To => Goober5000
2005-08-23 04:22 taylor Status new => assigned
2005-08-23 04:59 Goober5000 Assigned To Goober5000 => Kazan
2005-08-23 05:00 Goober5000 Note Added: 0003094
2005-08-23 05:00 Goober5000 Assigned To Kazan => Goober5000
2005-08-23 05:00 Goober5000 Note Edited: 0003094
2005-08-23 06:12 taylor Note Added: 0003098
2005-08-23 08:11 Goober5000 Status assigned => resolved
2005-08-23 08:11 Goober5000 Resolution open => fixed
2005-08-23 08:11 Goober5000 Note Added: 0003100
2005-08-23 11:03 Kazan Status resolved => feedback
2005-08-23 11:03 Kazan Resolution fixed => reopened
2005-08-23 11:03 Kazan Note Added: 0003107
2005-08-23 11:03 Kazan Status feedback => assigned
2005-08-23 11:03 Kazan Assigned To Goober5000 => Kazan
2005-08-23 19:44 Goober5000 Note Added: 0003112
2005-08-23 20:13 Kazan Note Added: 0003115
2005-08-23 20:13 Kazan Status assigned => resolved
2005-08-23 20:13 Kazan Resolution reopened => fixed
2005-08-31 07:48 Goober5000 Status resolved => feedback
2005-08-31 07:48 Goober5000 Resolution fixed => reopened
2005-08-31 07:48 Goober5000 Note Added: 0003232
2005-08-31 07:48 Goober5000 Assigned To Kazan => Goober5000
2005-08-31 07:49 Goober5000 Status feedback => resolved
2005-08-31 07:49 Goober5000 Resolution reopened => fixed
2005-08-31 07:49 Goober5000 Note Added: 0003233