… | |
… | |
736 | // move this object to the top of its env's inventory to speed up |
736 | // move this object to the top of its env's inventory to speed up |
737 | // searches for it. |
737 | // searches for it. |
738 | static object * |
738 | static object * |
739 | splay (object *ob) |
739 | splay (object *ob) |
740 | { |
740 | { |
741 | if (ob->env && ob->env->inv != ob) |
741 | if (ob->above && ob->env) |
742 | { |
742 | { |
743 | if (ob->above) ob->above->below = ob->below; |
743 | if (ob->above) ob->above->below = ob->below; |
744 | if (ob->below) ob->below->above = ob->above; |
744 | if (ob->below) ob->below->above = ob->above; |
745 | |
745 | |
746 | ob->above = 0; |
746 | ob->above = 0; |