- [NEW][FIX] Ja funcionen correctament tant les eixides per dalt com per baix
This commit is contained in:
@@ -647,6 +647,15 @@ namespace actor
|
||||
if (act->pos.z>=max.z)
|
||||
{
|
||||
if (act->flags & FLAG_MOVING) changeMoving(act);
|
||||
|
||||
if ( ((act->flags&FLAG_HERO)!=0) && (room::getExit(ZP)!=-1) )
|
||||
{
|
||||
room::load(room::getExit(ZP));
|
||||
act->pos.z = 4;
|
||||
actor::setDirty(act);
|
||||
room_changed = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -659,6 +668,14 @@ namespace actor
|
||||
do {
|
||||
actor::actor_t *other = actor::any_above_me(now);
|
||||
if (!other || (other->flags & FLAG_PUSHABLE)) now->pos.z++;
|
||||
if ( (now->pos.z>=max.z) && (now->flags&FLAG_HERO)!=0 && (room::getExit(ZP)!=-1) )
|
||||
{
|
||||
room::load(room::getExit(ZP));
|
||||
now->pos.z = 4;
|
||||
actor::setDirty(now);
|
||||
room_changed = true;
|
||||
return;
|
||||
}
|
||||
now = other;
|
||||
if (now && !(now->flags & FLAG_PUSHABLE)) {
|
||||
if (act->flags & FLAG_MOVING) changeMoving(act);
|
||||
@@ -782,9 +799,11 @@ namespace actor
|
||||
}
|
||||
|
||||
if (act->push & PUSH_ZN) {
|
||||
// Si estic sobre el piso, no faig res [TODO]: Si no hi ha piso ha de caure
|
||||
// Si estic sobre el piso, no faig res
|
||||
if (act->pos.z == 0)
|
||||
{
|
||||
if ( (act->flags & FLAG_MOVING) && (act->movement==MOV_Z) ) changeMoving(act);
|
||||
act->push &= ~PUSH_ZN;
|
||||
if ( ((act->flags&FLAG_HERO)==0) || (room::getExit(ZN)==-1) ) return;
|
||||
|
||||
room::load(room::getExit(ZN));
|
||||
|
||||
Reference in New Issue
Block a user