From 52da993ddf8503d67abd7a3748fe297bc337ec71 Mon Sep 17 00:00:00 2001 From: Alex Cole Date: Sun, 31 Dec 2023 17:31:14 +0100 Subject: [PATCH 1/3] Missing MPL headers. --- SDK/include/Impl/events_impl.hpp | 8 ++++++++ SDK/include/Impl/network_impl.hpp | 8 ++++++++ SDK/include/Impl/pool_impl.hpp | 8 ++++++++ SDK/include/Server/Components/Actors/actors.hpp | 8 ++++++++ .../Server/Components/Checkpoints/checkpoints.hpp | 8 ++++++++ SDK/include/Server/Components/Classes/classes.hpp | 8 ++++++++ SDK/include/Server/Components/Console/console.hpp | 9 +++++++++ .../Server/Components/CustomModels/custommodels.hpp | 8 ++++++++ SDK/include/Server/Components/Databases/databases.hpp | 8 ++++++++ SDK/include/Server/Components/Dialogs/dialogs.hpp | 8 ++++++++ SDK/include/Server/Components/GangZones/gangzones.hpp | 8 ++++++++ .../Server/Components/LegacyConfig/legacyconfig.hpp | 8 ++++++++ SDK/include/Server/Components/Menus/menus.hpp | 8 ++++++++ SDK/include/Server/Components/Objects/objects.hpp | 8 ++++++++ SDK/include/Server/Components/Pawn/Impl/pawn_impl.hpp | 8 ++++++++ SDK/include/Server/Components/Pawn/pawn.hpp | 8 ++++++++ SDK/include/Server/Components/Pickups/pickups.hpp | 8 ++++++++ .../Server/Components/Recordings/recordings.hpp | 8 ++++++++ SDK/include/Server/Components/TextDraws/textdraws.hpp | 8 ++++++++ .../Server/Components/TextLabels/textlabels.hpp | 8 ++++++++ .../Server/Components/Timers/Impl/timers_impl.hpp | 10 ++++++++++ SDK/include/Server/Components/Timers/timers.hpp | 8 ++++++++ SDK/include/Server/Components/Unicode/unicode.hpp | 8 ++++++++ SDK/include/Server/Components/Variables/variables.hpp | 8 ++++++++ .../Server/Components/Vehicles/Impl/vehicle_models.hpp | 8 ++++++++ .../Server/Components/Vehicles/vehicle_colours.hpp | 10 ++++++++++ .../Server/Components/Vehicles/vehicle_components.hpp | 8 ++++++++ .../Server/Components/Vehicles/vehicle_models.hpp | 8 ++++++++ .../Server/Components/Vehicles/vehicle_seats.hpp | 8 ++++++++ SDK/include/Server/Components/Vehicles/vehicles.hpp | 8 ++++++++ SDK/include/anim.hpp | 8 ++++++++ SDK/include/component.hpp | 8 ++++++++ SDK/include/core.hpp | 8 ++++++++ SDK/include/entity.hpp | 8 ++++++++ SDK/include/events.hpp | 8 ++++++++ SDK/include/gtaquat.hpp | 8 ++++++++ SDK/include/legacy_id_mapper.hpp | 10 ++++++++++ SDK/include/network.hpp | 8 ++++++++ SDK/include/player.hpp | 8 ++++++++ SDK/include/pool.hpp | 8 ++++++++ SDK/include/sdk.hpp | 8 ++++++++ SDK/include/types.hpp | 8 ++++++++ SDK/include/utils.hpp | 8 ++++++++ SDK/include/values.hpp | 8 ++++++++ 44 files changed, 359 insertions(+) diff --git a/SDK/include/Impl/events_impl.hpp b/SDK/include/Impl/events_impl.hpp index 1c4921be0..326b7ff4e 100644 --- a/SDK/include/Impl/events_impl.hpp +++ b/SDK/include/Impl/events_impl.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "../events.hpp" diff --git a/SDK/include/Impl/network_impl.hpp b/SDK/include/Impl/network_impl.hpp index 8eac50804..937ddc0d2 100644 --- a/SDK/include/Impl/network_impl.hpp +++ b/SDK/include/Impl/network_impl.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "../network.hpp" diff --git a/SDK/include/Impl/pool_impl.hpp b/SDK/include/Impl/pool_impl.hpp index 7384bd483..def7e37fb 100644 --- a/SDK/include/Impl/pool_impl.hpp +++ b/SDK/include/Impl/pool_impl.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "../pool.hpp" diff --git a/SDK/include/Server/Components/Actors/actors.hpp b/SDK/include/Server/Components/Actors/actors.hpp index f3be7a1c4..85bc2d8cd 100644 --- a/SDK/include/Server/Components/Actors/actors.hpp +++ b/SDK/include/Server/Components/Actors/actors.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Checkpoints/checkpoints.hpp b/SDK/include/Server/Components/Checkpoints/checkpoints.hpp index ebdfe7f93..232ee55ae 100644 --- a/SDK/include/Server/Components/Checkpoints/checkpoints.hpp +++ b/SDK/include/Server/Components/Checkpoints/checkpoints.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Classes/classes.hpp b/SDK/include/Server/Components/Classes/classes.hpp index 701e0105f..e53a1c75c 100644 --- a/SDK/include/Server/Components/Classes/classes.hpp +++ b/SDK/include/Server/Components/Classes/classes.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Console/console.hpp b/SDK/include/Server/Components/Console/console.hpp index 56d9989f5..f237e4690 100644 --- a/SDK/include/Server/Components/Console/console.hpp +++ b/SDK/include/Server/Components/Console/console.hpp @@ -1,4 +1,13 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once + #include #include diff --git a/SDK/include/Server/Components/CustomModels/custommodels.hpp b/SDK/include/Server/Components/CustomModels/custommodels.hpp index 46ac1f86d..7aaf8092f 100644 --- a/SDK/include/Server/Components/CustomModels/custommodels.hpp +++ b/SDK/include/Server/Components/CustomModels/custommodels.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Databases/databases.hpp b/SDK/include/Server/Components/Databases/databases.hpp index 13a542e24..21bbfdf6c 100644 --- a/SDK/include/Server/Components/Databases/databases.hpp +++ b/SDK/include/Server/Components/Databases/databases.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Dialogs/dialogs.hpp b/SDK/include/Server/Components/Dialogs/dialogs.hpp index 4757e3e13..0e7154da5 100644 --- a/SDK/include/Server/Components/Dialogs/dialogs.hpp +++ b/SDK/include/Server/Components/Dialogs/dialogs.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/GangZones/gangzones.hpp b/SDK/include/Server/Components/GangZones/gangzones.hpp index 26c1763bb..df7f10ff2 100644 --- a/SDK/include/Server/Components/GangZones/gangzones.hpp +++ b/SDK/include/Server/Components/GangZones/gangzones.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/LegacyConfig/legacyconfig.hpp b/SDK/include/Server/Components/LegacyConfig/legacyconfig.hpp index 013f8bad7..3f9a8505c 100644 --- a/SDK/include/Server/Components/LegacyConfig/legacyconfig.hpp +++ b/SDK/include/Server/Components/LegacyConfig/legacyconfig.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Menus/menus.hpp b/SDK/include/Server/Components/Menus/menus.hpp index ed9518b70..cf1a8498f 100644 --- a/SDK/include/Server/Components/Menus/menus.hpp +++ b/SDK/include/Server/Components/Menus/menus.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Objects/objects.hpp b/SDK/include/Server/Components/Objects/objects.hpp index 17bec8959..d1531aead 100644 --- a/SDK/include/Server/Components/Objects/objects.hpp +++ b/SDK/include/Server/Components/Objects/objects.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Pawn/Impl/pawn_impl.hpp b/SDK/include/Server/Components/Pawn/Impl/pawn_impl.hpp index eec60d2f1..ca9bc885c 100644 --- a/SDK/include/Server/Components/Pawn/Impl/pawn_impl.hpp +++ b/SDK/include/Server/Components/Pawn/Impl/pawn_impl.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once // This file should only be included in one place. diff --git a/SDK/include/Server/Components/Pawn/pawn.hpp b/SDK/include/Server/Components/Pawn/pawn.hpp index 4d96b52b0..32eb05ac2 100644 --- a/SDK/include/Server/Components/Pawn/pawn.hpp +++ b/SDK/include/Server/Components/Pawn/pawn.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Pickups/pickups.hpp b/SDK/include/Server/Components/Pickups/pickups.hpp index 38b828ce6..0918cf02a 100644 --- a/SDK/include/Server/Components/Pickups/pickups.hpp +++ b/SDK/include/Server/Components/Pickups/pickups.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Recordings/recordings.hpp b/SDK/include/Server/Components/Recordings/recordings.hpp index 1f997d725..f6ed754cc 100644 --- a/SDK/include/Server/Components/Recordings/recordings.hpp +++ b/SDK/include/Server/Components/Recordings/recordings.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/TextDraws/textdraws.hpp b/SDK/include/Server/Components/TextDraws/textdraws.hpp index d05018170..ee3321f8e 100644 --- a/SDK/include/Server/Components/TextDraws/textdraws.hpp +++ b/SDK/include/Server/Components/TextDraws/textdraws.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/TextLabels/textlabels.hpp b/SDK/include/Server/Components/TextLabels/textlabels.hpp index 2543927b9..c1e84ef02 100644 --- a/SDK/include/Server/Components/TextLabels/textlabels.hpp +++ b/SDK/include/Server/Components/TextLabels/textlabels.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Timers/Impl/timers_impl.hpp b/SDK/include/Server/Components/Timers/Impl/timers_impl.hpp index 8437eeb39..91c5a3594 100644 --- a/SDK/include/Server/Components/Timers/Impl/timers_impl.hpp +++ b/SDK/include/Server/Components/Timers/Impl/timers_impl.hpp @@ -1,3 +1,13 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + +#pragma once + #include "../timers.hpp" #include diff --git a/SDK/include/Server/Components/Timers/timers.hpp b/SDK/include/Server/Components/Timers/timers.hpp index c3c76e4da..f3704d2d9 100644 --- a/SDK/include/Server/Components/Timers/timers.hpp +++ b/SDK/include/Server/Components/Timers/timers.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Unicode/unicode.hpp b/SDK/include/Server/Components/Unicode/unicode.hpp index dd57f71f7..617550126 100644 --- a/SDK/include/Server/Components/Unicode/unicode.hpp +++ b/SDK/include/Server/Components/Unicode/unicode.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Variables/variables.hpp b/SDK/include/Server/Components/Variables/variables.hpp index 841f472f4..65e2e6cf4 100644 --- a/SDK/include/Server/Components/Variables/variables.hpp +++ b/SDK/include/Server/Components/Variables/variables.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/Server/Components/Vehicles/Impl/vehicle_models.hpp b/SDK/include/Server/Components/Vehicles/Impl/vehicle_models.hpp index 1295af310..330e28c84 100644 --- a/SDK/include/Server/Components/Vehicles/Impl/vehicle_models.hpp +++ b/SDK/include/Server/Components/Vehicles/Impl/vehicle_models.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "vehicles.hpp" diff --git a/SDK/include/Server/Components/Vehicles/vehicle_colours.hpp b/SDK/include/Server/Components/Vehicles/vehicle_colours.hpp index d8f802cf6..88112786c 100644 --- a/SDK/include/Server/Components/Vehicles/vehicle_colours.hpp +++ b/SDK/include/Server/Components/Vehicles/vehicle_colours.hpp @@ -1,3 +1,13 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + +#pragma once + #include namespace Impl diff --git a/SDK/include/Server/Components/Vehicles/vehicle_components.hpp b/SDK/include/Server/Components/Vehicles/vehicle_components.hpp index ede0972af..a462999d3 100644 --- a/SDK/include/Server/Components/Vehicles/vehicle_components.hpp +++ b/SDK/include/Server/Components/Vehicles/vehicle_components.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "vehicles.hpp" diff --git a/SDK/include/Server/Components/Vehicles/vehicle_models.hpp b/SDK/include/Server/Components/Vehicles/vehicle_models.hpp index 951c8a6cd..0a5ae8dc8 100644 --- a/SDK/include/Server/Components/Vehicles/vehicle_models.hpp +++ b/SDK/include/Server/Components/Vehicles/vehicle_models.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "vehicles.hpp" diff --git a/SDK/include/Server/Components/Vehicles/vehicle_seats.hpp b/SDK/include/Server/Components/Vehicles/vehicle_seats.hpp index 6336ef57e..15f5deedf 100644 --- a/SDK/include/Server/Components/Vehicles/vehicle_seats.hpp +++ b/SDK/include/Server/Components/Vehicles/vehicle_seats.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "vehicles.hpp" diff --git a/SDK/include/Server/Components/Vehicles/vehicles.hpp b/SDK/include/Server/Components/Vehicles/vehicles.hpp index 799b7a3df..d76bdfc00 100644 --- a/SDK/include/Server/Components/Vehicles/vehicles.hpp +++ b/SDK/include/Server/Components/Vehicles/vehicles.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/anim.hpp b/SDK/include/anim.hpp index b1c469648..a0cc4b6fb 100644 --- a/SDK/include/anim.hpp +++ b/SDK/include/anim.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "types.hpp" diff --git a/SDK/include/component.hpp b/SDK/include/component.hpp index bcf1a4c9b..6262ec72d 100644 --- a/SDK/include/component.hpp +++ b/SDK/include/component.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "types.hpp" diff --git a/SDK/include/core.hpp b/SDK/include/core.hpp index 212d3c7db..6c6426130 100644 --- a/SDK/include/core.hpp +++ b/SDK/include/core.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "component.hpp" diff --git a/SDK/include/entity.hpp b/SDK/include/entity.hpp index 87a6d107c..e911ed495 100644 --- a/SDK/include/entity.hpp +++ b/SDK/include/entity.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "component.hpp" diff --git a/SDK/include/events.hpp b/SDK/include/events.hpp index 96763c99c..519a622d0 100644 --- a/SDK/include/events.hpp +++ b/SDK/include/events.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "types.hpp" diff --git a/SDK/include/gtaquat.hpp b/SDK/include/gtaquat.hpp index d06f793c2..4cf299493 100644 --- a/SDK/include/gtaquat.hpp +++ b/SDK/include/gtaquat.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "types.hpp" diff --git a/SDK/include/legacy_id_mapper.hpp b/SDK/include/legacy_id_mapper.hpp index 8834362e5..67ccb5a71 100644 --- a/SDK/include/legacy_id_mapper.hpp +++ b/SDK/include/legacy_id_mapper.hpp @@ -1,3 +1,13 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + +#pragma once + // This class maps one set of IDs to another set. For example the gang zones internal pool is // infinite, but the external Pawn API has two separate finite pools - a global pool and a per- // player pool (technically that's `MAX_PLAYERS + 1` pools, not two). The SDK can simply create as diff --git a/SDK/include/network.hpp b/SDK/include/network.hpp index 37eba30f0..11a166b25 100644 --- a/SDK/include/network.hpp +++ b/SDK/include/network.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "component.hpp" diff --git a/SDK/include/player.hpp b/SDK/include/player.hpp index dd039185d..ff1611750 100644 --- a/SDK/include/player.hpp +++ b/SDK/include/player.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "anim.hpp" diff --git a/SDK/include/pool.hpp b/SDK/include/pool.hpp index e77e5364b..c365933b9 100644 --- a/SDK/include/pool.hpp +++ b/SDK/include/pool.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "entity.hpp" diff --git a/SDK/include/sdk.hpp b/SDK/include/sdk.hpp index a049ebca7..8b5e70eff 100644 --- a/SDK/include/sdk.hpp +++ b/SDK/include/sdk.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "core.hpp" diff --git a/SDK/include/types.hpp b/SDK/include/types.hpp index c340e6ce8..7c519c07c 100644 --- a/SDK/include/types.hpp +++ b/SDK/include/types.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include diff --git a/SDK/include/utils.hpp b/SDK/include/utils.hpp index 3107984a5..17987614f 100644 --- a/SDK/include/utils.hpp +++ b/SDK/include/utils.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "player.hpp" diff --git a/SDK/include/values.hpp b/SDK/include/values.hpp index d61659b2a..d64e91a6b 100644 --- a/SDK/include/values.hpp +++ b/SDK/include/values.hpp @@ -1,3 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + #pragma once #include "types.hpp" From 71d7a6890cfac0d4f8943ff486913683f52fce91 Mon Sep 17 00:00:00 2001 From: Alex Cole Date: Sun, 31 Dec 2023 17:40:35 +0100 Subject: [PATCH 2/3] Split generic types from the player structure. --- SDK/include/game_types.hpp | 448 +++++++++++++++++++++++++++++++++++++ SDK/include/player.hpp | 431 +---------------------------------- SDK/include/utils.hpp | 2 +- 3 files changed, 450 insertions(+), 431 deletions(-) create mode 100644 SDK/include/game_types.hpp diff --git a/SDK/include/game_types.hpp b/SDK/include/game_types.hpp new file mode 100644 index 000000000..569c2b73c --- /dev/null +++ b/SDK/include/game_types.hpp @@ -0,0 +1,448 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + * + * The original code is copyright (c) 2022, open.mp team and contributors. + */ + +#pragma once + +#include "anim.hpp" +#include "types.hpp" +#include "values.hpp" +#include +#include +#include +#include + +enum PlayerFightingStyle +{ + PlayerFightingStyle_Normal = 4, + PlayerFightingStyle_Boxing = 5, + PlayerFightingStyle_KungFu = 6, + PlayerFightingStyle_KneeHead = 7, + PlayerFightingStyle_GrabKick = 15, + PlayerFightingStyle_Elbow = 16 +}; + +enum PlayerState +{ + PlayerState_None = 0, + PlayerState_OnFoot = 1, + PlayerState_Driver = 2, + PlayerState_Passenger = 3, + PlayerState_ExitVehicle = 4, + PlayerState_EnterVehicleDriver = 5, + PlayerState_EnterVehiclePassenger = 6, + PlayerState_Wasted = 7, + PlayerState_Spawned = 8, + PlayerState_Spectating = 9 +}; + +enum PlayerWeaponSkill +{ + PlayerWeaponSkill_Pistol, + PlayerWeaponSkill_SilencedPistol, + PlayerWeaponSkill_DesertEagle, + PlayerWeaponSkill_Shotgun, + PlayerWeaponSkill_SawnOff, + PlayerWeaponSkill_SPAS12, + PlayerWeaponSkill_Uzi, + PlayerWeaponSkill_MP5, + PlayerWeaponSkill_AK47, + PlayerWeaponSkill_M4, + PlayerWeaponSkill_Sniper +}; + +enum PlayerSpecialAction +{ + SpecialAction_None, + SpecialAction_Duck, + SpecialAction_Jetpack, + SpecialAction_EnterVehicle, + SpecialAction_ExitVehicle, + SpecialAction_Dance1, + SpecialAction_Dance2, + SpecialAction_Dance3, + SpecialAction_Dance4, + SpecialAction_HandsUp = 10, + SpecialAction_Cellphone, + SpecialAction_Sitting, + SpecialAction_StopCellphone, + SpecialAction_Beer = 20, + Specialaction_Smoke, + SpecialAction_Wine, + SpecialAction_Sprunk, + SpecialAction_Cuffed, + SpecialAction_Carry, + SpecialAction_Pissing = 68 +}; + +enum PlayerAnimationSyncType +{ + PlayerAnimationSyncType_NoSync, + PlayerAnimationSyncType_Sync, + PlayerAnimationSyncType_SyncOthers +}; + +enum PlayerBulletHitType : uint8_t +{ + PlayerBulletHitType_None, + PlayerBulletHitType_Player = 1, + PlayerBulletHitType_Vehicle = 2, + PlayerBulletHitType_Object = 3, + PlayerBulletHitType_PlayerObject = 4, +}; + +enum BodyPart +{ + BodyPart_Torso = 3, + BodyPart_Groin, + BodyPart_LeftArm, + BodyPart_RightArm, + BodyPart_LeftLeg, + BodyPart_RightLeg, + BodyPart_Head +}; + +enum MapIconStyle +{ + MapIconStyle_Local, + MapIconStyle_Global, + MapIconStyle_LocalCheckpoint, + MapIconStyle_GlobalCheckpoint +}; + +enum PlayerClickSource +{ + PlayerClickSource_Scoreboard +}; + +enum PlayerSpectateMode +{ + PlayerSpectateMode_Normal = 1, + PlayerSpectateMode_Fixed, + PlayerSpectateMode_Side +}; + +enum PlayerCameraCutType +{ + PlayerCameraCutType_Cut, + PlayerCameraCutType_Move +}; + +enum PlayerMarkerMode +{ + PlayerMarkerMode_Off, + PlayerMarkerMode_Global, + PlayerMarkerMode_Streamed +}; + +enum LagCompMode +{ + LagCompMode_Disabled = 0, + LagCompMode_PositionOnly = 2, + LagCompMode_Enabled = 1 +}; + +enum PlayerWeapon +{ + PlayerWeapon_Fist, + PlayerWeapon_BrassKnuckle, + PlayerWeapon_GolfClub, + PlayerWeapon_NiteStick, + PlayerWeapon_Knife, + PlayerWeapon_Bat, + PlayerWeapon_Shovel, + PlayerWeapon_PoolStick, + PlayerWeapon_Katana, + PlayerWeapon_Chainsaw, + PlayerWeapon_Dildo, + PlayerWeapon_Dildo2, + PlayerWeapon_Vibrator, + PlayerWeapon_Vibrator2, + PlayerWeapon_Flower, + PlayerWeapon_Cane, + PlayerWeapon_Grenade, + PlayerWeapon_Teargas, + PlayerWeapon_Moltov, + PlayerWeapon_Colt45 = 22, + PlayerWeapon_Silenced, + PlayerWeapon_Deagle, + PlayerWeapon_Shotgun, + PlayerWeapon_Sawedoff, + PlayerWeapon_Shotgspa, + PlayerWeapon_UZI, + PlayerWeapon_MP5, + PlayerWeapon_AK47, + PlayerWeapon_M4, + PlayerWeapon_TEC9, + PlayerWeapon_Rifle, + PlayerWeapon_Sniper, + PlayerWeapon_RocketLauncher, + PlayerWeapon_HeatSeeker, + PlayerWeapon_FlameThrower, + PlayerWeapon_Minigun, + PlayerWeapon_Satchel, + PlayerWeapon_Bomb, + PlayerWeapon_SprayCan, + PlayerWeapon_FireExtinguisher, + PlayerWeapon_Camera, + PlayerWeapon_Night_Vis_Goggles, + PlayerWeapon_Thermal_Goggles, + PlayerWeapon_Parachute, + PlayerWeapon_Vehicle = 49, + PlayerWeapon_Heliblades, + PlayerWeapon_Explosion, + PlayerWeapon_Drown = 53, + PlayerWeapon_Collision, + PlayerWeapon_End +}; + +static const StringView PlayerWeaponNames[] = { + "Fist", + "Brass Knuckles", + "Golf Club", + "Nite Stick", + "Knife", + "Baseball Bat", + "Shovel", + "Pool Cue", + "Katana", + "Chainsaw", + "Dildo", + "Dildo", + "Vibrator", + "Vibrator", + "Flowers", + "Cane", + "Grenade", + "Teargas", + "Molotov Cocktail", // 18 + "Invalid", + "Invalid", + "Invalid", + "Colt 45", // 22 + "Silenced Pistol", + "Desert Eagle", + "Shotgun", + "Sawn-off Shotgun", + "Combat Shotgun", + "UZI", + "MP5", + "AK47", + "M4", + "TEC9", + "Rifle", + "Sniper Rifle", + "Rocket Launcher", + "Heat Seaker", + "Flamethrower", + "Minigun", + "Satchel Explosives", + "Bomb", + "Spray Can", + "Fire Extinguisher", + "Camera", + "Night Vision Goggles", + "Thermal Goggles", + "Parachute", // 46 + "Invalid", + "Invalid", + "Vehicle", // 49 + "Helicopter Blades", // 50 + "Explosion", // 51 + "Invalid", + "Drowned", // 53 + "Splat" +}; + +static const StringView BodyPartString[] = { + "invalid", + "invalid", + "invalid", + "torso", + "groin", + "left arm", + "right arm", + "left leg", + "right leg", + "head" +}; + +struct PlayerKeyData +{ + // todo fill with union + uint32_t keys; + int16_t upDown; + int16_t leftRight; +}; + +struct PlayerAnimationData +{ + uint16_t ID; + uint16_t flags; + + inline Pair name() const + { + return splitAnimationNames(ID); + } +}; + +struct PlayerSurfingData +{ + enum class Type + { + None, + Vehicle, + Object, + PlayerObject + } type; + int ID; + Vector3 offset; +}; + +/// Holds weapon slot data +struct WeaponSlotData +{ + uint8_t id; + uint32_t ammo; + + WeaponSlotData() + : id(0) + , ammo(0) + { + } + + WeaponSlotData(uint8_t id) + : id(id) + , ammo(0) + { + } + + WeaponSlotData(uint8_t id, uint32_t ammo) + : id(id) + , ammo(ammo) + { + } + + uint8_t slot() + { + static const uint8_t slots[] = { + 0, // 0 - Fist + 0, // 1 - Brass Knuckles + 1, // 2 - Golf Club + 1, // 3 - Nite Stick + 1, // 4 - Knife + 1, // 5 - Baseball Bat + 1, // 6 - Shovel + 1, // 7 - Pool Cue + 1, // 8 - Katana + 1, // 9 - Chainsaw + 10, // 10 - Dildo + 10, // 11 - Dildo + 10, // 12 - Vibrator + 10, // 13 - Vibrator + 10, // 14 - Flowers + 10, // 15 - Cane + 8, // 16 - Grenade + 8, // 17 - Teargas + 8, // 18 - Molotov Cocktail + INVALID_WEAPON_SLOT, // + INVALID_WEAPON_SLOT, // + INVALID_WEAPON_SLOT, // + 2, // 22 - Colt 45 + 2, // 23 - Silenced Pistol + 2, // 24 - Desert Eagle + 3, // 25 - Shotgun + 3, // 26 - Sawn-off Shotgun + 3, // 27 - Combat Shotgun + 4, // 28 - UZI + 4, // 29 - MP5 + 5, // 30 - AK47 + 5, // 31 - M4 + 4, // 32 - TEC9 + 6, // 33 - Rifle + 6, // 34 - Sniper Rifle + 7, // 35 - Rocket Launcher + 7, // 36 - Heat Seaker + 7, // 37 - Flamethrower + 7, // 38 - Minigun + 8, // 39 - Satchel Explosives + 12, // 40 - Bomb + 9, // 41 - Spray Can + 9, // 42 - Fire Extinguisher + 9, // 43 - Camera + 11, // 44 - Night Vision Goggles + 11, // 45 - Thermal Goggles + 11 // 46 - Parachute + }; + if (id >= GLM_COUNTOF(slots)) + { + return INVALID_WEAPON_SLOT; + } + return slots[id]; + } + + bool shootable() + { + return (id >= 22 && id <= 34) || id == 38; + } +}; + +/// An array of weapon slots +typedef StaticArray WeaponSlots; + +enum PlayerWeaponState : int8_t +{ + PlayerWeaponState_Unknown = -1, + PlayerWeaponState_NoBullets, + PlayerWeaponState_LastBullet, + PlayerWeaponState_MoreBullets, + PlayerWeaponState_Reloading +}; + +struct PlayerAimData +{ + Vector3 camFrontVector; + Vector3 camPos; + float aimZ; + float camZoom; + float aspectRatio; + PlayerWeaponState weaponState; + uint8_t camMode; +}; + +struct PlayerBulletData +{ + Vector3 origin; + Vector3 hitPos; + Vector3 offset; + uint8_t weapon; + PlayerBulletHitType hitType; + uint16_t hitID; +}; + +struct PlayerSpectateData +{ + enum ESpectateType + { + None, + Vehicle, + Player + }; + + bool spectating; + int spectateID; + ESpectateType type; +}; + +/// The player's name status returned when updating their name +enum EPlayerNameStatus +{ + Updated, ///< The name has successfully been updated + Taken, ///< The name is already taken by another player + Invalid ///< The name is invalid +}; + diff --git a/SDK/include/player.hpp b/SDK/include/player.hpp index ff1611750..83eb0ab66 100644 --- a/SDK/include/player.hpp +++ b/SDK/include/player.hpp @@ -14,6 +14,7 @@ #include "pool.hpp" #include "types.hpp" #include "values.hpp" +#include "game_types.hpp" #include #include #include @@ -23,439 +24,9 @@ struct IObject; struct IPlayerObject; struct IActor; -enum PlayerFightingStyle -{ - PlayerFightingStyle_Normal = 4, - PlayerFightingStyle_Boxing = 5, - PlayerFightingStyle_KungFu = 6, - PlayerFightingStyle_KneeHead = 7, - PlayerFightingStyle_GrabKick = 15, - PlayerFightingStyle_Elbow = 16 -}; - -enum PlayerState -{ - PlayerState_None = 0, - PlayerState_OnFoot = 1, - PlayerState_Driver = 2, - PlayerState_Passenger = 3, - PlayerState_ExitVehicle = 4, - PlayerState_EnterVehicleDriver = 5, - PlayerState_EnterVehiclePassenger = 6, - PlayerState_Wasted = 7, - PlayerState_Spawned = 8, - PlayerState_Spectating = 9 -}; - -enum PlayerWeaponSkill -{ - PlayerWeaponSkill_Pistol, - PlayerWeaponSkill_SilencedPistol, - PlayerWeaponSkill_DesertEagle, - PlayerWeaponSkill_Shotgun, - PlayerWeaponSkill_SawnOff, - PlayerWeaponSkill_SPAS12, - PlayerWeaponSkill_Uzi, - PlayerWeaponSkill_MP5, - PlayerWeaponSkill_AK47, - PlayerWeaponSkill_M4, - PlayerWeaponSkill_Sniper -}; - -enum PlayerSpecialAction -{ - SpecialAction_None, - SpecialAction_Duck, - SpecialAction_Jetpack, - SpecialAction_EnterVehicle, - SpecialAction_ExitVehicle, - SpecialAction_Dance1, - SpecialAction_Dance2, - SpecialAction_Dance3, - SpecialAction_Dance4, - SpecialAction_HandsUp = 10, - SpecialAction_Cellphone, - SpecialAction_Sitting, - SpecialAction_StopCellphone, - SpecialAction_Beer = 20, - Specialaction_Smoke, - SpecialAction_Wine, - SpecialAction_Sprunk, - SpecialAction_Cuffed, - SpecialAction_Carry, - SpecialAction_Pissing = 68 -}; - -enum PlayerAnimationSyncType -{ - PlayerAnimationSyncType_NoSync, - PlayerAnimationSyncType_Sync, - PlayerAnimationSyncType_SyncOthers -}; - -enum PlayerBulletHitType : uint8_t -{ - PlayerBulletHitType_None, - PlayerBulletHitType_Player = 1, - PlayerBulletHitType_Vehicle = 2, - PlayerBulletHitType_Object = 3, - PlayerBulletHitType_PlayerObject = 4, -}; - -enum BodyPart -{ - BodyPart_Torso = 3, - BodyPart_Groin, - BodyPart_LeftArm, - BodyPart_RightArm, - BodyPart_LeftLeg, - BodyPart_RightLeg, - BodyPart_Head -}; - -enum MapIconStyle -{ - MapIconStyle_Local, - MapIconStyle_Global, - MapIconStyle_LocalCheckpoint, - MapIconStyle_GlobalCheckpoint -}; - -enum PlayerClickSource -{ - PlayerClickSource_Scoreboard -}; - -enum PlayerSpectateMode -{ - PlayerSpectateMode_Normal = 1, - PlayerSpectateMode_Fixed, - PlayerSpectateMode_Side -}; - -enum PlayerCameraCutType -{ - PlayerCameraCutType_Cut, - PlayerCameraCutType_Move -}; - -enum PlayerMarkerMode -{ - PlayerMarkerMode_Off, - PlayerMarkerMode_Global, - PlayerMarkerMode_Streamed -}; - -enum LagCompMode -{ - LagCompMode_Disabled = 0, - LagCompMode_PositionOnly = 2, - LagCompMode_Enabled = 1 -}; - -enum PlayerWeapon -{ - PlayerWeapon_Fist, - PlayerWeapon_BrassKnuckle, - PlayerWeapon_GolfClub, - PlayerWeapon_NiteStick, - PlayerWeapon_Knife, - PlayerWeapon_Bat, - PlayerWeapon_Shovel, - PlayerWeapon_PoolStick, - PlayerWeapon_Katana, - PlayerWeapon_Chainsaw, - PlayerWeapon_Dildo, - PlayerWeapon_Dildo2, - PlayerWeapon_Vibrator, - PlayerWeapon_Vibrator2, - PlayerWeapon_Flower, - PlayerWeapon_Cane, - PlayerWeapon_Grenade, - PlayerWeapon_Teargas, - PlayerWeapon_Moltov, - PlayerWeapon_Colt45 = 22, - PlayerWeapon_Silenced, - PlayerWeapon_Deagle, - PlayerWeapon_Shotgun, - PlayerWeapon_Sawedoff, - PlayerWeapon_Shotgspa, - PlayerWeapon_UZI, - PlayerWeapon_MP5, - PlayerWeapon_AK47, - PlayerWeapon_M4, - PlayerWeapon_TEC9, - PlayerWeapon_Rifle, - PlayerWeapon_Sniper, - PlayerWeapon_RocketLauncher, - PlayerWeapon_HeatSeeker, - PlayerWeapon_FlameThrower, - PlayerWeapon_Minigun, - PlayerWeapon_Satchel, - PlayerWeapon_Bomb, - PlayerWeapon_SprayCan, - PlayerWeapon_FireExtinguisher, - PlayerWeapon_Camera, - PlayerWeapon_Night_Vis_Goggles, - PlayerWeapon_Thermal_Goggles, - PlayerWeapon_Parachute, - PlayerWeapon_Vehicle = 49, - PlayerWeapon_Heliblades, - PlayerWeapon_Explosion, - PlayerWeapon_Drown = 53, - PlayerWeapon_Collision, - PlayerWeapon_End -}; - -static const StringView PlayerWeaponNames[] = { - "Fist", - "Brass Knuckles", - "Golf Club", - "Nite Stick", - "Knife", - "Baseball Bat", - "Shovel", - "Pool Cue", - "Katana", - "Chainsaw", - "Dildo", - "Dildo", - "Vibrator", - "Vibrator", - "Flowers", - "Cane", - "Grenade", - "Teargas", - "Molotov Cocktail", // 18 - "Invalid", - "Invalid", - "Invalid", - "Colt 45", // 22 - "Silenced Pistol", - "Desert Eagle", - "Shotgun", - "Sawn-off Shotgun", - "Combat Shotgun", - "UZI", - "MP5", - "AK47", - "M4", - "TEC9", - "Rifle", - "Sniper Rifle", - "Rocket Launcher", - "Heat Seaker", - "Flamethrower", - "Minigun", - "Satchel Explosives", - "Bomb", - "Spray Can", - "Fire Extinguisher", - "Camera", - "Night Vision Goggles", - "Thermal Goggles", - "Parachute", // 46 - "Invalid", - "Invalid", - "Vehicle", // 49 - "Helicopter Blades", // 50 - "Explosion", // 51 - "Invalid", - "Drowned", // 53 - "Splat" -}; - -static const StringView BodyPartString[] = { - "invalid", - "invalid", - "invalid", - "torso", - "groin", - "left arm", - "right arm", - "left leg", - "right leg", - "head" -}; - -struct PlayerKeyData -{ - // todo fill with union - uint32_t keys; - int16_t upDown; - int16_t leftRight; -}; - -struct PlayerAnimationData -{ - uint16_t ID; - uint16_t flags; - - inline Pair name() const - { - return splitAnimationNames(ID); - } -}; - -struct PlayerSurfingData -{ - enum class Type - { - None, - Vehicle, - Object, - PlayerObject - } type; - int ID; - Vector3 offset; -}; - -/// Holds weapon slot data -struct WeaponSlotData -{ - uint8_t id; - uint32_t ammo; - - WeaponSlotData() - : id(0) - , ammo(0) - { - } - - WeaponSlotData(uint8_t id) - : id(id) - , ammo(0) - { - } - - WeaponSlotData(uint8_t id, uint32_t ammo) - : id(id) - , ammo(ammo) - { - } - - uint8_t slot() - { - static const uint8_t slots[] = { - 0, // 0 - Fist - 0, // 1 - Brass Knuckles - 1, // 2 - Golf Club - 1, // 3 - Nite Stick - 1, // 4 - Knife - 1, // 5 - Baseball Bat - 1, // 6 - Shovel - 1, // 7 - Pool Cue - 1, // 8 - Katana - 1, // 9 - Chainsaw - 10, // 10 - Dildo - 10, // 11 - Dildo - 10, // 12 - Vibrator - 10, // 13 - Vibrator - 10, // 14 - Flowers - 10, // 15 - Cane - 8, // 16 - Grenade - 8, // 17 - Teargas - 8, // 18 - Molotov Cocktail - INVALID_WEAPON_SLOT, // - INVALID_WEAPON_SLOT, // - INVALID_WEAPON_SLOT, // - 2, // 22 - Colt 45 - 2, // 23 - Silenced Pistol - 2, // 24 - Desert Eagle - 3, // 25 - Shotgun - 3, // 26 - Sawn-off Shotgun - 3, // 27 - Combat Shotgun - 4, // 28 - UZI - 4, // 29 - MP5 - 5, // 30 - AK47 - 5, // 31 - M4 - 4, // 32 - TEC9 - 6, // 33 - Rifle - 6, // 34 - Sniper Rifle - 7, // 35 - Rocket Launcher - 7, // 36 - Heat Seaker - 7, // 37 - Flamethrower - 7, // 38 - Minigun - 8, // 39 - Satchel Explosives - 12, // 40 - Bomb - 9, // 41 - Spray Can - 9, // 42 - Fire Extinguisher - 9, // 43 - Camera - 11, // 44 - Night Vision Goggles - 11, // 45 - Thermal Goggles - 11 // 46 - Parachute - }; - if (id >= GLM_COUNTOF(slots)) - { - return INVALID_WEAPON_SLOT; - } - return slots[id]; - } - - bool shootable() - { - return (id >= 22 && id <= 34) || id == 38; - } -}; - -/// An array of weapon slots -typedef StaticArray WeaponSlots; - -enum PlayerWeaponState : int8_t -{ - PlayerWeaponState_Unknown = -1, - PlayerWeaponState_NoBullets, - PlayerWeaponState_LastBullet, - PlayerWeaponState_MoreBullets, - PlayerWeaponState_Reloading -}; - -struct PlayerAimData -{ - Vector3 camFrontVector; - Vector3 camPos; - float aimZ; - float camZoom; - float aspectRatio; - PlayerWeaponState weaponState; - uint8_t camMode; -}; - -struct PlayerBulletData -{ - Vector3 origin; - Vector3 hitPos; - Vector3 offset; - uint8_t weapon; - PlayerBulletHitType hitType; - uint16_t hitID; -}; - -struct PlayerSpectateData -{ - enum ESpectateType - { - None, - Vehicle, - Player - }; - - bool spectating; - int spectateID; - ESpectateType type; -}; - struct IPlayerPool; struct IPlayer; -/// The player's name status returned when updating their name -enum EPlayerNameStatus -{ - Updated, ///< The name has successfully been updated - Taken, ///< The name is already taken by another player - Invalid ///< The name is invalid -}; - /// A player interface struct IPlayer : public IExtensible, public IEntity { diff --git a/SDK/include/utils.hpp b/SDK/include/utils.hpp index 17987614f..07422efef 100644 --- a/SDK/include/utils.hpp +++ b/SDK/include/utils.hpp @@ -7,7 +7,7 @@ */ #pragma once -#include "player.hpp" +#include "game_types.hpp" #define STRINGIFY(s) _STRINGIFY(s) #define _STRINGIFY(s) #s From 5b42dba8f0f0ff400b386a88dfd0cb8ebd33f6b3 Mon Sep 17 00:00:00 2001 From: Alex Cole Date: Sun, 31 Dec 2023 18:14:26 +0100 Subject: [PATCH 3/3] Fix formatting (meaning remove a single trailing `\n`...) --- SDK/include/game_types.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SDK/include/game_types.hpp b/SDK/include/game_types.hpp index 569c2b73c..c82a66fa0 100644 --- a/SDK/include/game_types.hpp +++ b/SDK/include/game_types.hpp @@ -445,4 +445,3 @@ enum EPlayerNameStatus Taken, ///< The name is already taken by another player Invalid ///< The name is invalid }; -