… | |
… | |
546 | } |
546 | } |
547 | |
547 | |
548 | // returns the outermost environment, may return 0 |
548 | // returns the outermost environment, may return 0 |
549 | MTH object *outer_env () const |
549 | MTH object *outer_env () const |
550 | { |
550 | { |
551 | return env ? outer_env () : 0; |
551 | return env ? outer_env_or_self () : 0; |
552 | } |
552 | } |
553 | |
553 | |
554 | // returns the player that has this object in his inventory, or 0 |
554 | // returns the player that has this object in his inventory, or 0 |
555 | // we assume the player is always the outer env |
555 | // we assume the player is always the outer env |
556 | MTH object *in_player () const |
556 | MTH object *in_player () const |