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

/ctf turns itself off #98

Open
WildWeazel opened this issue Jan 3, 2013 · 11 comments
Open

/ctf turns itself off #98

WildWeazel opened this issue Jan 3, 2013 · 11 comments

Comments

@WildWeazel
Copy link

I'm not sure if this is intended behavior, but I've been seeing it happen for a long time. When using /ctf while building, it will turn itself off ("FORTIFY mode disabled") seemingly at random. I thought at first maybe it was a timed response to inactivity so that the player doesn't forget and leave it on, but I can't see any pattern to it. Often it will happen as I'm placing blocks, which is very annoying because I then have to go back and remove the non-reinforced blocks or use /ctr to protect them.

@erocs
Copy link
Contributor

erocs commented Jan 3, 2013

https://github.com/erocs/Citadel/blob/master/src/com/untamedears/citadel/entity/PlayerState.java#L111

I'm unsure what the live setting of general.automodereset is, but the default plugin config says 30 seconds. That might be what you are running into. It looks like there's a bug that when PlayerState.reset() is called, the current pending task is not cancelled. When you notice this, I'm guessing that you start by fortifying a few blocks with a certain group/reinforcement material and then change to a different group/material. Thirty seconds later your state is automatically reset. Does this sound correct?

@WildWeazel
Copy link
Author

I'm not changing groups, but it very well could be that switching materials is causing the variations. So it's intentional that each mode only lasts 30 seconds from when the user enables it?

@erocs
Copy link
Contributor

erocs commented Jan 3, 2013

It should be a N second timer started when the user stops placing fortified blocks, not from when the user enables the mode. The fact that the task isn't cancelled via reset() when you switch materials is a bug. We'll try it out and fix if this is the issue. Thanks!

@intangir
Copy link
Contributor

intangir commented Jan 3, 2013

how can it not cancel fortify mode when you switch material?, i thought it only lets you set it when you turn it on, how can you switch at all when using fortify mode?

@WildWeazel
Copy link
Author

I think we're talking about switching building materials, or at least that might explain what I'm seeing.

@erocs
Copy link
Contributor

erocs commented Jan 3, 2013

It's mostly a guess as I'm still at work and can't test at the moment, but when switching between fortification states to change the reinforcement material, I believe a dangling AutoModeReset task is left scheduled.

@WildWeazel
Copy link
Author

Then that's different from what I'm talking about. I'm not changing the reinforcement material (stone/iron/diamond) or issuing any other Citadel commands. I use /ctf, start building (and may switch which type of blocks I'm placing), and at some indeterminate point while still placing blocks I see the disabled message and ctf is no longer in effect.

@intangir
Copy link
Contributor

intangir commented Jan 3, 2013

Which server or version are you seeing this on?

@WildWeazel
Copy link
Author

Civcraft, for as long as I can remember

@intangir
Copy link
Contributor

intangir commented Jan 4, 2013

oh well i tried it with the latest build on 1.4.6 and i couldn't replicate the issue in fortify mode

seemed to always give me 30 seconds after the last fortified block ,regardless of wether i had switched

@erocs
Copy link
Contributor

erocs commented Jan 4, 2013

On the live server I've noticed what you reported too WildWeazel. Unfortunately, just like Intangir, I can't find any problems now that I'm looking closely nor can I cause it to happen. At this point, I have only long-shot guesses. If you narrow it down further, let us know the conditions when it occurs like lag, lots of players online, and your recent reinforcement activities. I'm doubtful we'll find the cause though.

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

No branches or pull requests

3 participants