make enum style consistent
This commit is contained in:
@@ -62,7 +62,7 @@ void forward_subcommand(shared_ptr<Lobby> l, shared_ptr<Client> c,
|
||||
|
||||
// if the command is an Ep3-only command, make sure an Ep3 client sent it
|
||||
bool command_is_ep3 = (command & 0xF0) == 0xC0;
|
||||
if (command_is_ep3 && !(c->flags & ClientFlag::Episode3Games)) {
|
||||
if (command_is_ep3 && !(c->flags & ClientFlag::EPISODE_3_GAMES)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void forward_subcommand(shared_ptr<Lobby> l, shared_ptr<Client> c,
|
||||
if (!target) {
|
||||
return;
|
||||
}
|
||||
if (command_is_ep3 && !(target->flags & ClientFlag::Episode3Games)) {
|
||||
if (command_is_ep3 && !(target->flags & ClientFlag::EPISODE_3_GAMES)) {
|
||||
return;
|
||||
}
|
||||
send_command(target, command, flag, p, count * 4);
|
||||
@@ -82,7 +82,7 @@ void forward_subcommand(shared_ptr<Lobby> l, shared_ptr<Client> c,
|
||||
} else {
|
||||
if (command_is_ep3) {
|
||||
for (auto& target : l->clients) {
|
||||
if (!target || (target == c) || !(target->flags & ClientFlag::Episode3Games)) {
|
||||
if (!target || (target == c) || !(target->flags & ClientFlag::EPISODE_3_GAMES)) {
|
||||
continue;
|
||||
}
|
||||
send_command(target, command, flag, p, count * 4);
|
||||
@@ -182,8 +182,8 @@ static void process_subcommand_hit_by_monster(shared_ptr<ServerState>,
|
||||
return;
|
||||
}
|
||||
forward_subcommand(l, c, command, flag, p, count);
|
||||
if ((l->flags & LobbyFlag::CheatsEnabled) && c->infinite_hp) {
|
||||
send_player_stats_change(l, c, PlayerStatsChange::AddHP, 1020);
|
||||
if ((l->flags & LobbyFlag::CHEATS_ENABLED) && c->infinite_hp) {
|
||||
send_player_stats_change(l, c, PlayerStatsChange::ADD_HP, 1020);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,8 +195,8 @@ static void process_subcommand_use_technique(shared_ptr<ServerState>,
|
||||
return;
|
||||
}
|
||||
forward_subcommand(l, c, command, flag, p, count);
|
||||
if ((l->flags & LobbyFlag::CheatsEnabled) && c->infinite_hp) {
|
||||
send_player_stats_change(l, c, PlayerStatsChange::AddTP, 255);
|
||||
if ((l->flags & LobbyFlag::CHEATS_ENABLED) && c->infinite_hp) {
|
||||
send_player_stats_change(l, c, PlayerStatsChange::ADD_TP, 255);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ static void process_subcommand_use_item(shared_ptr<ServerState>,
|
||||
static void process_subcommand_open_shop_or_ep3_unknown(shared_ptr<ServerState> s,
|
||||
shared_ptr<Lobby> l, shared_ptr<Client> c, uint8_t command, uint8_t flag,
|
||||
const PSOSubcommand* p, size_t count) {
|
||||
if (l->flags & LobbyFlag::Episode3) {
|
||||
if (l->flags & LobbyFlag::EPISODE_3) {
|
||||
check_size(count, 2, 0xFFFF);
|
||||
forward_subcommand(l, c, command, flag, p, count);
|
||||
|
||||
@@ -877,7 +877,7 @@ static void process_subcommand_forward_check_size_game(shared_ptr<ServerState>,
|
||||
static void process_subcommand_forward_check_size_ep3_lobby(shared_ptr<ServerState>,
|
||||
shared_ptr<Lobby> l, shared_ptr<Client> c, uint8_t command, uint8_t flag,
|
||||
const PSOSubcommand* p, size_t count) {
|
||||
if (!(l->flags & LobbyFlag::Episode3) || l->is_game() || (p->byte[1] != count)) {
|
||||
if (!(l->flags & LobbyFlag::EPISODE_3) || l->is_game() || (p->byte[1] != count)) {
|
||||
return;
|
||||
}
|
||||
forward_subcommand(l, c, command, flag, p, count);
|
||||
|
||||
Reference in New Issue
Block a user