nosoop / SM-TFOnTakeDamage

Hooks into TF2's slightly extended OnTakeDamage function.
GNU General Public License v3.0
7 stars 6 forks source link

Mitigate warning & compilation error on spcomp >=1.11 #10

Closed kir68k closed 10 months ago

kir68k commented 10 months ago

As issue https://github.com/nosoop/SM-TFOnTakeDamage/issues/7 points out, using spcomp >=1.11 breaks compilation of this plugin. All I did is remove the #tryinclude directive from class.ms.sp, like the plugin author pointed the issue author to do. This successfully makes the plugin compile on spcomp 1.11.0.6952 + ninja.

This should probably be merged as sourcemod 1.11 is the current stable version that people will download moving on.

I also added a return statement to tf_ontakedamage.sp's Internal_OnTakeDamageAlive, to suppress a warning from spcomp, which says a function needs to return something.

I tested this change with a compiled ontakedamage_forcecrits.sp, and the plugin works fine. If MRES_Ignored is the wrong statement, please correct it, or remove it entirely if the compiler warning is fine.

nosoop commented 10 months ago

I've said this in similar issues, but it's mainly an issue of compiler churn since it compiles fine in the revision it targets (though admittedly that isn't specified well in this project's documentation), and current versions of SourceMod itself has no problem loading plugins built against that — I have no interest in chasing compiler updates if they don't offer anything for the plugin.

But sure; I'll take this in. Thanks.