- [FIX] Solventat un memory leak

- [FIX] Arreglat que quan caia al piso que mata, encara tenia un frame pa botar fora i salvar-se.
- Més habitacions
This commit is contained in:
2024-09-28 13:08:10 +02:00
parent 2799ef28aa
commit dc87a214c5
6 changed files with 391 additions and 22 deletions

View File

@@ -669,7 +669,7 @@ namespace actor
// 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))
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 && room::getFloor()!=11) || act->below))
{
// [RZC 14/05/2024] hack usant react_mask i react_push del heroi. Llegir més avall.
act->react_mask=hero::getBoostJump()>0 ? 2 : 1; // =1 estic botant (anant cap amunt)
@@ -1297,6 +1297,8 @@ namespace actor
if (act->next) act->next->prev = act->prev;
//draw::freeSurface(act->surface);
if (act==selected) selected = nullptr;
if (act->below) act->below->above = nullptr;
if (act->above) act->above->below = nullptr;
free(act);
}