1

Topic: Zerk/run bug

Since you changed it so the run toggle remains on, when you are berserking and out of energy, it will give you these weird little speed boosts every other second you are moving.  I do not have enough Agility that it should be regenning at all - at least it never did in the past.  It kinda of makes the rhythm of walking while zerked feel real odd.

Pennywise - 7 Seconds - Fugazi - Husker Du

2

Re: Zerk/run bug

What happens when you toggle off?
Also, I believe the regen and usage have never been synced up exactly, this could be why too.

3

Re: Zerk/run bug

I had a few points of hysteresis before, which this most recent change took out. I'll add it back in. (I have a different plan long term.)

4

Re: Zerk/run bug

Yes this is expected behaviour. (It did this in the past too even with low Agility)

It will regen even 1 energy and use that to run with the run toggle is on. So thats why youre getting those small bursts.

It could also be that regen is not correctly syncing up again.

Evil Devil - Prometherion

5

Re: Zerk/run bug

Yeah, I was pretty confident, but not 100% that what Rob was saying was what is going. It is just funky because it automagically runs again in new client, where I think in old client, if you hold shift, it wont run again until you release and press shift again(after depletion and regen). So it was more hidden before.

But the server probably sends out the regen and subtraction at the same time and does not null each other out, so regen probably sends after subtraction, or at the same time and doesn't handle both like that. And if server only sends regen amount to client every second, then you have a full second to use before it fixes that tiny amount.

But also, I dont have the code in front of my face, so this is all speculation : D

Im not sure this is so much a bug, but a fluidity of gameplay annoyance. But well worth noting and pushing a fix for. Maybe IF energy depleted, turn run toggle off.

Maybe something like this?

class Player {
private:
    bool isRunning;
    int runEnergy;

public:
    Player() : isRunning(false), runEnergy(100) {}

    void toggleRun() {
        isRunning = !isRunning;
        std::cout << "Run toggled " << (isRunning ? "on" : "off") << std::endl;
    }

    void updateRunEnergy() {
        if (isRunning) {
            runEnergy -= 1;
            if (runEnergy <= 0) {
                runEnergy = 0;
                if (isRunning) {
                    toggleRun();
                    std::cout << "Run energy depleted. Run automatically turned off." << std::endl;
                }
            }
        }
    }

    void displayStatus() {
        std::cout << "Running: " << (isRunning ? "Yes" : "No") << std::endl;
        std::cout << "Run Energy: " << runEnergy << std::endl;
    }
};

int main() {
    Player player;
    
    // Simulate running until energy is depleted
    player.toggleRun();
    for (int i = 0; i < 105; ++i) {
        player.updateRunEnergy();
        if (i % 10 == 0) {
            player.displayStatus();
        }
    }

    return 0;
}

6

Re: Zerk/run bug

For whatever its worth, on OF we resolved this "bug" or a similar one by stepping up the rate of Health Mana Energy regen packets.

7

Re: Zerk/run bug

Travis, that's actually how we did it before. I changed it so the run toggle no longer turns itself off.
This week's patch has a good solution I think folks will like.

8

Re: Zerk/run bug

Mister Rob wrote:

Yes this is expected behaviour. (It did this in the past too even with low Agility)

It will regen even 1 energy and use that to run with the run toggle is on. So thats why youre getting those small bursts.

It could also be that regen is not correctly syncing up again.

I'm sorry; its different than what it was on old client but still expected behaviour seeing how the logic correctly functions I guess.

Interested to see what the fix will be smile

Evil Devil - Prometherion

9

Re: Zerk/run bug

Also looking forward to see the changes. Thanks.