Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on October 03, 2015, 02:14:04 pm

Title: Why can't ships launch from a player ship?
Post by: General Battuta on October 03, 2015, 02:14:04 pm
If the player ship has a fighterbay, wings don't seem to be able to arrive from it. Y not
Title: Re: Why can't ships launch from a player ship?
Post by: zookeeper on October 03, 2015, 02:36:58 pm
Ohh, interesting. I only took a brief look, but as far as I can tell...

mission_did_ship_arrive() and mission_do_departure() use mission_parse_get_arrival_ship() to find the anchor ship. But, that function searches Ship_arrival_list, which won't contain the player ship because the player ship never arrives. Why it searches that list and how does it ever find anchor ships which don't arrive but are in the mission from the beginning, I don't know. But maybe that helps someone else in finding the problem, if it's something else after all.
Title: Re: Why can't ships launch from a player ship?
Post by: The E on October 03, 2015, 03:24:42 pm
And the reason why this happened was that the player ship(s) were always kept on the arrival list in order to make multiplayer respawns work. I've created a pull request that fixes this. (https://github.com/scp-fs2open/fs2open.github.com/pull/369)

This fix only affects single player behaviour, multi is unchanged.
Title: Re: Why can't ships launch from a player ship?
Post by: karajorma on October 03, 2015, 11:12:58 pm
Yeah, I'm not so sure I like that. Why not fix it so that this works in multi and singleplayer by adding a check to the actual arrival and departure functions?
Title: Re: Why can't ships launch from a player ship?
Post by: The E on October 04, 2015, 05:24:25 am
I've made an amendment.