Announcement

Collapse
No announcement yet.

Auto switch weapons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Auto switch weapons

    Is there a way to disable auto switch weapons in darkplaces? I looked through the command line options on the dp page but found nothing.

  • #2
    This behavior is defined in the QC code, not in the engine; but yeah, by default the QC code doesn't have an option for that.

    Implementing that option would require some QC modding, and I'm not aware of any mod that features it.
    Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
    ==-=-=-=-=-=-=-=-=-=-=-=
    Dev blog / Twitter / YouTube

    Comment


    • #3
      It's a really easy qc change. In items.qc, go down to void() weapon_touch. Towards the bottom, look for this:


      if (!deathmatch)
      self.weapon = new;
      else
      Deathmatch_Weapon (old, new);



      If you don't want any switching, just delete this or comment it out. If you want to auto switch to a weapon only if it is a new weapon, do this:


      if (!(old & new))
      {
      if (!deathmatch)
      self.weapon = new;
      else
      Deathmatch_Weapon (old, new);
      }

      Comment


      • #4
        Thanks a lot, i'll try that soon.

        Comment

        Working...
        X