Skip to content

Various opcodes #499

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

Merged
merged 3 commits into from Jun 18, 2018
Merged

Various opcodes #499

merged 3 commits into from Jun 18, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jun 3, 2018

Implemented various opcodes

@darkf
Copy link
Collaborator

darkf commented Jun 8, 2018

Other than the comments, LGTM

@@ -519,8 +519,13 @@ void VehicleObject::tickPhysics(float dt) {
}

bool VehicleObject::isFlipped() const {
auto up = getRotation() * glm::vec3(0.f, 0.f, 1.f);
return up.z <= -0.1f;
auto forward = getRotation() * glm::vec3(0.f, 0.f, 1.f);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you not just make this getRotation().z <= -0.97f?

Copy link
Author

Choose a reason for hiding this comment

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

No, we need forward vector

}

bool VehicleObject::isUpright() const {
auto forward = getRotation() * glm::vec3(0.f, 0.f, 1.f);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same

Copy link
Author

Choose a reason for hiding this comment

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

No, we need forward vector

@@ -25,6 +25,10 @@ void ScriptMachine::executeThread(SCMThread& t, int msPassed) {
}
}

if (t.allowWaitSkip && getState()->input[0].pressed(GameInputState::Jump)) {
Copy link

Choose a reason for hiding this comment

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

Can you add comment what's the purpose of this if? thx

@darkf darkf merged commit 81781a5 into rwengine:master Jun 18, 2018
@ghost ghost deleted the opcodes branch June 18, 2018 10:04
NFSMONSTR pushed a commit to NFSMONSTR/openrw that referenced this pull request Jun 18, 2018
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.

1 participant