From 2799ef28aad5476c8e9404927780ecd2511d6811 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Sat, 28 Sep 2024 08:53:18 +0200 Subject: [PATCH] - [FIX] Al agafar un objecte cau normal, o no cau si hi ha altre objecte que ho impideix --- source/actor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/actor.cpp b/source/actor.cpp index a7252a6..08dc683 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -665,7 +665,8 @@ namespace actor { const int height = act->below->size.z; pick(act->below); - if (!input::keyDown(SDL_SCANCODE_SPACE) && !input::keyDown(config::getKey(KEY_JUMP))) act->pos.z -= height; + //if (!(( input::keyDown(SDL_SCANCODE_SPACE) || input::keyDown(config::getKey(KEY_JUMP)) ) && (hero::getSkills()&SKILL_SHOES) && (act->pos.y+act->size.y)<=max.y && act->pos.y>=min.y && (act->pos.x+act->size.x)<=max.x && act->pos.x>=min.x && act->react_mask==0 && (act->pos.z==0 || act->below))) + // act->pos.z -= height; } } if (( input::keyDown(SDL_SCANCODE_SPACE) || input::keyDown(config::getKey(KEY_JUMP)) ) && (hero::getSkills()&SKILL_SHOES) && (act->pos.y+act->size.y)<=max.y && act->pos.y>=min.y && (act->pos.x+act->size.x)<=max.x && act->pos.x>=min.x && act->react_mask==0 && (act->pos.z==0 || act->below)) @@ -682,8 +683,8 @@ namespace actor } hero::useBoostJump(); } - if (input::keyDown(SDL_SCANCODE_Z) && act->pos.z>0) { act->push |= PUSH_ZN; moving = true; } - if (input::keyDown(SDL_SCANCODE_A) && act->pos.zpush |= PUSH_ZP; moving = true; } + //if (input::keyDown(SDL_SCANCODE_Z) && act->pos.z>0) { act->push |= PUSH_ZN; moving = true; } + //if (input::keyDown(SDL_SCANCODE_A) && act->pos.zpush |= PUSH_ZP; moving = true; } // [RZC 14/05/2024] Açò es un hack. estic usant react_mask i react_push del hero com a guarda // i contador per al bot. Supose que perque se suposa que el heroi no te raons