Skip to content

Commit af3cd66

Browse files
committed
use better way of finding host
1 parent b01e68a commit af3cd66

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/networking/transmission.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ def get_host_pri() -> UObject:
192192
Returns:
193193
The hosts's PlayerReplicationInfo.
194194
"""
195-
# Seems they're always entry 0?
196-
return ENGINE.GetCurrentWorldInfo().GRI.PRIArray[0]
195+
return next(filter(lambda pri: pri.bIsPartyLeader, ENGINE.GetCurrentWorldInfo().GRI.PRIArray))
197196

198197

199198
@hook("WillowGame.WillowPlayerController:ClientMessage", immediately_enable=True)

0 commit comments

Comments
 (0)