CRASHFIX: hitting a sign while being in a party not as a party leader made the game crash

master
Zughy 2020-10-02 19:20:09 +02:00
parent 2cd06ba8cb
commit 4ddb1b5ca4
3 changed files with 8 additions and 1 deletions

View File

@ -119,6 +119,7 @@ Arena sign=Cartello dell'arena
[!] Only the party leader can enter the queue!=[!] Solo il capo gruppo può entrare nella coda!
[!] There is no enough space for the whole party!=[!] Non c'è abbastanza spazio per tutto il gruppo!
[!] There is no team with enough space for the whole party!=[!] Non c'è un team con abbastanza spazio per tutto il gruppo!
[!] Only the party leader can leave the queue!=[!] Solo il capo gruppo può abbandonare la coda!
[!] The arena is not enabled!=[!] L'arena non è attiva!
[!] The arena is already full!=[!] L'arena è già piena!
[!] The arena is loading, try again in a few seconds!=[!] L'arena è in caricamento, riprova tra qualche secondo!

View File

@ -123,6 +123,7 @@ Arena sign=
[!] The arena is already full!=
[!] The arena is loading, try again in a few seconds!=
[!] This minigame doesn't allow to join while in progress!=
[!] Only the party leader can leave the queue!=
Waiting for more players...=
The queue has been cancelled due to not enough players=
@1 seconds for the match to start=

View File

@ -54,7 +54,7 @@ signs_lib.register_sign("arena_lib:sign", {
if minetest.get_modpath("parties") and parties.is_player_in_party(p_name) and arena_lib.get_queueID_by_player(p_name) ~= arenaID then
-- se non si è il capo gruppo
if parties.get_party_leader(p_name) ~= p_name then
if not parties.is_player_party_leader(p_name) then
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] Only the party leader can enter the queue!")))
return end
@ -116,6 +116,11 @@ signs_lib.register_sign("arena_lib:sign", {
-- se è un party, rimuovo tutto il gruppo
if minetest.get_modpath("parties") and parties.is_player_in_party(p_name) then
-- (se è il capogruppo, sennò annullo)
if not parties.is_player_party_leader(p_name) then
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] Only the party leader can leave the queue!")))
return end
local party_members = parties.get_party_members(p_name)
sign_arena.players_amount = sign_arena.players_amount - #party_members