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

Update Effects.cpp for consistent behavior when rendering special patterns #734

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

LeandroLibanio28H
Copy link
Contributor

Description

The current rendering behavior of spell effects with patternX = 2 and patternY = 2 exhibits inconsistency, as demonstrated in the provided videos.

Behavior

Actual

As an example, I've modified the "Eternal Winter" spell area to the following:

local area = {
	{0, 0, 0, 1, 0, 0, 0},
	{0, 0, 1, 1, 1, 0, 0},
	{0, 1, 1, 1, 1, 1, 0},
	{1, 1, 1, 2, 1, 1, 1},
	{0, 1, 1, 1, 1, 1, 0},
	{0, 0, 1, 1, 1, 0, 0},
	{0, 0, 0, 1, 0, 0, 0},
}

The spell produced the following behavior:

wrong_effect_rendering.mp4

The animation renders correctly on certain sqms but not others, exhibiting inconsistent behavior.

Expected

This pull request aims to rectify the issue by adjusting the effect rendering pattern formula to consistently align with the desired combat area, regardless of the pattern the object possesses.

right_effect_rendering.mp4

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How to test and reproduce

  1. Create or modify a spell and use the CONST_ME_ICETORNADO, CONST_ME_BIGCLOUDS, or any effect whose pattern is not x = 1, y = 1.
  2. Open the client and try the spell
  3. Move one sqm and try it again (The rendering will be broken every other sqm)
  4. Apply the changes on this PR
  5. Try it again (The rendering is consistent)
  6. Try effects that have another pattern setup and verify that the change didn't break them.

Test Configuration:

  • Server Version: TFS 1.4.2
  • Client: Mehah otclient (master)
  • Operating System: Windows 11

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@Nottinghster Nottinghster merged commit fe17f5b into mehah:main Apr 2, 2024
6 of 10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants