Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3677 closed enhancement (fixed)

[PATCH] Offline-hint not shown after diplomacy change

Reported by: elexis Owned by: elexis
Priority: Nice to Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

When a player goes offline, it will say "playername (Offline)" when you click its entities. But if there is a diplomacy change, the name will be overwritten again without the offline-hint.

Related #3253.

Attachments (2)

t3677.patch (880 bytes ) - added by Sergey Kushnirenko 8 years ago.
t3677.2.patch (942 bytes ) - added by Sergey Kushnirenko 8 years ago.

Download all attachments as: .zip

Change History (10)

by Sergey Kushnirenko, 8 years ago

Attachment: t3677.patch added

comment:1 by Sergey Kushnirenko, 8 years ago

Keywords: review patch added
Milestone: BacklogAlpha 20
Summary: Offline-hint not shown after diplomacy change[PATCH] Offline-hint not shown after diplomacy change

comment:2 by elexis, 8 years ago

Keywords: review removed

Thanks for the patch. You correctly identified the place where the bug occurs. Your patch might work, but you should not fix it in updateDiplomacy, since it is a problem with getPlayerData.

A player is online if and only if he's found in g_PlayerAssignments. So you can add the property "offline": false to the player object and set it to true in the g_PlayerAssignments loop of that function (unless I'm completely mistaken).

by Sergey Kushnirenko, 8 years ago

Attachment: t3677.2.patch added

comment:3 by Sergey Kushnirenko, 8 years ago

Keywords: review added; simple removed

comment:4 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 17760:

Don't lose the player-offline hint on diplomacy change. Patch by dalerank, fixes #3677.
Also remove the "disconnected" property which has apparently never been used since its introduction in r8525.

comment:5 by elexis, 8 years ago

Keywords: review removed

Thanks for the patch!

comment:6 by elexis, 8 years ago

In 17774:

Don't show the offline hint for AI-assigned players, refs #3677.

comment:7 by elexis, 8 years ago

In 17777:

Hide the offline-hint for gaia, refs #3677.
Inline some variables.

comment:8 by elexis, 8 years ago

In 17780:

Revert approach to detect offline players without remembering disconnect messages, since it doesn't work for entities of unassigned players. Refs #3677.
Remove unused AIManager.
Inline playerData.

Note: See TracTickets for help on using tickets.