WorldGuard

WorldGuard

8M Downloads

PVP /Invincibility bug, relogging fixes -

LadyCailinBot opened this issue ยท 34 comments

commented

WORLDGUARD-3362 - Reported by Bron

Some players upon login randomly become invincible in areas flagged pvp allow.
They cant attack , but not take damage when attacked.
If the person logs out and back in it usually always fixes the issue.

Issue I thought was introduced between build 1560-1580 can confirm is in 1580 and can also confirm it is in 1562
I will keep testing backwards untill it goes away.
I am fairly certain it does not go all the way back to 1545.

commented

Comment by PseudoKnight

If you tested it thoroughly, how can you reliably recreate it? I can trigger it eventually by moving between regions a lot, but it's not consistent.

Bron reported that it happens in 1562, so one of you got invalid results.

commented

Comment by PseudoKnight

Why is region invincibility being stored in player sessions anyway? It should be separate since the necessary data is already stored in the region. It also makes the flag unnecessarily dependent on player move handling, even if it's faster in 6.0.

The new invincibility handling started with 1552, so 1550 is almost guaranteed not to have this problem, for those who need a working build with invincibility regions. It's just too bad you lose out on some of the other fixes.

commented

Comment by PseudoKnight

Maybe I'm wrong, but shouldn't that be if(!moveType.isCancellable())?

commented

Comment by andrewkm

I can reproduce it reliably with our Survival Games.
I am absolutely sure the other user got invalid results and that the problem started on 1575 with the commit I mentioned.

commented

Comment by PseudoKnight

And yet you won't say how. lol

commented

Comment by jerethkhan

I see a few replies concerning moveto and moveType. That's the symptom. There's already a check for proper x,y,z format when you use "/rg flag teleport x,y,z". All that needs to be added is a recursive to prevent players from making Y higher than 256 and I'm pretty sure the cause of the problem goes away.

commented

Comment by andrewkm

I'm not the one testing, it was my staff, while I was shuffling builds to find the absolutely correct one.

commented

Comment by rtcabooservb

I can confirm that I have been experiencing issues with invincibility state since updating to WorldGuard dev 1582. When players teleport into a region that has invincible flagged deny (to remove WorldGuard godmode for arenas) and are forced teleported out of the region via a plugin (example being pvp match ending), they do not retain their godmode status and are forced to relog to re-enable. My guess would be this commit causing the issue.
afcf93b

Or perhaps this recent one.
6b5a121

Perhaps @sk89q could look into it.

Edit: I have committed out the change in this commit afcf93b and compiled the source. I am no longer experiencing issues with godmode or creative when players are forcefully removed from arenas. So confirmed that commit is the issue I suppose?

commented

Comment by andrewkm

@sk89q can we have a fix as stated above by ricabooservb please.

commented

Comment by Josh.vdub

this is still not fixed, please re-open

commented

Comment by PseudoKnight

Can you confirm that you can still recreate this bug on build 1583?

commented

Comment by wizjany

more importantly, can anyone else confirm

commented

Comment by Josh.vdub

what fixed it for me was removing the invincible flag from the spawn regions. I am using build 1583 so it still definitely is and issue if you use that flag

commented

Comment by PseudoKnight

I can't reproduce the problem on 1583.

commented

Comment by Josh.vdub

@PseudoKnight did you try enabling invincible flag

commented

Comment by PseudoKnight

Yes, I used the same method I used before. I teleported in and out of out the region using a compass. It seemed to be accurate every time, unlike before.

Unfortunately the change to use sessions (for seemingly no reason) means invincibility regions are inconsistent when player move handling is turned off. So either I have to drop invincible regions or turn on player move handling. Player move events should be faster now in 6, but it's still a little disappointing.

commented

Comment by Josh.vdub

i have move handling off

commented

Comment by PseudoKnight

That would be the source of your problem, then. That's a separate issue. Either it needs to be changed back to checking the flag on damage event or it needs to be documented. (that part of the documentation is inaccurate and incomplete anyway)

commented

Comment by wizjany

That is consistent with previous behavior at least, session-related flags would always break when movement/teleport handling was off and a player suddenly appeared outside a region.

commented

Comment by Josh.vdub

I am having this same issue, huge problem on pvp servers

commented

Comment by PseudoKnight

Something like this is hitting me hard. Logging in and out didn't seem to help (or at least not always), but moving to another region (both regions have just a pvp flag) resulted in different players having invincibility. Instead of player A being invincible, now player B was invincible. And an invincible region is permitting damage sometimes. I died in lava in an invincible region, then respawned, went back to the region and didn't take any damage.

/wg debug testdamage indicates it's definitely WG.

auto-invincible-group: false
auto-invincible: false

It doesn't matter if the region has no flags on it, and no modification of the global region seemed to have an effect.

commented

Comment by Josh.vdub

I believe it started somewhere between beta 4 and beta 5

commented

Comment by PseudoKnight

I'm going to guess it has something to do with Session.testMoveTo(). I disabled move and teleport handling. Hopefully that resolves it for me until this can be fixed.

Use /wg flushstates to temporarily fix this, btw.

commented

Comment by Josh.vdub

I already had move and teleport listeners disabled in the config @PseudoKnight

commented

Comment by PseudoKnight

You know what, given my test area, maybe it has to do with moving into an invincible region, getting the invincible state, then leaving the region but maintaining the invincible state. I can't recall every situation, but in many cases I had passed through an invincible region temporarily.

commented

Comment by PseudoKnight

@Josh.vdub Interesting, as I can't recreate it now that I have the use-player-teleports disabled. I'll keep testing.

[edit] Though invincible region doesn't seem to want to work now.

commented

Comment by Josh.vdub

it seemed random, only affecting maybe 10% of players on, now that I have downgraded to beta 4 no reports yet of anyone being in god mode

commented

Comment by PseudoKnight

Do you use any invincible regions, god-mode, or auto-invincible?

commented

Comment by Josh.vdub

at spawn I think

commented

Comment by andrewkm

Same issue here, MAJOR MAJOR problems on our SG server.
Our spawn region has the invincible flag so perhaps some issue with passing through it temporarily.

commented

Comment by PseudoKnight

I've had success removing invincible regions and turning off use-player-teleports and use-player-move. One or the other could work too.

commented

Comment by andrewkm

I have just done absolute in-detail testing.
1575 issue happens
1574 issue does not happen.

Here is your problem:
afcf93b

commented

Comment by PseudoKnight

Except the invincible flag wasn't a session flag before. Now it is. It doesn't need to be.

commented

Comment by andrewkm

Can confirm all is fixed for me as well on 1583. :) Thanks!