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

Фикс взрывов (нюки), который (вероятно) не будет смержен #11074

Closed
wants to merge 2 commits into from

Conversation

volas
Copy link
Member

@volas volas commented Mar 19, 2023

Описание изменений

Почему и что этот ПР улучшит

Авторство

Чеинжлог

🆑

  • bugfix: Рекурсивные взрывы теперь работают правильно (нюка в т.ч.).
  • bugfix: Рекурсивные взрывы теперь лагают.

@TauKitty
Copy link
Contributor

Changelog status: ✔️

@TauKitty TauKitty added the Fix label Mar 19, 2023
@@ -26,7 +26,7 @@ var/global/list/explosion_turfs = list()
playsound(epicenter, pick(SOUNDIN_EXPLOSION), VOL_EFFECTS_MASTER, null, FALSE, null, round(power,1) )

explosion_in_progress = 1
explosion_turfs = list()
explosion_turfs// = list()
Copy link
Member Author

Choose a reason for hiding this comment

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

Это глобальная переменная, которая сбрасывалась каждым новым рекурсивным взрывом. Нюка взрывала станцию лишь до первого встречного аккумулятора.

Comment on lines +114 to +121
if(T)
T.explosion_spread(spread_power, direction)
T = get_step(src, turn(direction,90))
T.explosion_spread(side_spread_power, turn(direction,90))
if(T)
T.explosion_spread(side_spread_power, turn(direction,90))
T = get_step(src, turn(direction,-90))
T.explosion_spread(side_spread_power, turn(direction,90))
if(T)
T.explosion_spread(side_spread_power, turn(direction,90))
Copy link
Member Author

Choose a reason for hiding this comment

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

не обрабатывался пустой get_step на краях карты, из-за чего очередь тайлов вероятно могла собраться не полностью

@volas
Copy link
Member Author

volas commented Mar 19, 2023

Я боюсь это мержить - пофикшенная нюка по сути планомерно удаляет станцию тайл за тайлом. Это напрашивается на контроллер, и на тг даже есть готовый, но я не собирался делать что-либо кроме фикса. Кто же знал...

@Deahaka
Copy link
Contributor

Deahaka commented Mar 19, 2023

Это изменение нам надо! Но очень долгие взрывы. Нам надо то что будет ускорять их.

@volas
Copy link
Member Author

volas commented Mar 21, 2023

Закрою в пользу #11090

Еще одна проблема в ПРе - из-за глобальной explosion_turfs каждый новый рекурсивный взрыв начинает ветвление и обход всех тех же турфов, и станция в результате взрывается в 15 потоков.

@volas volas closed this Mar 21, 2023
@TauKitty
Copy link
Contributor

Этот запрос на слияние был упомянут в Tau Ceti Station Forum. Там могут быть соответствующие подробности:

https://forum.taucetistation.org/t/novye-vzryvy-starye-vzryvy-bomby-i-rnd/40238/1

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

Successfully merging this pull request may close these issues.

None yet

3 participants