Skip to content

Commit

Permalink
fix map display after party window opened in multiplayer games
Browse files Browse the repository at this point in the history
  • Loading branch information
soarqin committed May 10, 2022
1 parent 4f4e1b2 commit fbe6c26
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contrib/zhCN/D2RMH.ini
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ msg_position = 0.95,0.25,2
; {gamename} 当前游戏房间名
; {gamepass} 当前游戏房间密码
; {region} 游戏服务器所处区域代码
; {serverip} 游戏服务器IP地址
; {season} 当前游戏赛季
text_panel_pattern =
;text_panel_pattern = {duration}
;text_panel_pattern = {difficulty}{n}{act}-{mapname}{n}{time}{n}{duration}
;text_panel_pattern = {gamename}{n}{gamepass}{n}{region} {serverip}{n}{difficulty}{n}{act}-{mapname}{n}{time}{n}{duration}
;text_panel_pattern = {gamename}{n}{gamepass}{n}{region} {season}{n}{difficulty}{n}{act}-{mapname}{n}{time}{n}{duration}

; 面板位置, 同 `msg_position`
text_panel_position = 0.93,0.015,2
Expand Down
5 changes: 4 additions & 1 deletion doc/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# v0.10.1
* fix map display after party window opened in multiplayer games

# v0.10.0
* (#102,#105,#106) update codes to support v1.2.69324
* (#84) add game room name/password, server region and season patterns to `text_panel_pattern`
* (#97) don't draw other players not in same ACT
* change `full_line` to `line_style` in D2RMH.ini, and you can set it to 2 for displaying walkable path to target through new path finding functions, please not this would increase CPU usage.
* change `full_line` to `line_style` in D2RMH.ini, and you can set it to 2 for displaying walkable path to target through new path finding functions, please not this would increase CPU usage.
* refactoring TTF rendering to fix glitches on text display
* add `object_size_minimal` to D2RMH.ini for minimal size of object quads
* add `draw_on_game_bar` to D2RMH.ini
Expand Down
6 changes: 4 additions & 2 deletions src/d2r/d2rdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,10 @@ struct RosterUnit {
uint16_t unk6[3]; // BA
uint64_t unk7[7]; // C0
uint8_t unk8[7]; // F8
char utf8name[65]; // FF
uint64_t unk9; // 0x140
char utf8name[49]; // FF
uint64_t unk9; // 0x130
uint32_t order; // 0x138
uint32_t unk10[3]; // 0x13C
uint64_t nextPtr; // 0x148
};

Expand Down
4 changes: 3 additions & 1 deletion src/d2r/processdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ Skill *ProcessData::getSkill(uint16_t id) {
void ProcessData::readRosters() {
uint64_t addr;
READ(rosterDataAddr, addr);
bool first = true;
while (addr) {
RosterUnit mem;
if (!READ(addr, mem)) { break; }
Expand All @@ -369,9 +370,10 @@ void ProcessData::readRosters() {
p.level = mem.level;
p.party = mem.partyId;
memcpy(p.name, mem.name, 16);
if (/* Battle.Net */ mem.utf8name[0] || /* Single-player */ (!mem.posX && mem.unk9 == uint64_t(-1))) {
if (first) {
focusedPlayer = mem.unitId;
currPlayer = &p;
first = false;
} else {
p.posX = mem.posX;
p.posY = mem.posY;
Expand Down

0 comments on commit fbe6c26

Please sign in to comment.