• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Get patch version?

Status
Not open for further replies.
I doubt it, but is there a way to get the patch number in vJASS? Or some way to test if the user is running 1.31, like some constant bj variable that has changed value since 1.31?

Specifically, it would like to be able to set SFX roll/yaw depending on the game's version, because they were inverted in 1.31.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Specifically, it would like to be able to set SFX roll/yaw depending on the game's version, because they were inverted in 1.31.
I would suggest just supporting the latest version. This would simplify the code in the long run. Especially since the roll and yaw natives are relatively new anyway.

Otherwise you will need to use an adapter function which provides the API meaning of the current patch but uses the above referenced code to select how parameters are passed to the native.

With future patches and Lua one could replace the native declarations of functions with the adaptor functions to provide such backwards compatibility support entirely transparently. However this is not helpful in this case.
 
Status
Not open for further replies.
Top