Cacodemon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Merged sectors and sound
 
Author
All times are GMT. The time now is 10:56. Post New Thread    Post A Reply
Memfis
Forum Legend


Posts: 5498
Registered: 04-07


Suppose I have two (or more) sectors and I merge them (so they become one sector). If that sector starts to move, which part of it will make a sound? Is it nodebuilder dependant? Does it work the same way in Boom and Vanilla?

Old Post 02-24-13 19:49 #
Memfis is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11037
Registered: 07-07



Memfis said:
Suppose I have two (or more) sectors and I merge them (so they become one sector). If that sector starts to move, which part of it will make a sound? Is it nodebuilder dependant? Does it work the same way in Boom and Vanilla?


The sound originates from the center of the sector (as computed by being in the center of the sector's bounding box). This is a special dummy mobj called soundorg whose position is computed during map initialization, in p_setup.c

code:
// // P_GroupLines // Builds sector line lists and subsector sector numbers. // Finds block bounding boxes for sectors. // void P_GroupLines (void) { <snip lots of code> // set the degenmobj_t to the middle of the bounding box sector->soundorg.x = (bbox[BOXRIGHT]+bbox[BOXLEFT])/2; sector->soundorg.y = (bbox[BOXTOP]+bbox[BOXBOTTOM])/2; <snip more code> }



It's not changed in Boom. However, it's changed in ZDoom, which instead uses in real time the point in the sector which is the closest to the camera position; unless you use the compat_sectorsounds compatibility option. (You can add it to MAPINFO.) This option was added so that Suspended in Dusk's silent sector movement be silent again.

Old Post 02-24-13 20:15 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Memfis
Forum Legend


Posts: 5498
Registered: 04-07


Interesting, I thought it was related to the lowest linedef number. Thanks!

Old Post 02-24-13 20:22 #
Memfis is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 10:56. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Merged sectors and sound

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.