Page 1 of 1

[level refactor]compat_limitpain no longer checkable

PostPosted: Wed Feb 06, 2019 12:09 pm
by Major Cooke
I was using compat_limitpain in order to customize the behavior of A_PainShootSkull while also maintaining respect for the compatibility option.

But since this was made into a private function, this effectively breaks D4D so it cannot even start. I could easily remove it but that might be breaking an option someone may really be wanting.

This issue does not occur in the master branch.

The reason why I made an alternative function is because the lost souls explode when they impact any enemy and I wanted to attribute the monster responsible being the pain elemental, allowing them to infight with other monsters. I.e. the lost soul attributes the pain elemental as the one dishing out the damage, the source actor.

Re: [level refactor]compat_limitpain no longer checkable

PostPosted: Wed Feb 06, 2019 12:22 pm
by Graf Zahl
Hm, I never considered that defining the function would hide the CVAR.

The reason for the change is that due to the level refactor the CVAR can no longer reflect a map specific setting on top of the CVAR itself, either in MAPINFO or through compatibility settings. Ultimately the entire implementation was a bad hack and just bit me in the ass when it stopped working.

Re: [level refactor]compat_limitpain no longer checkable

PostPosted: Sat Feb 09, 2019 3:19 am
by Graf Zahl
I couldn't fix this in a way that won't require code changes, but those access functions are gone now. Instead you can access the current level's compatibility flags as a single integer variable and get the flags as bit masks.

Use of the CVARs is explicitly discouraged because those only reflect the user's setting, not the map's.

Re: [level refactor]compat_limitpain no longer checkable

PostPosted: Sat Feb 09, 2019 7:54 am
by Major Cooke
Understood. Thanks!