- [FIX] Els boosters, skills i parts no han de desapareixer al pillarlos jugant des de l'editor
- [FIX] Al soltar un objecte pillat podia acabar parcialment fora de l'habitació
This commit is contained in:
@@ -644,8 +644,8 @@ namespace actor
|
||||
{
|
||||
if (picked)
|
||||
{
|
||||
picked->pos.x = act->pos.x;
|
||||
picked->pos.y = act->pos.y;
|
||||
picked->pos.x = act->pos.x; if (picked->pos.x + picked->size.x > room::getMax().x) picked->pos.x = room::getMax().x - picked->size.x;
|
||||
picked->pos.y = act->pos.y; if (picked->pos.y + picked->size.y > room::getMax().y) picked->pos.y = room::getMax().y - picked->size.y;
|
||||
picked->pos.z = act->pos.z;
|
||||
act->pos.z += picked->size.z;
|
||||
actor::actor_t *above = act->above;
|
||||
|
||||
@@ -249,25 +249,25 @@ namespace room
|
||||
if (!::editor::isEditing() && act->flags & FLAG_SPECIAL)
|
||||
{
|
||||
if (act->name[0]=='B') { // Es un booster
|
||||
if (actor::hero::wasBoosterCollected((act->name[3]-48)*10+(act->name[4]-48)))
|
||||
if (!::editor::isDevMode() && actor::hero::wasBoosterCollected((act->name[3]-48)*10+(act->name[4]-48)))
|
||||
{
|
||||
actor::remove(act);
|
||||
act = nullptr;
|
||||
}
|
||||
} else if (act->name[0]=='S') { // Es un skill
|
||||
if (actor::hero::wasSkillCollected(&act->name[2]))
|
||||
if (!::editor::isDevMode() && actor::hero::wasSkillCollected(&act->name[2]))
|
||||
{
|
||||
actor::remove(act);
|
||||
act = nullptr;
|
||||
}
|
||||
} else if (act->name[0]=='P') { // Es una part
|
||||
if (actor::hero::wasPartCollected(&act->name[2]))
|
||||
if (!::editor::isDevMode() && actor::hero::wasPartCollected(&act->name[2]))
|
||||
{
|
||||
actor::remove(act);
|
||||
act = nullptr;
|
||||
}
|
||||
} else if (act->name[0]=='G') { // Es un ghost d'una part
|
||||
if (actor::hero::wasPartCollected(&act->name[2]))
|
||||
if (!::editor::isDevMode() && actor::hero::wasPartCollected(&act->name[2]))
|
||||
{
|
||||
act->flags &= ~FLAG_ANIMATED;
|
||||
act->bmp_rect.x += act->bmp_rect.w;
|
||||
|
||||
Reference in New Issue
Block a user