• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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,208
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