VSH2-Devs / Vs-Saxton-Hale-2

VSH2 is a rewrite of the original VSH, meant to combine the best of VSH and FF2.
https://forums.alliedmods.net/showthread.php?t=286701
50 stars 15 forks source link

Current include behavior relies on bug in the compiler #177

Closed Pheubel closed 3 years ago

Pheubel commented 3 years ago

The include behavior in modules/bosses.sp and modules/handler.sp is based on the current way spcomp handles include paths. However due to a bug it would not properly set the relative path to the current file on non linux platforms.

This bug has been addressed in this PR, as a result the relative path for including will be based on the directory of the file, like it would be if it were to be compiled from linux.

what would have to change:

For modules/bosses.sp the changed file would look like this:

/** So before we add the bosses,
 * we gotta include the *base classes* for the bosses and players.
 * After that, we add in the *forwards* for the core plugin to call.
 * After base player classes, we can include the gamemode class.
 */
#include "base.sp"
#include "forwards.sp"
#include "gamemode.sp"

/** --- DO NOT DELETE/MODIFY ANYTHING BEFORE THIS LINE --- */

#include "bosses/hale.sp"
#include "bosses/vagineer.sp"
#include "bosses/cbs.sp"
#include "bosses/hhh.sp"
#include "bosses/bunny.sp"
//#include "bosses/plague.sp"

For modules/handler.sp we only have to change line 7 to:

#include "bosses.sp"

This change will make cross platform development more consistent, however this will most likely add a higher minimal development version for building on windows.

assyrianic commented 3 years ago

with the new merge, is this issue resolved?

Pheubel commented 3 years ago

yeah, i gave it a spin and it works. As a side effect, it can now be build on linux with sourcemod 1.10 :)

(sourcemod 1.11 seems to currently have some funky behavior with value macros relying on other value macros, if i change this to the would've been value it works just fine. so i assume it is just a bug that accidentally got introduced somewhere along the lines.)

side note: it might be useful if new collaborators that work from windows know that they need to use SM 1.11, as i don't know if this fix will be back-ported to 1.10

Pheubel commented 3 years ago

I forgot that this also affected freak fortress 2, it was pretty sloppy of me to not take it into account. #181 should do the trick