Fix handheld flash spamming the server console when used. (#5791)
* Moves the actions of the flash code into the check for FlashableComponent * Combined if statments.
This commit is contained in:
@@ -127,15 +127,11 @@ namespace Content.Server.Flash
|
||||
flashable.LastFlash = _gameTiming.CurTime;
|
||||
flashable.Duration = flashDuration / 1000f; // TODO: Make this sane...
|
||||
flashable.Dirty();
|
||||
}
|
||||
|
||||
_stunSystem.TrySlowdown(target, TimeSpan.FromSeconds(flashDuration/1000f), true,
|
||||
slowTo, slowTo);
|
||||
|
||||
if (displayPopup && user != null && target != user)
|
||||
{
|
||||
// TODO Resolving the EntityUidhere bad.
|
||||
if (EntityManager.EntityExists(user.Value) && EntityManager.EntityExists(target))
|
||||
if (displayPopup && user != null && target != user && EntityManager.EntityExists(user.Value))
|
||||
{
|
||||
user.Value.PopupMessage(target, Loc.GetString("flash-component-user-blinds-you",
|
||||
("user", user.Value)));
|
||||
|
||||
Reference in New Issue
Block a user