v0.3.0c: refactored finding a character, no longer need to maintain chars[] array

This commit is contained in:
Evan Debenham
2015-06-06 00:17:07 -04:00
parent 3cf7979a4c
commit dbeff25d2c
12 changed files with 9 additions and 46 deletions
@@ -279,7 +279,6 @@ public abstract class Char extends Actor {
public void destroy() {
HP = 0;
Actor.remove( this );
Actor.freeCell( pos );
}
public void die( Object src ) {
@@ -404,10 +403,7 @@ public abstract class Char extends Actor {
Door.leave( pos );
}
Actor.freeCell(pos);
pos = step;
Actor.occupyCell( this );
if (flying && Dungeon.level.map[pos] == Terrain.DOOR) {
Door.enter( pos );