Skip to content

Commit

Permalink
fix sound origin for huge levels (taken from PrBoom+) (#1815)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfomin authored Aug 2, 2024
1 parent 1a3addd commit b2ee08b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,10 +1297,10 @@ int P_GroupLines (void)
sector->lines -= sector->linecount;

// set the degenmobj_t to the middle of the bounding box
sector->soundorg.x = (sector->blockbox[BOXRIGHT] +
sector->blockbox[BOXLEFT])/2;
sector->soundorg.y = (sector->blockbox[BOXTOP] +
sector->blockbox[BOXBOTTOM])/2;
sector->soundorg.x =
sector->blockbox[BOXRIGHT] / 2 + sector->blockbox[BOXLEFT] / 2;
sector->soundorg.y =
sector->blockbox[BOXTOP] / 2 + sector->blockbox[BOXBOTTOM] / 2;

sector->soundorg.thinker.function.p1 = (actionf_p1)P_DegenMobjThinker;

Expand Down

0 comments on commit b2ee08b

Please sign in to comment.