No one can remember the numbers for g_gametype, how about adding shorthand letters as equivalents.
ffa.....Free For All
cah.....Capture and Hold
bomb....Bomb & Defuse
ts......Team Survivor
ctf.....Capture the Flag
ftl.....Follow the Leader
lms.....Last Man Standing
tdm.....Team Death Match
jump....Jump
Advertisement
Page 1 of 1
Add mnemonics for g_gametype
#2
Posted 22 June 2014 - 09:49 AM
g_gametype is a CVAR whose value needs to match an ENUM (for easier comparison). If it would have been a command, one could have created a map (using a struct { char *name; int val; } and then given an input string, compute the output integer associated to the gametype. This is actually very possible using the CVAR instead of the number but there will be the need of tracking this CVAR (for changes) everywhere in the code (maybe not everywhere, but in a lot of places): fix 1 bug, introduce many more
Follow me: https://github.com/danielepantaleone
Page 1 of 1