Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Passthrough #1156

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

electraminer
Copy link
Contributor

Previously, when two players attacked each other in quick succession, they would both recieve garbage.
This is because internet lag will cause both of them to send the garbage before they recieve it, so no cancellation occurs.
This is the same behavior Tetrio used to have.

I fixed this by storing sent attacks in a list, and attacks now also send the number of attacks their target has sent before them.
This allows me to keep track of which attacks have "crossed" each other, and cancel them out even after they have been sent.

This fix only applies to when 2 players are attacking each other, since in this case the behavior of garbage cancellation is very consistent. In cases where multiple players are attacking different players, the attacks will go past each other as before.

["string"]="V0.17.22",
["string"]="V0.17.22 + PASSTHROUGHFIXv1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh.......... Actually we never do this in a PR to another repos.....

Comment on lines -1238 to +1279
self.bufferedIRS=true
self.bufferedDelay=0
if ENV.wait==0 then
self.bufferedDelay=ENV.irscut
self.bufferedIRS = true
self.bufferedDelay = 0
if ENV.wait == 0 then
self.bufferedDelay = ENV.irscut
end
elseif ENV.wait==0 and ENV.irscut>0 and not self:ifoverlap(C.bk,self.curX,self.curY) then
elseif ENV.wait==0 and ENV.irscut>0 and not self:ifoverlap(C.bk, self.curX, self.curY) then
-- If IRS cut delay is enabled and we aren't currently dying, buffer the input instead.
self.bufferedIRS=true
self.bufferedDelay=ENV.irscut
self.bufferedIRS = true
self.bufferedDelay = ENV.irscut
Copy link
Contributor

@SweetSea-ButImNotSweet SweetSea-ButImNotSweet Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Electra, MrZ has a weird code style
He used to make a game also named "Techmino" on a graphic calculator, since it is memory limited, this is why he never leave a space on where he thinks "unnecessary" or "memory wasted"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants