Add comp_thingsectorlight property - #2393
Conversation
2630802 to
9eccd58
Compare
9eccd58 to
06373f3
Compare
| BIND_COMP(comp_friendlyspawn, 1, "Things spawned by A_Spawn inherit friendliness of spawner"); | ||
| BIND_COMP(comp_voodooscroller, 0, "Voodoo dolls on slow scrollers move too slowly"); | ||
| BIND_COMP(comp_reservedlineflag, 1, "ML_RESERVED clears extended flags"); | ||
| BIND_COMP(comp_thingsectorlight, 0, "MObjs are lit according to the average of transferred light levels"); |
There was a problem hiding this comment.
"MObjs" is an internal term used in Doom code. I think we should use "things" here.
There was a problem hiding this comment.
Should the value of comp_thingsectorlight be set to 1 by default? I think most MBF/MBF21 maps were tested using this lighting model.
There was a problem hiding this comment.
The whole point of formalizing this is that mappers do not want that to be the default. I've discussed with a few mappers already and it seems exceedingly unlikely to cause any problems.
There was a problem hiding this comment.
"MObjs" is an internal term used in Doom code. I think we should use "things" here.
Fixed in 74dfc8f, using "sprite" instead, as I don't like the use of "thing" for the in-world entities, it's too generic of a word
| comp[i] = *demo_p++; | ||
|
|
||
| // comp_voodooscroller | ||
| if (count < MBF21_COMP_TOTAL - 2) |
There was a problem hiding this comment.
Why remove MBF21_COMP_TOTAL?
There was a problem hiding this comment.
Otherwise it'd have to be updated on any PR that adds new comp_* properties -- DSDA just uses the plain numbers as well. Is the readability hindered that much?
| : (thing->subsector->sector->lightlevel >> LIGHTSEGSHIFT); | ||
| int lightnum = comp[comp_thingsectorlight] | ||
| ? lightlevel_override | ||
| : thing->subsector->sector->lightlevel; |
There was a problem hiding this comment.
Whitespace formatting error?
Test WAD:
transferred_sector_light.zip
As per the discussions on the cross port server:
Alongside the fake heights transfer (242), Boom also introduced two separate line specials that individually transfer floor and ceiling light levels (213 and 261) onto a tagged sector. Normally, in Boom and CL9, any Things present in said sector will be lit according to the sector's normal light level. MBF, however, changed this behavior to decide a Thing's light level using the average of the transferred floor and ceiling light levels, instead.Not only is the MBF behavior is incredibly unpopular among mappers, the choice of which behavior is also widely inconsistent among ports. Some ports will only use the Boom behavior of defining a Thing's light level based on the true sector, some will only use the MBF behavior and others will only read the transferred floor light level, instead:
-complevel 09-- real sector light-complevel 11, or later -- average transferred lightboom2.02-- real sector lightcomplevel9, or later -- floor light onlyThis new compflag is an improvement on ID24 spec's
comp_thingfloorlight, designed to supersede it.