@@ -732,12 +732,14 @@ void ai_goal_fixup_dockpoints(ai_info *aip, ai_goal *aigp)
732732// from the mission goals (i.e. those goals which come from events) in that we don't
733733// use sexpressions for goals from the player...so we enumerate all the parameters
734734
735- void ai_add_goal_sub_player (ai_goal_type type, ai_goal_mode mode, int submode, const char *target_name, ai_goal *aigp, const ai_lua_parameters& lua_target )
735+ void ai_add_goal_sub_player (ai_goal_type type, ai_goal_mode mode, int submode, const char *target_name, ai_goal *aigp, int int_data, float float_data, const ai_lua_parameters& lua_target )
736736{
737737 Assert ( (type == ai_goal_type::PLAYER_WING) || (type == ai_goal_type::PLAYER_SHIP) );
738738
739739 ai_goal_reset (aigp, true , mode, submode, type);
740740
741+ aigp->int_data = int_data;
742+ aigp->float_data = float_data;
741743 aigp->lua_ai_target = lua_target;
742744
743745 if ( mode == AI_GOAL_WARP ) {
@@ -865,14 +867,14 @@ void ai_add_ship_goal_scripting(ai_goal_mode mode, int submode, int priority, co
865867// is issued to ship or wing (from player), mode is AI_GOAL_*. submode is the submode the
866868// ship should go into. shipname is the object of the action. aip is the ai_info pointer
867869// of the ship receiving the order
868- void ai_add_ship_goal_player (ai_goal_type type, ai_goal_mode mode, int submode, const char *shipname, ai_info *aip, const ai_lua_parameters& lua_target)
870+ void ai_add_ship_goal_player (ai_goal_type type, ai_goal_mode mode, int submode, const char *shipname, ai_info *aip, int int_data, float float_data, const ai_lua_parameters& lua_target)
869871{
870872 int empty_index;
871873 ai_goal *aigp;
872874
873875 empty_index = ai_goal_find_empty_slot ( aip->goals , aip->active_goal );
874876 aigp = &aip->goals [empty_index];
875- ai_add_goal_sub_player ( type, mode, submode, shipname, aigp, lua_target );
877+ ai_add_goal_sub_player ( type, mode, submode, shipname, aigp, int_data, float_data, lua_target );
876878
877879 // if the goal is to dock, then we must determine which dock points on the two ships to use.
878880 // If the target of the dock is a cargo type container, then we should use DOCK_TYPE_CARGO
@@ -886,7 +888,7 @@ void ai_add_ship_goal_player(ai_goal_type type, ai_goal_mode mode, int submode,
886888
887889// adds a goal from the player to the given wing (which in turn will add it to the proper
888890// ships in the wing
889- void ai_add_wing_goal_player (ai_goal_type type, ai_goal_mode mode, int submode, const char *shipname, int wingnum, const ai_lua_parameters& lua_target)
891+ void ai_add_wing_goal_player (ai_goal_type type, ai_goal_mode mode, int submode, const char *shipname, int wingnum, int int_data, float float_data, const ai_lua_parameters& lua_target)
890892{
891893 int i, empty_index;
892894 wing *wingp = &Wings[wingnum];
@@ -897,15 +899,15 @@ void ai_add_wing_goal_player(ai_goal_type type, ai_goal_mode mode, int submode,
897899 int num = wingp->ship_index [i];
898900 if ( num == -1 ) // ship must have been destroyed or departed
899901 continue ;
900- ai_add_ship_goal_player ( type, mode, submode, shipname, &Ai_info[Ships[num].ai_index ], lua_target );
902+ ai_add_ship_goal_player ( type, mode, submode, shipname, &Ai_info[Ships[num].ai_index ], int_data, float_data, lua_target );
901903 }
902904 }
903905
904906 // add the sexpression index into the wing's list of goal sexpressions if
905907 // there are more waves to come. We use the same method here as when adding a goal to
906908 // a ship -- find the first empty entry. If none exists, take the oldest entry and replace it.
907909 empty_index = ai_goal_find_empty_slot ( wingp->ai_goals , -1 );
908- ai_add_goal_sub_player ( type, mode, submode, shipname, &wingp->ai_goals [empty_index], lua_target );
910+ ai_add_goal_sub_player ( type, mode, submode, shipname, &wingp->ai_goals [empty_index], int_data, float_data, lua_target );
909911}
910912
911913
0 commit comments