[level refactor]compat_limitpain no longer checkable

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [level refactor]compat_limitpain no longer checkable

Re: [level refactor]compat_limitpain no longer checkable

by Major Cooke » Sat Feb 09, 2019 6:54 am

Understood. Thanks!

Re: [level refactor]compat_limitpain no longer checkable

by Graf Zahl » Sat Feb 09, 2019 2:19 am

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

by Graf Zahl » Wed Feb 06, 2019 11:22 am

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.

[level refactor]compat_limitpain no longer checkable

by Major Cooke » Wed Feb 06, 2019 11:09 am

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.

Top