… | |
… | |
911 | * object will have no environment. If the object previously had an |
911 | * object will have no environment. If the object previously had an |
912 | * environment, the x and y coordinates will be updated to |
912 | * environment, the x and y coordinates will be updated to |
913 | * the previous environment. |
913 | * the previous environment. |
914 | */ |
914 | */ |
915 | void |
915 | void |
916 | object::remove_slow () |
916 | object::do_remove () |
917 | { |
917 | { |
918 | object *tmp, *last = 0; |
918 | object *tmp, *last = 0; |
919 | object *otmp; |
919 | object *otmp; |
920 | |
920 | |
921 | if (QUERY_FLAG (this, FLAG_REMOVED)) |
921 | if (QUERY_FLAG (this, FLAG_REMOVED)) |
… | |
… | |
2615 | { |
2615 | { |
2616 | return map ? map->region (x, y) |
2616 | return map ? map->region (x, y) |
2617 | : region::default_region (); |
2617 | : region::default_region (); |
2618 | } |
2618 | } |
2619 | |
2619 | |
|
|
2620 | const materialtype_t * |
|
|
2621 | object::dominant_material () const |
|
|
2622 | { |
|
|
2623 | if (materialtype_t *mat = name_to_material (materialname)) |
|
|
2624 | return mat; |
|
|
2625 | |
|
|
2626 | // omfg this is slow, this has to be temporary :) |
|
|
2627 | shstr unknown ("unknown"); |
|
|
2628 | |
|
|
2629 | return name_to_material (unknown); |
|
|
2630 | } |
|
|
2631 | |