Skip to content

Commit

Permalink
Add profiling points to Space.GetBodies/Near()
Browse files Browse the repository at this point in the history
  • Loading branch information
sturnclaw committed Oct 6, 2023
1 parent 8c58f49 commit 0188d7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lua/LuaSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "Ship.h"
#include "Space.h"
#include "SpaceStation.h"
#include "profiler/Profiler.h"
#include "ship/PrecalcPath.h"

/*
Expand Down Expand Up @@ -968,6 +969,8 @@ static int l_space_get_num_bodies(lua_State *l)
*/
static int l_space_get_bodies(lua_State *l)
{
PROFILE_SCOPED()

if (!Pi::game) {
luaL_error(l, "Game is not started");
return 0;
Expand Down Expand Up @@ -1033,6 +1036,8 @@ static int l_space_get_bodies(lua_State *l)
*/
static int l_space_get_bodies_near(lua_State *l)
{
PROFILE_SCOPED()

if (!Pi::game) {
luaL_error(l, "Game is not started");
return 0;
Expand Down

0 comments on commit 0188d7d

Please sign in to comment.