• 🏆 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!

Small Code Snippets

Level 12
Joined
Jan 10, 2023
Messages
191
I reached out to someone and they shared this, maybe they even c&p'ed your post.

It is clearly more useful, so obviously my snippet here is obsolete-on-arrival.

I am going to use my snippet, because in my case I don't care if it is a replay, although I did notice that this was considered useful for the sake of debugging via replays sent from players to the map owner, but (please correct me if I'm wrong here) as far as I know, if I use a constant then the function will be microscopically faster, also I used a boolean rather than an integer because I don't care about replays (I also have no interest in debugging this way).

so instead of asking:
if GameStatus == ONLINE...
I can ask:
If ONLINE_GAME...

I suppose it isn't a condition that should ever need speed being that it is a constant, but as long as this method is considered practical and safe, I will use mine that is based off (I assume) the library you've mentioned.
 
Top