Skip to content

modify function headers as suggested in PR #530#532

Merged
asarium merged 5 commits into
scp-fs2open:masterfrom
Goober5000:function_parameter_tweak
Feb 11, 2016
Merged

modify function headers as suggested in PR #530#532
asarium merged 5 commits into
scp-fs2open:masterfrom
Goober5000:function_parameter_tweak

Conversation

@Goober5000

Copy link
Copy Markdown
Contributor

As @asarium commented in #530:

An Assertion that checks if the model instance actually belongs to the model number could catch some programming errors here.

On seconds thought, polymodel_instance contains the model number of the referenced polymodel so the model_num parameter isn't needed at all.

@Goober5000

Copy link
Copy Markdown
Contributor Author

bump Can someone restart Travis?

@asarium

asarium commented Feb 9, 2016

Copy link
Copy Markdown
Member

I don't think that's possible when the build never started. Rebasing the branch should trigger a new build if there were changes in master.

@Goober5000

Copy link
Copy Markdown
Contributor Author

In that case, a new commit should do it as well. I've got just the one in mind, but it will probably be tomorrow before it's ready to go in.

@Goober5000

Copy link
Copy Markdown
Contributor Author

This new commit pulls forward some minor changes needed for PR #530 (which will again be rebased after this hits master) and extends those changes to other related functions. All the model_instance functions now work directly on the model instances, rather than detouring through the object.

This allows model_instances of all sorts (including skyboxes, asteroids, and weapons) to use the functions, rather than restricting usage by assuming an OBJ_SHIP. (Practically speaking, the vast majority of places where these functions are called are in the ship code anyway.)

@asarium

asarium commented Feb 11, 2016

Copy link
Copy Markdown
Member

Code looks good and a quick test run didn't show anything unusual.

asarium added a commit that referenced this pull request Feb 11, 2016
modify function headers as suggested in PR #530
@asarium asarium merged commit 73d12d1 into scp-fs2open:master Feb 11, 2016
@Goober5000 Goober5000 deleted the function_parameter_tweak branch February 11, 2016 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants