Author Topic: xatrix default gun selection  (Read 3346 times)

Offline ToxicMonkey^MZC

  • Sr. Member
  • ****
  • Posts: 496
  • Proud to be a SCRUB
    • View Profile
  • Rated:
xatrix default gun selection
« on: July 03, 2007, 03:11:47 AM »
I notice recently on xatrix server after running round collecting weapons/armour for a bit and getting into a battle then if I say...run out of rockets for the rl and I keep pressing 'fire'  it used to default to the railgun as weapon of choice but now when I run out of rockets/shells/grenades I default to the chaingun (if I have picked it up) even after picking up the rg.

I usually try and avoid picking up the chain but sometimes I end up with one and it's quite annoying, especially when I am playing without sound to find myself shooting the bloody thing.

Is there any way I can make it default to the rail rather than chaingun or is it built into the mod/server settings?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: xatrix default gun selection
« Reply #1 on: July 03, 2007, 03:54:32 AM »
This is a problem with the source, I'm taking a look at it but have not had a whole lot of time.

So far thanks for the post because that is really helpful. Any more specifics that anyone else can give me will help as well.

WOAH!

I threw a trap and it immediatly switched to phalanx...
« Last Edit: July 03, 2007, 04:24:12 AM by peewee_RotA »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: xatrix default gun selection
« Reply #2 on: July 03, 2007, 04:51:24 AM »
There are 2 seperate problems and several glitches caused by them.

The first relating to NoAmmoWeaponChange specifically
One glitch was intentional. Nick had purposely put the chaingun above everything else. That's why it always switches to chaingun first.
After that there are several "spelling errors." Normally when you add a new gun here you use string compare. He removed this for the sake of performance. Well low and behold the item lists in g_item.c are capitilized and the lists of items in NoAmmoWeaponChange are not. Using string compare this is not a problem. However now that string compare is not used, the switching becomes case sensitive. So for example the Ripper which is written "Ionripper" in g_items.c is being referenced by NoAmmoWeaponChange as "ionripper" which is why the game never ever switches to the ion ripper.
(Which is probably a good idea because you should never default switch to a weapon that you can hurt yourself with.)


The second glitch I still have to track down. When you run out of traps it first attempts to switch to phalanx and then ripper. Following that it then calls NoAmmoWeaponChange and causes the same glitch as before.


Quadz, what is the most recent version of Nick's gamex86.dll that you run and do you have a copy of the source?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline X'tyfe

  • Phenomenally Prodigious Member
  • **
  • Posts: 3587
  • Yep
    • View Profile
  • Rated:
Re: xatrix default gun selection
« Reply #3 on: July 03, 2007, 09:34:38 AM »
I notice recently on xatrix server after running round collecting weapons/armour for a bit and getting into a battle then if I say...run out of rockets for the rl and I keep pressing 'fire'  it used to default to the railgun as weapon of choice but now when I run out of rockets/shells/grenades I default to the chaingun (if I have picked it up) even after picking up the rg.

I usually try and avoid picking up the chain but sometimes I end up with one and it's quite annoying, especially when I am playing without sound to find myself shooting the bloody thing.

Is there any way I can make it default to the rail rather than chaingun or is it built into the mod/server settings?

OH THE IRONY :D

seriously though, this sounds like a similar problem i was seeing before
hope quadz can get on it and fix :)
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: xatrix default gun selection
« Reply #4 on: July 03, 2007, 10:19:53 AM »

Well low and behold the item lists in g_item.c are capitilized and the lists of items in NoAmmoWeaponChange are not. Using string compare this is not a problem. However now that string compare is not used, the switching becomes case sensitive. So for example the Ripper which is written "Ionripper" in g_items.c is being referenced by NoAmmoWeaponChange as "ionripper" which is why the game never ever switches to the ion ripper.

Uhhh... are you sure about that?  It's using FindItem, and FindItem uses Q_stricmp().  My impression when I looked into this last month ( http://tastyspleen.net/quake/forums/index.php?topic=6795.msg71675#msg71675 ) was that the case-sensitivity was not an issue.  However, there was a typo of "ionripper" to "ionrippergun", which I fixed at the time.


Quadz, what is the most recent version of Nick's gamex86.dll that you run and do you have a copy of the source?

I'm not sure what version I started with.  I have modified it since then and keep it in my own CVS repository (quake2plus-tsmod), which is available for anonymous access here:

  cvs -d:pserver:anonymous@tastyspleen.net:/var/cvs/public login
  <press enter at password prompt>
  cvs -d:pserver:anonymous@tastyspleen.net:/var/cvs/public co quake2plus-tsmod


Here are the diffs for all changes I've made so far. (Not too many...)

Code: [Select]
cvs diff -u -r start
cvs diff: Diffing .
Index: g_utils.c
===================================================================
RCS file: /var/cvs/public/quake2plus-tsmod/g_utils.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- g_utils.c   1 Apr 2007 06:06:44 -0000       1.1.1.1
+++ g_utils.c   3 Jul 2007 17:06:44 -0000       1.2
@@ -538,7 +538,10 @@

        while (1)
        {
-               tr = gi.trace (ent->s.origin, ent->mins, ent->maxs, ent->s.origin, NULL, MASK_PLAYERSOLID);
+               // OLD: tr = gi.trace (ent->s.origin, ent->mins, ent->maxs, ent->s.origin, NULL, MASK_PLAYERSOLID);
+
+               // %%quadz - SIAMESE SPAWN FIX: band-aid for maps without spawn pads
+               tr = gi.trace (ent->s.origin, ent->mins, ent->maxs, ent->s.origin, NULL, CONTENTS_PLAYERCLIP|CONTENTS_WINDOW|CONTENTS_MONSTER);
                if (!tr.ent)
                        break;

Index: g_weapon.c
===================================================================
RCS file: /var/cvs/public/quake2plus-tsmod/g_weapon.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- g_weapon.c  1 Apr 2007 06:06:44 -0000       1.1.1.1
+++ g_weapon.c  2 Apr 2007 01:12:08 -0000       1.2
@@ -1353,6 +1353,7 @@
        int             len, i;
        int             oldlen = 8000;
        vec3_t  forward, right, up;
+       int     was_quadded = (ent->dmg > 200);  // %%quadz -- add quad trap suction!! O RLY??? YA RLY!!

        if (ent->timestamp < level.time)
        {
@@ -1518,8 +1519,9 @@
                len = VectorLength (vec);
                if (best->client)
                {
+                       int scalar = was_quadded? 1000 : 250;  // %%quadz -- add quad trap suction!
                        VectorNormalize (vec);
-                       VectorMA (best->velocity, 250, vec, best->velocity);
+                       VectorMA (best->velocity, scalar, vec, best->velocity);
                }
                else
                {
Index: p_weapon.c
===================================================================
RCS file: /var/cvs/public/quake2plus-tsmod/p_weapon.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- p_weapon.c  1 Apr 2007 06:06:44 -0000       1.1.1.1
+++ p_weapon.c  3 Jul 2007 17:07:19 -0000       1.3
@@ -260,7 +260,7 @@
        if ( ent->client->pers.inventory[ITEM_INDEX (FindItem ("cells"))]
                && ent->client->pers.inventory[ITEM_INDEX (FindItem ("ionripper"))])
        {
-               ent->client->newweapon = FindItem ("ionrippergun");
+               ent->client->newweapon = FindItem ("ionripper");  // %%quadz 070620 - fixed typo
                return; //Nick - 02/11/2005 - Missing?
        }

@@ -1793,7 +1793,7 @@

 #define TRAP_TIMER                     5.0
 #define TRAP_MINSPEED          300
-#define TRAP_MAXSPEED          700
+#define TRAP_MAXSPEED          1400    // %%quadz: was: 700

 void weapon_trap_fire (edict_t *ent, qboolean held)
 {


Regards,

quadz

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: xatrix default gun selection
« Reply #5 on: July 03, 2007, 10:40:37 AM »
« Last Edit: July 03, 2007, 10:48:17 AM by peewee_RotA »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: xatrix default gun selection
« Reply #6 on: July 27, 2007, 06:04:46 PM »
Hey quadz, just one suggestion because it was annoying the crap out of me today...

The CheckDodge function was specifically removed when using the hyperblaster because of lag and movement issues.

I noticed that the people at Xatrix didn't think to remove it from the ripper as well for the same reasons. (I'm tired of someone shooting a ripper and I get stuck in place while they take my items because it wants to run extra dodging routines instead of continuing my movements)

Anyway it should be a simple fix if you're up to it.

Thanks :)
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

 

El Box de Shoutamente

Last 10 Shouts:

 

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.
 

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM
 

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 26, 2024, 06:07:13 PM

Login with username, password and session length