Skip to content

Pvs studio fixes #186

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

Open
wants to merge 13 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Source/Entities/ACraft.cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure this borks delivery in some cases

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, those breaks seem to be actually intentional. it's what we like to call Dan ™️ code (overly verbose code from the initial oss release that works mostly by luck)

Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@ void ACraft::DropAllInventory() {
m_Inventory.erase(exitee);
// Reset timer interval and quit until next one is due
m_ExitTimer.Reset();
break;
} else {
(*exitee)->SetVel(m_Vel + exitVel * antiGravBoost);
(*exitee)->SetAngularVel(5.0F * RandomNormalNum());
Expand All @@ -563,9 +562,7 @@ void ACraft::DropAllInventory() {
m_Inventory.erase(exitee);
// Reset timer interval and quit until next one is due
m_ExitTimer.Reset();
break;
}
droppedSomething = true;
}

if (m_Inventory.empty()) {
Expand Down