- [FIX] Ja no pot caminar en diagonal
- Treballant en l'eixida del piso (encara peta)
This commit is contained in:
@@ -421,7 +421,7 @@ namespace actor
|
||||
act->push |= PUSH_XN;
|
||||
}
|
||||
}
|
||||
if ( input::keyDown(SDL_SCANCODE_RIGHT) )
|
||||
else if ( input::keyDown(SDL_SCANCODE_RIGHT) )
|
||||
{
|
||||
act->orient=PUSH_XP;
|
||||
if ( ((act->pos.x+act->size.x)<max.x && act->pos.y>=min.y && (act->pos.y+act->size.y)<=max.y) || ( (room::getDoors()&DOOR_XP) && (act->pos.y>=24) && (act->pos.y<=32) ) )
|
||||
@@ -438,7 +438,7 @@ namespace actor
|
||||
act->push |= PUSH_XP;
|
||||
}
|
||||
}
|
||||
if ( input::keyDown(SDL_SCANCODE_UP) )
|
||||
else if ( input::keyDown(SDL_SCANCODE_UP) )
|
||||
{
|
||||
act->orient=PUSH_YN;
|
||||
if ( (act->pos.y>min.y && act->pos.x>=min.x && (act->pos.x+act->size.x)<=max.x) || ( (room::getDoors()&DOOR_YN) && (act->pos.x>=24) && (act->pos.x<=32) ) )
|
||||
@@ -455,7 +455,7 @@ namespace actor
|
||||
act->push |= PUSH_YN;
|
||||
}
|
||||
}
|
||||
if ( input::keyDown(SDL_SCANCODE_DOWN) )
|
||||
else if ( input::keyDown(SDL_SCANCODE_DOWN) )
|
||||
{
|
||||
act->orient=PUSH_YP;
|
||||
if ( ((act->pos.y+act->size.y)<max.y && act->pos.x>=min.x && (act->pos.x+act->size.x)<=max.x) || ( (room::getDoors()&DOOR_YP) && (act->pos.x>=24) && (act->pos.x<=32) ) )
|
||||
@@ -717,7 +717,15 @@ namespace actor
|
||||
|
||||
if (act->push & PUSH_ZN) {
|
||||
// Si estic sobre el piso, no faig res [TODO]: Si no hi ha piso ha de caure
|
||||
if (act->pos.z == 0) return;
|
||||
if (act->pos.z == 0)
|
||||
{
|
||||
if ((act->flags&FLAG_HERO)==0 || room::getExit(ZN)==-1) return;
|
||||
|
||||
room::load(room::getExit(ZN));
|
||||
act->pos.z = room::getMax().z;
|
||||
actor::setDirty(act);
|
||||
return;
|
||||
}
|
||||
|
||||
// Si tinc a algú baix...
|
||||
if (act->below)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace room
|
||||
tmin = {3-inner_w,3-inner_h,0};
|
||||
tmax = {4+inner_w,4+inner_h,3};
|
||||
min = {tmin.x*8,tmin.y*8,0};
|
||||
max = {(tmax.x+1)*8,(tmax.y+1)*8,24};
|
||||
max = {(tmax.x+1)*8,(tmax.y+1)*8,32};
|
||||
doors = (door_height[XP]>=0?DOOR_XP:0) | (door_height[XN]>=0?DOOR_XN:0) | (door_height[YP]>=0?DOOR_YP:0) | (door_height[YN]>=0?DOOR_YN:0);
|
||||
//door_height[0] = inner_xp; //XP
|
||||
//door_height[1] = inner_xn; //XN
|
||||
|
||||
Reference in New Issue
Block a user