Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
build-windows-x64-release:
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -25,7 +25,7 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. -G "Visual Studio 16 2019"
cmake -DCMAKE_BUILD_TYPE=Release .. -G "Visual Studio 17 2022"
cmake --build . --config Release

- name: Create a folder for release
Expand All @@ -41,7 +41,7 @@ jobs:
path: dist/*

build-windows-x86-release:
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -53,7 +53,7 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. -A Win32 -G "Visual Studio 16 2019"
cmake -DCMAKE_BUILD_TYPE=Release .. -A Win32 -G "Visual Studio 17 2022"
cmake --build . --config Release

- name: Create a folder for release
Expand Down
10 changes: 10 additions & 0 deletions apidocs/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3744,6 +3744,16 @@
"type": "void*"
}
]
},
{
"ret": "bool",
"name": "Player_IsPlayerUsingOmp",
"params": [
{
"name": "player",
"type": "void*"
}
]
}
],
"Component": [
Expand Down
3 changes: 3 additions & 0 deletions include/ompcapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ typedef int (*Player_GetSirenState_t)(void* player);
typedef int (*Player_GetLandingGearState_t)(void* player);
typedef uint32_t (*Player_GetHydraReactorAngle_t)(void* player);
typedef float (*Player_GetTrainSpeed_t)(void* player);
typedef bool (*Player_IsPlayerUsingOmp_t)(void* player);


// Component function type definitions
Expand Down Expand Up @@ -1743,6 +1744,7 @@ struct Player_t {
Player_GetLandingGearState_t GetLandingGearState;
Player_GetHydraReactorAngle_t GetHydraReactorAngle;
Player_GetTrainSpeed_t GetTrainSpeed;
Player_IsPlayerUsingOmp_t IsPlayerUsingOmp;
};

// Component functions
Expand Down Expand Up @@ -2488,6 +2490,7 @@ static void omp_initialize_capi(struct OMPAPI_t* ompapi) {
ompapi->Player.GetLandingGearState = (Player_GetLandingGearState_t)LIBRARY_GET_ADDR(capi_lib, "Player_GetLandingGearState");
ompapi->Player.GetHydraReactorAngle = (Player_GetHydraReactorAngle_t)LIBRARY_GET_ADDR(capi_lib, "Player_GetHydraReactorAngle");
ompapi->Player.GetTrainSpeed = (Player_GetTrainSpeed_t)LIBRARY_GET_ADDR(capi_lib, "Player_GetTrainSpeed");
ompapi->Player.IsPlayerUsingOmp = (Player_IsPlayerUsingOmp_t)LIBRARY_GET_ADDR(capi_lib, "Player_IsPlayerUsingOmp");

// Retrieve Component functions
ompapi->Component.Create = (Component_Create_t)LIBRARY_GET_ADDR(capi_lib, "Component_Create");
Expand Down
7 changes: 7 additions & 0 deletions src/Impl/Players/APIs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1415,3 +1415,10 @@ OMP_CAPI(Player_IsCuffed, bool(objectPtr player))
}
return cuffed;
}

OMP_CAPI(Player_IsPlayerUsingOmp, bool(objectPtr player))
{
POOL_ENTITY_RET(players, IPlayer, player, player_, false);
bool ret = bool(player_->isUsingOmp());
return ret;
}