mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-23 21:05:58 +02:00
Server: lock ollies for a player
A lock tool like noclip and boosts. The player's game enforces it: the roster carries guest_ollies (protocol 53), and the jump hook gives a locked ollie no upward speed. Plugins get player.permissions.ollies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c02b4001a7
commit
67e8e439f7
18 files changed
+53
-33
No files matched your search
@@ -70,12 +70,12 @@ class ServerGame final : public Game {
|
||||
if (!multiplayer::individual_steam_id(player)) return std::nullopt;
|
||||
const auto locks = host_.player_locks(player);
|
||||
return Permissions{!(locks & lock_noclip), !(locks & lock_nobail), !(locks & lock_boosts), !(locks & lock_tuning),
|
||||
!(locks & lock_objects)};
|
||||
!(locks & lock_objects), !(locks & lock_ollies)};
|
||||
}
|
||||
std::string apply_permissions(std::string_view plugin, std::uint64_t player, const Permissions &p) override {
|
||||
if (!multiplayer::individual_steam_id(player)) return "not a player's SteamID64";
|
||||
const auto locks = static_cast<std::uint8_t>((p.noclip ? 0 : lock_noclip) | (p.nobail ? 0 : lock_nobail) | (p.boosts ? 0 : lock_boosts) |
|
||||
(p.tuning ? 0 : lock_tuning) | (p.objects ? 0 : lock_objects));
|
||||
(p.tuning ? 0 : lock_tuning) | (p.objects ? 0 : lock_objects) | (p.ollies ? 0 : lock_ollies));
|
||||
host_.set_locks(player, locks, "plugin " + std::string(plugin));
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user