Random Color Bike and Tail Every Round HACK
-
- Posts: 1
- Joined: Sat Apr 29, 2006 7:49 pm
Random Color Bike and Tail Every Round HACK
Okay guys, this is the source code patch to make this work. I think its a horrible hack and could be done elsewhere but here it is:
in the armagetronad source directory, go under src/engine and edit ePlayer.cpp
and look for this:
void ePlayerNetID::WriteSync(nMessage &m){
lastSync=tSysTimeFloat();
nNetObject::WriteSync(m);
m.Write(r);
m.Write(g);
m.Write(b);
Change the above few lines to look like this:
void ePlayerNetID::WriteSync(nMessage &m){
lastSync=tSysTimeFloat();
nNetObject::WriteSync(m);
int bb=1+(int) (31.0*rand()/(RAND_MAX+1.0));
int rr=1+(int) (31.0*rand()/(RAND_MAX+1.0));
int gg=1+(int) (31.0*rand()/(RAND_MAX+1.0));
m.Write(rr);
m.Write(gg);
m.Write(bb);
Recompile and your car and tail will change colors every round. Also there is no way to turn it off yet, but someone could code a patch to easily do so.
in the armagetronad source directory, go under src/engine and edit ePlayer.cpp
and look for this:
void ePlayerNetID::WriteSync(nMessage &m){
lastSync=tSysTimeFloat();
nNetObject::WriteSync(m);
m.Write(r);
m.Write(g);
m.Write(b);
Change the above few lines to look like this:
void ePlayerNetID::WriteSync(nMessage &m){
lastSync=tSysTimeFloat();
nNetObject::WriteSync(m);
int bb=1+(int) (31.0*rand()/(RAND_MAX+1.0));
int rr=1+(int) (31.0*rand()/(RAND_MAX+1.0));
int gg=1+(int) (31.0*rand()/(RAND_MAX+1.0));
m.Write(rr);
m.Write(gg);
m.Write(bb);
Recompile and your car and tail will change colors every round. Also there is no way to turn it off yet, but someone could code a patch to easily do so.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
- philippeqc
- Long Poster - Project Developer - Sage
- Posts: 1526
- Joined: Mon Jul 12, 2004 8:55 am
- Location: Stockholm
- Contact:
Thank you for letting me know..
[Edit : Uhmm by anychance do you mean the source files or the files that we installed because if your talking about the source i dont know where to get that and the files installed i cant find it .. maybe you can give me a clue or steps cuz im confused.. if you can thanks ]
[Edit : Uhmm by anychance do you mean the source files or the files that we installed because if your talking about the source i dont know where to get that and the files installed i cant find it .. maybe you can give me a clue or steps cuz im confused.. if you can thanks ]
Yeah im the real f0ol..
-
- Posts: 4
- Joined: Sun Oct 08, 2006 3:12 pm
Re-
Sweet, I'll try this out. Maybe it will work and I can figure it out.
-
- Posts: 4
- Joined: Sun Oct 08, 2006 3:12 pm
Re-
When I've copied the code into the source file, What do I do next? hehe.
-
- Posts: 4
- Joined: Sun Oct 08, 2006 3:12 pm
Re-
I downloaded Code Blocks and I compiled the ePlayer File and it doesn't work. What file do I have to open?
- ^}LC}<SolJah*KF
- On Lightcycle Grid
- Posts: 19
- Joined: Sat Dec 16, 2006 1:55 pm
- Location: Nebraska
- Contact:
- ^}LC}<SolJah*KF
- On Lightcycle Grid
- Posts: 19
- Joined: Sat Dec 16, 2006 1:55 pm
- Location: Nebraska
- Contact: