Patch to add a horn to your tank

Make suggestions for improving one of the best games on the net!
Post Reply
User avatar
The Vaxorcist
Private First Class
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

Post by The Vaxorcist »

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.
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.
Image
Where's Darwin when you need him?

Lagger@Everywhere
User avatar
Grace F
Sergeant
Sergeant
Posts: 978
Joined: Sun Oct 01, 2006 12:29 pm
Location: Adelaide, AUSTRALIA

Post by Grace F »

lol a horn? :D

hEhE dats kewlz! :) I would try it out only i dont know how to compile my own client :P

Oh well...
Image
Image
User avatar
The Vaxorcist
Private First Class
Private First Class
Posts: 134
Joined: Wed Mar 23, 2005 10:28 am
Location: Santa Rosa, CA

Post by The Vaxorcist »

If you use linux, you might be able to add it without compiling. If you are using windows, I don't have the necessary setup. Sorry. I need to get around to setting up a cross compiler one of these days though.
Image
Where's Darwin when you need him?

Lagger@Everywhere
User avatar
ducktape
Private First Class
Private First Class
Posts: 1206
Joined: Sat Jul 01, 2006 2:06 am
Location: Right Behind you!

Post by ducktape »

The Vaxorcist wrote:If you use linux, you might be able to add it without compiling.
How do I add it? (in linux)
Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

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.
ImageJeffM
User avatar
The Vaxorcist
Private First Class
Private First Class
Posts: 134
Joined: Wed Mar 23, 2005 10:28 am
Location: Santa Rosa, CA

Post by The Vaxorcist »

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 thinking of distributing a binary.
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.
I was wondering about that.
Darn.

I still want a cross-compiler for other stuff though.
Image
Where's Darwin when you need him?

Lagger@Everywhere
User avatar
ducktape
Private First Class
Private First Class
Posts: 1206
Joined: Sat Jul 01, 2006 2:06 am
Location: Right Behind you!

Post by ducktape »

Well does someone want to Post a Binary?
Image
User avatar
The Vaxorcist
Private First Class
Private First Class
Posts: 134
Joined: Wed Mar 23, 2005 10:28 am
Location: Santa Rosa, CA

Post by The Vaxorcist »

ducktape wrote:
The Vaxorcist wrote:If you use linux, you might be able to add it without compiling.
How do I add it? (in linux)
If you compile your own client, look up the patch command. Skip the rest.

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
Image
Where's Darwin when you need him?

Lagger@Everywhere
User avatar
ducktape
Private First Class
Private First Class
Posts: 1206
Joined: Sat Jul 01, 2006 2:06 am
Location: Right Behind you!

Post by ducktape »

The Vaxorcist wrote:
ducktape wrote:
The Vaxorcist wrote:If you use linux, you might be able to add it without compiling.
How do I add it? (in linux)
If you compile your own client, look up the patch command. Skip the rest.

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
Version: 2.0.8

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
Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

you need to be able to compile from the source, so you will need the dev version of all the packages bzflag uses, as well as the source.

check the threads on how to compile.
ImageJeffM
asciimonster
Private First Class
Private First Class
Posts: 55
Joined: Wed Sep 13, 2006 9:52 am

Post by asciimonster »

Is there any way to have personalised horns?

I want mine to be like the General Lee(Dukes of Hazard) had. 8)
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak »

You can crosscompile to windows without using SDL, if you have the right DirectX files; our mingw build system is pretty complete.

And there's nothing terribly wrong with an SDL build on windows anyway, it's just around 10% slower and has more limited joystick support.
User avatar
The Vaxorcist
Private First Class
Private First Class
Posts: 134
Joined: Wed Mar 23, 2005 10:28 am
Location: Santa Rosa, CA

Post by The Vaxorcist »

OK - I've made a linux binary.

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`
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.
Image
Where's Darwin when you need him?

Lagger@Everywhere
User avatar
Grace F
Sergeant
Sergeant
Posts: 978
Joined: Sun Oct 01, 2006 12:29 pm
Location: Adelaide, AUSTRALIA

Post by Grace F »

Those of us who havent added the horn, can we hear those who have?
Image
Image
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

Grace F wrote:Those of us who havent added the horn, can we hear those who have?
No, both sides would need the patch. If someone didn't have the patch, they would just see the "*HONK*" chat message.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
A Vicious Muffin
Private First Class
Private First Class
Posts: 534
Joined: Sat Aug 26, 2006 12:25 am
Location: Drury Lane

Post by A Vicious Muffin »

It's a nice idea, but it would be very annoying to people who didn't have the patch.

Those who do could use it as a way to spam, by honking all the time. Plus, it's virtually useless to someone who doesn't have it unless they want their chat box filled up with "*HONK*s".
Image
User avatar
ducktape
Private First Class
Private First Class
Posts: 1206
Joined: Sat Jul 01, 2006 2:06 am
Location: Right Behind you!

Post by ducktape »

Well your right but it is a awesome patch nice work.
Image
User avatar
The Vaxorcist
Private First Class
Private First Class
Posts: 134
Joined: Wed Mar 23, 2005 10:28 am
Location: Santa Rosa, CA

Post by The Vaxorcist »

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.
Image
Where's Darwin when you need him?

Lagger@Everywhere
Post Reply