Author Topic: "IF" in binds  (Read 6601 times)

Josellis

  • Posts: 43
  • Turrets: +0/-0
    • http://planeart.byethost7.com
"IF" in binds
« on: November 27, 2007, 05:34:16 am »
I was wondering if it is possible to use things like "IF" in the autoexec.cfg and other .cfg files executed.

A few examples would be:
Code: [Select]
IF devmap=1
{
      exec cheat.cfg
}

IF team=humans
{
      exec human.cfg
}

IF team=aliens
{
      exec alien.cfg
}

If the "IF" command is available, what format is it in, and how can it check the condition?

Another thing is to see what are the ways the conditions can be compared.
Code: [Select]
IF cg_wwToggle=1 //if it is equal to this
IF cg_wwToggle!=1 //if it is NOT equal to this
IF cg_wwToggle<1 //if it is smaller then this
IF cg_wwToggle>0 //if it is bigger then this
IF cg_wwToggl=<1 //if it is equal or smaller then 1
IF cg_wwToggle=>0 //if it is equal or bigger then 1


Thank you

Illuminatio

  • Posts: 8
  • Turrets: +2/-2
Re: "IF" in binds
« Reply #1 on: November 27, 2007, 05:38:58 am »
There is a client patch by WireDDD which adds "/if, /concat, and /math".

"Dominus Illuminatio Mea."

Bunneh

  • Posts: 105
  • Turrets: +18/-96
Re: "IF" in binds
« Reply #2 on: November 29, 2007, 02:33:22 am »
How do you go about installing this patch? I Googled for "Wireddd Tremulous" and got his site, which would not open. FireFox kept sending a "x is taking too long to connect" message and I couldn't get anything, but MG's patch tracker had the file in .patch form. I downloaded it, and can't figure out how to set it up.

How do I install this? I'm running the Tremulous .exe from trem.tjw.org, so I don't know if it's compatible. This .exe says it was last modified in '06, so it seems out of date. Do I have to compile new source with this .patch included in it, or is there something I can use to install it to the existing .exe?

Thanks for any help.
Bunneh: I'll admit that I really love attentionwhoring like this.
Plague Bringer: Here's some attention for you. Look! I've got a video of Bunneh in his true form running around in public, molesting random people.
http://www.youtube.com/watch?v=ZONFBqPosXw
Bunneh, you should be ashamed.
Bunneh: No, PB, that's not me. I'ma pink Bunneh. Bluebunneh is the stupid icecream faggot down the street.

http://tremulous.net/forum/index.php?topic=6840.0

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: "IF" in binds
« Reply #3 on: November 29, 2007, 04:02:06 am »
try the MG patch tracker. They have a copy of it.
mercenariesguild.net/patches

∧OMG ENTROPY∧

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: "IF" in binds
« Reply #4 on: November 29, 2007, 04:59:57 pm »
Do I have to compile new source with this .patch included in it
Yeah, I'm afraid you do. Try:

http://tremulous.net/forum/index.php?topic=3408.0

if you have a free evening :)
benmachine

Bunneh

  • Posts: 105
  • Turrets: +18/-96
Re: "IF" in binds
« Reply #5 on: November 29, 2007, 11:06:44 pm »
Oh joy. I just so happen to have NOTHING to do tonight.

Time to uber-geek out on teh famalee Pee-See!

EDIT:

Okay, I've got the code downloaded using the methods listed there, Step 9, to be exact.

Now, how do I apply the .patch files? Just open the downloaded code with Notepad and add some copy/paste lines?

EDIT 2:

Okay. Found the correct location for this particular patch, svn/qcommon/cmd.c, so where in that file do I put the new code? Just append it to the end of the file?
« Last Edit: November 29, 2007, 11:34:15 pm by Bunneh »
Bunneh: I'll admit that I really love attentionwhoring like this.
Plague Bringer: Here's some attention for you. Look! I've got a video of Bunneh in his true form running around in public, molesting random people.
http://www.youtube.com/watch?v=ZONFBqPosXw
Bunneh, you should be ashamed.
Bunneh: No, PB, that's not me. I'ma pink Bunneh. Bluebunneh is the stupid icecream faggot down the street.

http://tremulous.net/forum/index.php?topic=6840.0

Death_First

  • Posts: 141
  • Turrets: +4/-6
Re: "IF" in binds
« Reply #6 on: December 01, 2007, 12:26:23 am »
to patch a file

open msys

cd to the location of the code
(cd Tremsorce)
run cmd

patch -p0 < (patchfile)

Bunneh

  • Posts: 105
  • Turrets: +18/-96
Re: "IF" in binds
« Reply #7 on: December 01, 2007, 02:00:23 am »
to patch a file

open msys

cd to the location of the code
(cd Tremsorce)
run cmd

patch -p0 < (patchfile)

O RLY?!

That's so simple, I'm not surprised I didn't figure it out...let me test it and see if it proceeds smoothly.
Bunneh: I'll admit that I really love attentionwhoring like this.
Plague Bringer: Here's some attention for you. Look! I've got a video of Bunneh in his true form running around in public, molesting random people.
http://www.youtube.com/watch?v=ZONFBqPosXw
Bunneh, you should be ashamed.
Bunneh: No, PB, that's not me. I'ma pink Bunneh. Bluebunneh is the stupid icecream faggot down the street.

http://tremulous.net/forum/index.php?topic=6840.0

Nux

  • Posts: 1778
  • Turrets: +258/-69
Re: "IF" in binds
« Reply #8 on: December 01, 2007, 09:25:14 pm »
I'm interested to know what values you can lift from the game into your conditional in this patch.