… | |
… | |
785 | * object.c ? |
785 | * object.c ? |
786 | */ |
786 | */ |
787 | void |
787 | void |
788 | object::destroy_inv (bool drop_to_ground) |
788 | object::destroy_inv (bool drop_to_ground) |
789 | { |
789 | { |
|
|
790 | // need to check first, because the checks below might segfault |
|
|
791 | // as we might be on an invalid mapspace and crossfire code |
|
|
792 | // is too buggy to ensure that the inventory is empty. |
|
|
793 | // corollary: if you create arrows etc. with stuff in tis inventory, |
|
|
794 | // cf will crash below with off-map x and y |
|
|
795 | if (!inv) |
|
|
796 | return; |
|
|
797 | |
790 | /* Only if the space blocks everything do we not process - |
798 | /* Only if the space blocks everything do we not process - |
791 | * if some form of movement is allowed, let objects |
799 | * if some form of movement is allowed, let objects |
792 | * drop on that space. |
800 | * drop on that space. |
793 | */ |
801 | */ |
794 | if (!drop_to_ground |
802 | if (!drop_to_ground |