[FIX] [#7] Es pot botar damunt de les peces a arreplegar

This commit is contained in:
2024-10-31 13:18:03 +01:00
parent 3946ea749b
commit dbac3eb3ee

View File

@@ -643,34 +643,7 @@ namespace actor
}
}
uint8_t push(actor_t *source, actor_t *act, uint8_t push)
{
uint8_t result = 0;
if ((act->flags & FLAG_PUSHABLE) && (!(source->flags & FLAG_HERO) || (hero::getSkills() & SKILL_GLOVES) || (push == PUSH_ZN)))
act->push |= push;
if ((act->flags & FLAG_REACTIVE) && (act->react_mask & push))
{
if (act->flags & FLAG_DEADLY)
source->push |= PUSH_KILL;
else
result = act->react_push;
}
if ((source->flags & FLAG_HERO) && (act->flags & FLAG_DISAPPEAR))
{
audio::playSound("snd_disappear.wav", SOUND_BASIC);
act = actor::replaceWithTemplate(act, "EXPLOSION");
act->name[0] = '_';
return PUSH_NONE;
}
if (source->flags & FLAG_DEADLY)
{
act->push |= PUSH_KILL;
}
if (source->flags & FLAG_HERO)
{
if (act->flags & FLAG_SPECIAL)
uint8_t PickSpecial(actor_t *act, uint8_t result = 0)
{
if (act->name[0] == 'B')
{ // Es un booster
@@ -739,6 +712,38 @@ namespace actor
room::cycleColor(1);
return PUSH_NONE;
}
uint8_t push(actor_t *source, actor_t *act, uint8_t push)
{
uint8_t result = 0;
if ((act->flags & FLAG_PUSHABLE) && (!(source->flags & FLAG_HERO) || (hero::getSkills() & SKILL_GLOVES) || (push == PUSH_ZN)))
act->push |= push;
if ((act->flags & FLAG_REACTIVE) && (act->react_mask & push))
{
if (act->flags & FLAG_DEADLY)
source->push |= PUSH_KILL;
else
result = act->react_push;
}
if ((source->flags & FLAG_HERO) && (act->flags & FLAG_DISAPPEAR))
{
audio::playSound("snd_disappear.wav", SOUND_BASIC);
act = actor::replaceWithTemplate(act, "EXPLOSION");
act->name[0] = '_';
return PUSH_NONE;
}
if (source->flags & FLAG_DEADLY)
{
act->push |= PUSH_KILL;
}
if (source->flags & FLAG_HERO)
{
if (act->flags & FLAG_SPECIAL)
{
return PickSpecial(act, result);
}
}
return result;
}
@@ -923,6 +928,11 @@ namespace actor
{
audio::pauseChannel(walk_channel);
audio::playSound("snd_jump.wav", SOUND_BASIC);
// [RZC 31/10/2024] Hack per a que al aterrar sobre els especials els pille
if (!act->below && future_below && future_below->flags & FLAG_SPECIAL)
{
act->push |= PickSpecial(future_below);
}
// [RZC 11/10/2024] Hack per a que al aterrar sobre els que maten, te maten
if (!act->below && future_below && future_below->flags & FLAG_DEADLY)
act->push |= PUSH_KILL;