• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Small Code Snippets

Level 14
Joined
Jan 10, 2023
Messages
247
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