| 3210 | #include "Objects/itemobject.h" |
| 3211 | |
| 3212 | bool ASDoesItemFitInItem(int a, int b) { |
| 3213 | Object* obj_a = the_scenegraph->GetObjectFromID(a); |
| 3214 | Object* obj_b = the_scenegraph->GetObjectFromID(b); |
| 3215 | if (!obj_a || obj_a->GetType() != _item_object) { |
| 3216 | std::string callstack = active_context_stack.top()->GetCallstack(); |
| 3217 | FatalError("Error", "There is no item object %d.\n Called from:\n%s", a, callstack.c_str()); |
| 3218 | }; |
| 3219 | if (!obj_b || obj_b->GetType() != _item_object) { |
| 3220 | std::string callstack = active_context_stack.top()->GetCallstack(); |
| 3221 | FatalError("Error", "There is no item object %d.\n Called from:\n%s", b, callstack.c_str()); |
| 3222 | } |
| 3223 | ItemObject* item_obj_a = (ItemObject*)obj_a; |
| 3224 | ItemObject* item_obj_b = (ItemObject*)obj_b; |
| 3225 | return item_obj_b->item_ref()->GetContains() == item_obj_a->item_ref()->path_; |
| 3226 | } |
| 3227 | |
| 3228 | float ASGetFriction(const vec3& pos) { |
| 3229 | return the_scenegraph->GetMaterialFriction(pos); |
nothing calls this directly
no test coverage detected