Skip to content

Commit 568829d

Browse files
authored
Merge pull request #187 from Chrezm/5.0.0-post2-dev
5.0.0-post2
2 parents c0b437a + c3084c4 commit 568829d

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,3 +882,9 @@
882882

883883
## 221204a (5.0.0-post1)
884884
* Fixed players being unable to play a track via the music list if it is a track of their hub music list but not of their personal music list
885+
886+
## 221208a (5.0.0-post2)
887+
* Fixed /randommusic failing halfway through
888+
* Fixed games not asserting properties of player groups after mutator calls
889+
* Fixed trials being internally initialized incorrectly, which prevented commands such as /nsd_accept and /nsd_reject from running properly
890+
* Fixed players using clients that do not have a HIDE_CHARACTER argument in inbound IC messages (e.g. AO 2.10) occassionally failing to receive messages if they are in first person mode or not in forward sprites mode

server/client_manager.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ def send_ooc_others(
324324

325325
def send_ic(
326326
self,
327-
params: List = None,
328-
sender: ClientManager.Client = None,
327+
params: Dict[str, Any] = None,
328+
sender: Union[ClientManager.Client, None] = None,
329329
bypass_text_replace: bool = False,
330330
bypass_deafened_starters: bool = False,
331331
use_last_received_sprites: bool = False,
@@ -509,7 +509,9 @@ def pop_if_there(dictionary, argument):
509509
pargs['pos'] = last_args['pos']
510510
pargs['anim_type'] = last_args['anim_type']
511511
pargs['flip'] = last_args['flip']
512-
pargs['hide_character'] = last_args['hide_character']
512+
# Only DRO 1.1.0+ has this
513+
if self.packet_handler.HAS_HIDE_CHARACTER_AS_MS_ARGUMENT:
514+
pargs['hide_character'] = last_args['hide_character']
513515

514516
# Regardless of anything, pairing is visually canceled while in first person
515517
# so set them to default values
@@ -644,8 +646,8 @@ def pop_if_there(dictionary, argument):
644646

645647
def send_ic_others(
646648
self,
647-
params: List = None,
648-
sender: ClientManager.Client = None,
649+
params: Dict[str, Any] = None,
650+
sender: Union[ClientManager.Client, None] = None,
649651
bypass_text_replace: bool = False,
650652
bypass_deafened_starters: bool = False,
651653
use_last_received_sprites: bool = False,

server/clients.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def __eq__(self, other):
4040
ALLOWS_INVISIBLE_BLANKPOSTS = True
4141
REPLACES_BASE_OPUS_FOR_MP3 = False
4242
ALLOWS_CHAR_LIST_RELOAD = True
43+
HAS_HIDE_CHARACTER_AS_MS_ARGUMENT = True
4344

4445
DECRYPTOR_OUTBOUND = [
4546
('key', 34), # 0
@@ -359,6 +360,7 @@ class ClientDRO1d0d0(DefaultDROProtocol):
359360
HAS_JOINED_AREA = False
360361
REPLACES_BASE_OPUS_FOR_MP3 = True
361362
ALLOWS_CHAR_LIST_RELOAD = False
363+
HAS_HIDE_CHARACTER_AS_MS_ARGUMENT = False
362364

363365
MS_INBOUND = [
364366
('msg_type', ArgType.STR), # 0
@@ -411,6 +413,7 @@ class ClientAO2d10(DefaultDROProtocol):
411413
ALLOWS_INVISIBLE_BLANKPOSTS = False
412414
REPLACES_BASE_OPUS_FOR_MP3 = True
413415
ALLOWS_CHAR_LIST_RELOAD = True
416+
HAS_HIDE_CHARACTER_AS_MS_ARGUMENT = False
414417

415418
MS_INBOUND = [
416419
('msg_type', ArgType.STR), # 0

server/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7476,7 +7476,7 @@ def ooc_cmd_randommusic(client: ClientManager.Client, arg: str):
74767476

74777477
# Find all music tracks
74787478
music_names = list()
7479-
music_list = client.music_manager.get_music_data()
7479+
music_list = client.music_manager.get_music()
74807480

74817481
for item in music_list:
74827482
songs = item['songs']

server/game_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,9 @@ def _check_structure(self):
18631863
self._timer_manager._check_structure()
18641864
self._team_manager._check_structure()
18651865

1866+
# 5.
1867+
super()._check_structure()
1868+
18661869
def __str__(self):
18671870
"""
18681871
Return a string representation of this game.

server/hub_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ def __init__(
18981898
self.area_manager = AreaManager(server, hub=self)
18991899
self.load_areas()
19001900

1901-
self.trial_manager = TrialManager(self)
1901+
self.trial_manager = TrialManager(server)
19021902

19031903
self._password = str(secrets.randbelow(9000) + 1000) # Cute trick to get 4-digit number
19041904

server/tsuserver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def __init__(self, client_manager_type: Type[ClientManager] = None):
6767
self.release = 5
6868
self.major_version = 0
6969
self.minor_version = 0
70-
self.segment_version = 'post1'
71-
self.internal_version = '221204a'
70+
self.segment_version = 'post2'
71+
self.internal_version = '221208a'
7272
version_string = self.get_version_string()
7373
self.software = 'TsuserverDR {}'.format(version_string)
7474
self.version = 'TsuserverDR {} ({})'.format(version_string, self.internal_version)

0 commit comments

Comments
 (0)