Announcement

Collapse
No announcement yet.

How do I fix the glitch where the rotfish counts as 2 enemies?

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

  • How do I fix the glitch where the rotfish counts as 2 enemies?

    I just can't cope with it. OCD man.


    edit: I'm running darkplaces ON A MAC.

  • #2
    It's coded into the original progs.dat within the "monsters.qc" file. Here are the two functions that govern how swimming monsters spawn:

    void() swimmonster_start_go =
    {
    if (deathmatch)
    {
    remove(self);
    return;
    }

    self.takedamage = DAMAGE_AIM;
    total_monsters = total_monsters + 1;

    self.ideal_yaw = self.angles * '0 1 0';
    if (!self.yaw_speed)
    self.yaw_speed = 10;
    self.view_ofs = '0 0 10';
    self.use = monster_use;

    self.flags = self.flags | FL_SWIM;
    self.flags = self.flags | FL_MONSTER;

    if (self.target)
    {
    self.goalentity = self.movetarget = find(world, targetname, self.target);
    if (!self.movetarget)
    {
    dprint ("Monster can't find target at ");
    dprint (vtos(self.origin));
    dprint ("\n");
    }
    // this used to be an objerror
    self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
    self.th_walk ();
    }
    else
    {
    self.pausetime = 99999999;
    self.th_stand ();
    }

    // spread think times so they don't all happen at same time
    self.nextthink = self.nextthink + random()*0.5;
    };

    void() swimmonster_start =
    {
    // spread think times so they don't all happen at same time
    self.nextthink = self.nextthink + random()*0.5;
    self.think = swimmonster_start_go;
    total_monsters = total_monsters + 1;
    };
    See the two lines that are bold? id Software forgot to remove one of these, making the fish get counted twice. Realistically, any swimming monster would get counted twice, except that the fish just happens to be the only swimming monster in vanilla Quake.

    So to fix, you'll need to obtain the q1 source files and a compiler, open up monsters.qc in notepad or something, remove one of the two lines, and compile. This could kind of be considered a mod, just an incredibly small one lol.

    A lot of mods made will address this issue, since its simply a screw up on id's behalf that went unnoticed.

    If there's a way of fixing it non-code, I don't know about it.

    EDIT: Just remembered you're running a mac. Better make sure you can track down a mac friendly code compiler if you're going that route.
    'Replacement Player Models' Project

    Comment


    • #3
      Hello,

      If you think that this was the only "vanilla Quake" bug, then think again
      Fortunately a lot of people build up an extreme detailed list of all existing Quake related bugs and issues, together with fixes, workarounds and solutions.

      A must-read for modders: click

      Best wishes.

      Comment


      • #4
        Okay. I solved my problems with fuhQuake. I'm still working on that compilation though. Textedit is a useless app sometimes.\

        Moderators can lock this.

        Comment


        • #5
          Textedit is a useless app sometimes
          Download NotePad++

          It's by far the best text editor for coding in a whole slew of languages, has a lot of features and a neat user interface. Totally free too.

          @Seven

          thanks for posting that link on bugs! Couple things I wasn't aware of that I plan to fix.
          'Replacement Player Models' Project

          Comment


          • #6
            https://www.quaddicted.com/files/mods/q106fishfix.zip
            Quake 1 Singleplayer Maps and Mods

            Comment


            • #7
              This works. How could you get it to run in darkplaces?

              Comment


              • #8
                This was in the readme:

                This is Quake C progs 1.06 with the following two changes:
                -fish count bug is fixed
                -dead fish become nonsolid on the first frame (not blocking
                shots and movement)

                For convenience, the updated progs.dat comes in a PAK file
                which can be placed in the ID1\ directory to work out of
                the box.
                Place it in the ID1 directory within your DarkPlaces main directory and start the game. That should be it.
                'Replacement Player Models' Project

                Comment

                Working...
                X