| 3153 | |
| 3154 | #include "Scripting/angelscript/add_on/scriptarray/scriptarray.h" |
| 3155 | void GetCharactersInSphere(vec3 origin, float radius, CScriptArray* array) { |
| 3156 | ContactInfoCallback cb; |
| 3157 | the_scenegraph->abstract_bullet_world_->GetSphereCollisions(origin, radius, cb); |
| 3158 | for (int i = 0; i < cb.contact_info.size(); ++i) { |
| 3159 | BulletObject* bo = cb.contact_info[i].object; |
| 3160 | if (bo && bo->owner_object && the_scenegraph->IsObjectSane(bo->owner_object) && bo->owner_object->GetType() == _movement_object) { |
| 3161 | int val = ((MovementObject*)bo->owner_object)->GetID(); |
| 3162 | array->InsertLast(&val); |
| 3163 | } |
| 3164 | } |
| 3165 | } |
| 3166 | |
| 3167 | void GetCharacters(CScriptArray* array) { |
| 3168 | for (auto& movement_object : the_scenegraph->movement_objects_) { |
nothing calls this directly
no test coverage detected