-
Notifications
You must be signed in to change notification settings - Fork 183
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
Various opcodes #499
Conversation
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); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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
Various opcodes
Implemented various opcodes