New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 'hookgroup' section parsing #686

Closed
ulteq opened this Issue Feb 1, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@ulteq
Contributor

ulteq commented Feb 1, 2016

Currently unsupported in the new parser:

Reference (old parser): https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/0a55a993899d6a06cdc58fd98b5b675b371eb89a/source/main/physics/input_output/SerializedRig.cpp#L4488-L4507

This code is unreachable without hookgroup sections:

// we lock against ropables
// and their ropables
for (std::vector <ropable_t>::iterator itr = trucks[t]->ropables.begin(); itr!=trucks[t]->ropables.end(); itr++)
{
// if the ropable is not multilock and used, then discard this ropable
if (!itr->multilock && itr->used)
continue;
// calculate the distance and record the nearest ropable
float dist = (it->hookNode->AbsPosition - itr->node->AbsPosition).length();
if (dist < mindist)
{
mindist = dist;
shorter = itr->node;
shtruck = trucks[t];
}
}

This does not affect normal hooks or lockgroups sections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment