Urban Terror Forums: Add mnemonics for g_gametype - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Add mnemonics for g_gametype Rate Topic: -----

#1 User is offline   thelionroars Icon

  •   QA member   
  • Account: thelionroars
  • Country:
  • Joined: 21-September 11
  • Posts: 853

Posted 22 June 2014 - 06:58 AM

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


#2 User is offline   Fenix Icon

  •   former FS member   
  • Account: fenix
  • Country:
  • Joined: 06-December 10
  • Posts: 425

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 Posted Image

#3 User is offline   YAY5637 Icon

  • Account: yay5637
  • Main tag: <PWC>
  • Country:
  • Joined: 28-February 10
  • Posts: 633

Posted 22 June 2014 - 10:01 PM

Call the command g_gamtypeeasy and make it assign the correct number to the existing g_gametype ;)

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Sponsored link
https://www.frozensand.com/


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942