Patch to add a horn to your tank
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
Patch to add a horn to your tank
A while ago, there was some discussion about adding a horn to bzflag http://my.bzflag.org/bb/viewtopic.php?t=3785, so I wrote a patch for it.
This is a patch, so to use it you have to compile your own client. If you don't know how to do this, forget about trying it out (unless someone is kind enough to make a binary).
To honk your horn, just send someone, or everyone the message "*HONK*" (Go ahead and bind this to a key). If they've patched their client (Their clientquery should show something - if I didn't screw up), they should here a sound coming from your tank. If you patched your client, you should here your own horn.
To use this patch, download the patch and patch the source. Google is your friend. Build BZFlag, then copy the horn sound into the data directory. You can then test your client by going to an empty server and honking your horn.
The horn sound isn't great, so if you can get a better one, let me know.
Also, this doesn't require a server modification, It'll work anywhere.
I wrote this for 2.1.1, but it will probably work just as well with 2.0.8. EDIT: no it won't, use horn-2.0.8 instead.
Finally, feel free to leave any comments or criticism.
This is a patch, so to use it you have to compile your own client. If you don't know how to do this, forget about trying it out (unless someone is kind enough to make a binary).
To honk your horn, just send someone, or everyone the message "*HONK*" (Go ahead and bind this to a key). If they've patched their client (Their clientquery should show something - if I didn't screw up), they should here a sound coming from your tank. If you patched your client, you should here your own horn.
To use this patch, download the patch and patch the source. Google is your friend. Build BZFlag, then copy the horn sound into the data directory. You can then test your client by going to an empty server and honking your horn.
The horn sound isn't great, so if you can get a better one, let me know.
Also, this doesn't require a server modification, It'll work anywhere.
I wrote this for 2.1.1, but it will probably work just as well with 2.0.8. EDIT: no it won't, use horn-2.0.8 instead.
Finally, feel free to leave any comments or criticism.
- Attachments
-
- horn-2.0.8.patch.gz
- (1.17 KiB) Downloaded 82 times
-
- honk.wav.gz
- (106.29 KiB) Downloaded 97 times
-
- horn.patch.gz
- (1.25 KiB) Downloaded 90 times
Last edited by The Vaxorcist on Thu Mar 01, 2007 11:17 pm, edited 1 time in total.
Where's Darwin when you need him?
Lagger@Everywhere
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
what I'd like to know is how you expect to add a source code patch with out compiling.... as the act of compiling takes source code and converts it into a machine executable program.
The Vaxorcist
cross compiler won't cut it, it'll build an SDL build for windows. The normal windows builds don't use SDL.
The Vaxorcist
cross compiler won't cut it, it'll build an SDL build for windows. The normal windows builds don't use SDL.
JeffM
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
I was thinking of distributing a binary.JeffM2501 wrote:what I'd like to know is how you expect to add a source code patch with out compiling.... as the act of compiling takes source code and converts it into a machine executable program.
I was wondering about that.JeffM2501 wrote: The Vaxorcist
cross compiler won't cut it, it'll build an SDL build for windows. The normal windows builds don't use SDL.
Darn.
I still want a cross-compiler for other stuff though.
Where's Darwin when you need him?
Lagger@Everywhere
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
If you compile your own client, look up the patch command. Skip the rest.ducktape wrote:How do I add it? (in linux)The Vaxorcist wrote:If you use linux, you might be able to add it without compiling.
Which version of bzflag?
Which package did you install BZFlag with? Where is bzflag installed? (try running "which bzflag")
Do you have root access?
Thanks
Where's Darwin when you need him?
Lagger@Everywhere
- ducktape
- Private First Class
- Posts: 1206
- Joined: Sat Jul 01, 2006 2:06 am
- Location: Right Behind you!
Version: 2.0.8The Vaxorcist wrote:If you compile your own client, look up the patch command. Skip the rest.ducktape wrote:How do I add it? (in linux)The Vaxorcist wrote:If you use linux, you might be able to add it without compiling.
Which version of bzflag?
Which package did you install BZFlag with? Where is bzflag installed? (try running "which bzflag")
Do you have root access?
Thanks
I got bzflag in the Repository or Synaptic whatever.
its installed on all the acounts (is that what you mean?)
and yes I have root access.
thanks
-ducktape
-
- Private First Class
- Posts: 55
- Joined: Wed Sep 13, 2006 9:52 am
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
OK - I've made a linux binary.
Download the file from http://sonic.net/~mnfynan/bzflag.gz
uncompress it then run
as root (Those are backticks, btw, the key to the left of "1". also has tilde on it "~")
Then uncompress honk.wav (from my first post) and put it in /usr/share/bzflag/ (as root too)
You should be already to go.
BTW. You may want to make a backup of /usr/bin/bzflag or /usr/games/bzflag (I don't know which - it depends on your system) before you start. If your bzflag setup get's borked, It helps.
Download the file from http://sonic.net/~mnfynan/bzflag.gz
uncompress it then run
Code: Select all
cp /path/to/bzflag/file/you/just/decompressed `which bzflag`
Then uncompress honk.wav (from my first post) and put it in /usr/share/bzflag/ (as root too)
You should be already to go.
BTW. You may want to make a backup of /usr/bin/bzflag or /usr/games/bzflag (I don't know which - it depends on your system) before you start. If your bzflag setup get's borked, It helps.
Where's Darwin when you need him?
Lagger@Everywhere
- A Vicious Muffin
- Private First Class
- Posts: 534
- Joined: Sat Aug 26, 2006 12:25 am
- Location: Drury Lane
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
No - Only the receiver needs the patch. If you know that someone has the patch, you can honk your horn and they will hear it. You won't, however.
Now, what would be nice would be to change what is sent on the clientquery to include something that says that you can hear horns. PM or email me if you know how to change this.
Spam, etc.
The fact that it's a chat message is the beauty of it. It gets caught by the server spam kick and people without the patch have some idea what's going on - all without a server modification.
Now, what would be nice would be to change what is sent on the clientquery to include something that says that you can hear horns. PM or email me if you know how to change this.
Spam, etc.
The fact that it's a chat message is the beauty of it. It gets caught by the server spam kick and people without the patch have some idea what's going on - all without a server modification.
Where's Darwin when you need him?
Lagger@Everywhere