Update spaz_node.cc

This commit is contained in:
VinniTR 2023-09-28 13:14:10 -05:00 committed by GitHub
parent 10dd5d7205
commit bc16e3d426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1053,7 +1053,10 @@ void SpazNode::SetJumpPressed(bool val) {
}
jump_pressed_ = val;
if (jump_pressed_) {
if (!can_fly_ && !knockout_ && !frozen_) {
if (frozen_ || knockout_) {
return;
}
if (!can_fly_) {
if (SceneSound* sound = GetRandomMedia(jump_sounds_)) {
if (auto* source = g_base->audio->SourceBeginNew()) {
const dReal* p_top = dGeomGetPosition(body_head_->geom());