SmartlyDressedGames / Legally-Distinct-Missile

Fork of Rocket for Unturned maintained by the game developers.
MIT License
77 stars 29 forks source link

Cooldown Bug Report #13

Open SDGNelson opened 4 years ago

SDGNelson commented 4 years ago

Originally posted by @Bradler26 in https://github.com/SmartlyDressedGames/Unturned-3.x-Community/issues/1704#issuecomment-629386600

My version fixed a bug where cooldowns were not working correctly. Rocketmod prioritised the highest cooldown for some reason and I believe it also ignored people with a 0s cooldown and rather gave them a cooldown with higher seconds (If they were in a group that had the same command with different cooldowns.

From scrolling through Dms he mentioned that this is how Rocketmod handled cooldowns so he made it prioritise the lowest cooldown instead

applyingPermissions.Where(p => p.Cooldown != 0).OrderByDescending(p => p.Cooldown).FirstOrDefault();

rube200 commented 4 years ago

It is better if rocketmod handle it based on group priority.

In addition I think that rocketmod should save when the command was executed, because if the player permissions are changed the cooldown is the correct one.

Rocket.Core.CommandsRocketCommandManager this can be a "problem"