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

[Bug]: Broken onStepOut #4857

Open
4 tasks done
ArturKnopik opened this issue Nov 24, 2024 · 0 comments
Open
4 tasks done

[Bug]: Broken onStepOut #4857

ArturKnopik opened this issue Nov 24, 2024 · 0 comments
Labels
bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet

Comments

@ArturKnopik
Copy link
Contributor

By submitting this bug issue, you agree to the following.

  • This is a bug in the software that resides in this repository, and not a support matter (use https://otland.net/forums/support.16/ for support)
  • This issue is reproducible without changes to the C++ code in this repository
  • This bug has not been resolved in master branch
  • There is no existing issue for this bug already

Does this bug crash tfs?

no

Server Version

1.7 (Master)

Operation System

all (listed below)

OS Description

No response

Bug description

onStepOut(creature, item, position, fromPosition) - position, fromPosition are always the same

Possible Pull Requests which are to blame

N/A

Steps to reproduce

changes drowning.lua to print positions for onStepIn and onStepOut

local condition = Condition(CONDITION_DROWN)
condition:setParameter(CONDITION_PARAM_PERIODICDAMAGE, -20)
condition:setParameter(CONDITION_PARAM_TICKS, -1)
condition:setParameter(CONDITION_PARAM_TICKINTERVAL, 2000)

function onStepIn(creature, item, position, fromPosition)
	print("onStepIn position: ", position)
	print("onStepIn fromPosition: ", fromPosition)
	if creature:isPlayer() then
		creature:addCondition(condition)
		creature:addAchievementProgress("Deep Sea Diver", 1000000)
	end
	return true
end

function onStepOut(creature, item, position, fromPosition)
	print("onStepOut position: ", position)
	print("onStepOut fromPosition: ", fromPosition)
	if creature:isPlayer() then
		creature:removeCondition(CONDITION_DROWN)
	end
	return true
end

goto position 374, 616, 13
start walking to left and right
check printed positions

Actual Behavior

onStepOut print for position and fromPosition the same values

onStepOut position:	Position(374, 616, 13)
onStepOut fromPosition:	Position(374, 616, 13)
onStepIn position:	Position(375, 616, 13)
onStepIn fromPosition:	Position(374, 616, 13)

Expected Behavior

onStepOut should print for position and fromPosition different values

Backtrace

N/A
@ArturKnopik ArturKnopik added bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet labels Nov 24, 2024
@github-project-automation github-project-automation bot moved this to Backlog in TFS 1.8 Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant