{"id":43149212,"url":"https://github.com/rtldg/sm_closestpos","last_synced_at":"2026-01-31T23:54:17.041Z","repository":{"id":47743291,"uuid":"354046456","full_name":"rtldg/sm_closestpos","owner":"rtldg","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-23T21:28:45.000Z","size":121,"stargazers_count":4,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-17T06:09:39.431Z","etag":null,"topics":["sourcemod"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtldg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-04-02T14:41:31.000Z","updated_at":"2025-02-10T06:52:25.000Z","dependencies_parsed_at":"2023-12-09T14:26:05.987Z","dependency_job_id":"bdec6fd5-ffe6-4550-9ddb-6fae5c1cfe17","html_url":"https://github.com/rtldg/sm_closestpos","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rtldg/sm_closestpos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtldg%2Fsm_closestpos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtldg%2Fsm_closestpos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtldg%2Fsm_closestpos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtldg%2Fsm_closestpos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtldg","download_url":"https://codeload.github.com/rtldg/sm_closestpos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtldg%2Fsm_closestpos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28961128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T23:03:11.038Z","status":"ssl_error","status_checked_at":"2026-01-31T22:56:44.691Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sourcemod"],"created_at":"2026-01-31T23:54:16.353Z","updated_at":"2026-01-31T23:54:17.035Z","avatar_url":"https://github.com/rtldg.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sm_closestpos\nSourcemod extension to add a type called `ClosestPos` that you create with an ArrayList of positions which can then be queried for the closest index to a given position.\n\nCurrently uses an implementation of k-d trees from https://github.com/jlblancoc/nanoflann\n\nProbably going to use this in https://github.com/shavitush/bhoptimer as it will provide much faster \"closest replay time\" stuff.\n\nProvides the following:\n```\nmethodmap ClosestPos \u003c Handle {\n\tpublic native ClosestPos(ArrayList input, int offset=0, int startidx=0, int count=2147483646);\n\tpublic native int Find(float pos[3]);\n};\n```\n\n`git checkout --recurse-submodules 1.10-dev`\n\nmy building thing\n```\ngit clone git@github.com:rtldg/sm_closestpos.git # https://github.com/rtldg/sm_closestpos.git\ncd sm_closestpos\nmkdir build\ncd build\nCC=clang CXX=clang++ python3 ../configure.py --enable-optimize\nambuild\n```\nwindows\n```\n# open VS2015 x86 Native Tools Command Prompt\n\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\Tools\\vsdevcmd\\ext\\vcvars.bat\"\n\ngit clone git@github.com:rtldg/sm_closestpos.git # https://github.com/rtldg/sm_closestpos.git\ncd sm_closestpos\nmkdir build\ncd build\npy ../configure.py --enable-optimize\nambuild\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtldg%2Fsm_closestpos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtldg%2Fsm_closestpos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtldg%2Fsm_closestpos/lists"}