| 379 | } |
| 380 | |
| 381 | std::vector<Object*> ActorsEditor_AddEntitiesAtMouse(const Path& source, SceneGraph* scenegraph, const EntityDescriptionList& desc_list, LineSegment mouseray, bool in_new_prefab) { |
| 382 | if (desc_list.empty()) |
| 383 | return std::vector<Object*>(); |
| 384 | |
| 385 | Collision c = scenegraph->lineCheckCollidable(mouseray.start, mouseray.end, NULL); |
| 386 | |
| 387 | vec3 spawn_pos = mouseray.start + normalize(mouseray.end - mouseray.start) * 10.0f; |
| 388 | if (c.hit && c.hit_what != NULL) { |
| 389 | spawn_pos = c.hit_where; |
| 390 | } |
| 391 | |
| 392 | return ActorsEditor_AddEntitiesAtPosition(source, scenegraph, desc_list, spawn_pos, in_new_prefab); |
| 393 | } |
| 394 | |
| 395 | std::vector<Object*> ActorsEditor_AddEntitiesAtPosition(const Path& source, SceneGraph* scenegraph, const EntityDescriptionList& desc_list, vec3 spawn_pos, bool in_new_prefab, CommonObjectID hostid) { |
| 396 | Online* online = Online::Instance(); |
no test coverage detected