<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Faldon Forums - Zerk/run bug]]></title>
	<link rel="self" href="https://www.faldon.org/feed/atom/topic/7591/"/>
	<updated>2024-09-26T02:12:44Z</updated>
	<generator>PunBB</generator>
	<id>https://www.faldon.org/topic/7591/</id>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73365/#p73365"/>
			<content type="html"><![CDATA[<p>Also looking forward to see the changes. Thanks.</p>]]></content>
			<author>
				<name><![CDATA[travis]]></name>
				<uri>https://www.faldon.org/user/3744/</uri>
			</author>
			<updated>2024-09-26T02:12:44Z</updated>
			<id>https://www.faldon.org/post/73365/#p73365</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73352/#p73352"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Mister Rob wrote:</cite><blockquote><p>Yes this is expected behaviour. (It did this in the past too even with low Agility)</p><p>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.</p><p>It could also be that regen is not correctly syncing up again.</p></blockquote></div><p>I&#039;m sorry; its different than what it was on old client but still expected behaviour seeing how the logic correctly functions I guess.</p><p>Interested to see what the fix will be <img src="https://www.faldon.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Mister Rob]]></name>
				<uri>https://www.faldon.org/user/3678/</uri>
			</author>
			<updated>2024-09-23T10:52:27Z</updated>
			<id>https://www.faldon.org/post/73352/#p73352</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73351/#p73351"/>
			<content type="html"><![CDATA[<p>Travis, that&#039;s actually how we did it before. I changed it so the run toggle no longer turns itself off.<br />This week&#039;s patch has a good solution I think folks will like.</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://www.faldon.org/user/2/</uri>
			</author>
			<updated>2024-09-23T10:15:20Z</updated>
			<id>https://www.faldon.org/post/73351/#p73351</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73337/#p73337"/>
			<content type="html"><![CDATA[<p>For whatever its worth, on OF we resolved this &quot;bug&quot; or a similar one by stepping up the rate of Health Mana Energy regen packets.</p>]]></content>
			<author>
				<name><![CDATA[Catbert]]></name>
				<uri>https://www.faldon.org/user/5/</uri>
			</author>
			<updated>2024-09-21T12:39:13Z</updated>
			<id>https://www.faldon.org/post/73337/#p73337</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73315/#p73315"/>
			<content type="html"><![CDATA[<p>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. </p><p>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&#039;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. </p><p>But also, I dont have the code in front of my face, so this is all speculation : D</p><p>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.</p><p>Maybe something like this?<br /></p><div class="codebox"><pre><code>class Player {
private:
    bool isRunning;
    int runEnergy;

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

    void toggleRun() {
        isRunning = !isRunning;
        std::cout &lt;&lt; &quot;Run toggled &quot; &lt;&lt; (isRunning ? &quot;on&quot; : &quot;off&quot;) &lt;&lt; std::endl;
    }

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

    void displayStatus() {
        std::cout &lt;&lt; &quot;Running: &quot; &lt;&lt; (isRunning ? &quot;Yes&quot; : &quot;No&quot;) &lt;&lt; std::endl;
        std::cout &lt;&lt; &quot;Run Energy: &quot; &lt;&lt; runEnergy &lt;&lt; std::endl;
    }
};

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

    return 0;
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[travis]]></name>
				<uri>https://www.faldon.org/user/3744/</uri>
			</author>
			<updated>2024-09-20T19:18:44Z</updated>
			<id>https://www.faldon.org/post/73315/#p73315</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73311/#p73311"/>
			<content type="html"><![CDATA[<p>Yes this is expected behaviour. (It did this in the past too even with low Agility)</p><p>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.</p><p>It could also be that regen is not correctly syncing up again.</p>]]></content>
			<author>
				<name><![CDATA[Mister Rob]]></name>
				<uri>https://www.faldon.org/user/3678/</uri>
			</author>
			<updated>2024-09-20T13:45:41Z</updated>
			<id>https://www.faldon.org/post/73311/#p73311</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73310/#p73310"/>
			<content type="html"><![CDATA[<p>I had a few points of hysteresis before, which this most recent change took out. I&#039;ll add it back in. (I have a different plan long term.)</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://www.faldon.org/user/2/</uri>
			</author>
			<updated>2024-09-20T10:58:12Z</updated>
			<id>https://www.faldon.org/post/73310/#p73310</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73309/#p73309"/>
			<content type="html"><![CDATA[<p>What happens when you toggle off? <br />Also, I believe the regen and usage have never been synced up exactly, this could be why too.</p>]]></content>
			<author>
				<name><![CDATA[travis]]></name>
				<uri>https://www.faldon.org/user/3744/</uri>
			</author>
			<updated>2024-09-20T10:32:58Z</updated>
			<id>https://www.faldon.org/post/73309/#p73309</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Zerk/run bug]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73307/#p73307"/>
			<content type="html"><![CDATA[<p>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.&nbsp; I do not have enough Agility that it should be regenning at all - at least it never did in the past.&nbsp; It kinda of makes the rhythm of walking while zerked feel real odd.</p>]]></content>
			<author>
				<name><![CDATA[pennywise]]></name>
				<uri>https://www.faldon.org/user/78/</uri>
			</author>
			<updated>2024-09-19T21:42:53Z</updated>
			<id>https://www.faldon.org/post/73307/#p73307</id>
		</entry>
</feed>
