- [FIX] No es podien crear habitacions noves amb el shortcut

- [FIX] Reposicionament de l'heroi al provar una habitacio amb l'editor (encara no va be)
- [FIX] MOV_RANDV no apareixia a l'editor
- [FIX] MOV_HUNT no nomes s'actualitza al tropeçar
- [FIX] MOV_HUNT petava el mame si l'heroi moria
- [NEW] Alguns gràfics més
- Zona 1 acabada
This commit is contained in:
2024-07-31 11:36:19 +02:00
parent aa8013082f
commit 1383378a19
9 changed files with 567 additions and 169 deletions

View File

@@ -709,10 +709,15 @@ namespace actor
break;
case MOV_HUNT:
actor_t *heroi = find("HERO");
if (heroi->pos.x < act->pos.x) act->mov_push=PUSH_XN;
if (heroi->pos.x > act->pos.x) act->mov_push=PUSH_XP;
if (heroi->pos.y < act->pos.y) act->mov_push=PUSH_YN;
if (heroi->pos.y > act->pos.y) act->mov_push=PUSH_YP;
if (heroi)
{
int tombola[2]; int tombola_pos = 0;
if (heroi->pos.x < act->pos.x) tombola[tombola_pos++]=PUSH_XN;
if (heroi->pos.x > act->pos.x) tombola[tombola_pos++]=PUSH_XP;
if (heroi->pos.y < act->pos.y) tombola[tombola_pos++]=PUSH_YN;
if (heroi->pos.y > act->pos.y) tombola[tombola_pos++]=PUSH_YP;
act->mov_push=tombola[rand()%tombola_pos];
}
break;
}
if (act->flags & FLAG_ORIENTABLE) act->orient = act->mov_push;
@@ -1006,7 +1011,10 @@ namespace actor
}
if (act->flags & FLAG_HERO) updateUserInput(act);
if (act->flags & FLAG_MOVING) updateMoving(act);
if (act->flags & FLAG_MOVING) {
if (act->movement==MOV_HUNT && ( (act->pos.x&7)==0 || (act->pos.y&7)==0) ) changeMoving(act);
updateMoving(act);
}
if (act->flags & FLAG_GRAVITY) act->push |= PUSH_ZN;
//if (act->flags & FLAG_PUSHABLE)