- [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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user