Closed Chance4us closed 3 years ago
By the way, the lighting also gets very bright.
@obligaron any clue to what's happening :)
The game stops you from unequipping items while attacking. Perhaps a similar check should be added to moving?
@obligaron any clue to what's happening :)
Only after I started debugging. 🧐
The game stops you from unequipping items while attacking. Perhaps a similar check should be added to moving?
this is a possible solution. 🙂
The issue (in vanilla and devilutionX) is this line. It's start a new animation (NewPlrAni
with Stand) without setting the _pmode
to PM_STAND
. That's why we see the stand animation while walking.
The reason why vanilla is shorter then devilutionX is that the counting differs.
In vanilla actionFrame
is used and actionFrame
doesn't get reset by NewPlrAni
. So we simple show some actionFrame
with the walk animation. 😉
In devilutionX (after 7ed009e) we use use CurrentFrame
to calculate the progress for the walk animation. CurrentFrame
is reset byNewPlrAni
, so we call PM_ChangeOffset
oftener. Also note one cycle of the stand animation is longer then the walk animation cause of the specified delay. That's why the effect is worse in devilutionX.
NewPlrAni
hot-swap the AnimationInfo.pData
(CEL2 Data).
This is elegant but would require that all animations have the same length. This is currently the case but could differ if we supported loading this animation info's dynamic and a mod would change them. Example mod change: walking with heavy armor takes longer.StartStand
Similar to the block animation, we simply would stop walking and start standing. This would give the hero time to adjust to his new equipment. 😁 All solutions are possible. Currently I have coded solution 2 (see example) but the others are also good and valid solutions. Let me know what solution is wanted and I will open a pr. 🙂
The first solution would change the gameplay too much, that would make the hero much more vulnerable when running away. The third solution would also change the game logic of vanilla a bit and this should first be tried out over a longer period of time to be able to judge about it.
The second solution looks like it wouldn't change the game in any way. I vote for second although this isn't optimal for mods, because a creator of a mod have to make the necessary adjustments by himself anyway.
I already tried out from your repository and it works so perfectly that it is better than vanilla. Thanks a lot for the investigation.
Thanks for reporting and testing the changes. This really helps a lot. 🙂
2\. Instead of calling `NewPlrAni` hot-swap the `AnimationInfo.pData` (CEL2 Data). This is elegant but would require that all animations have the same length. This is currently the case but could differ if we supported loading this animation info's dynamic and a mod would change them. Example mod change: walking with heavy armor takes longer.
This seams like the right solution, it fixes the bug from Vanilla. I know some people aren't able to do things while walking, but it goes to reason that the heros dex is high enough for this :D
Thanks for looking in to the source of the issue.
This seams like the right solution, it fixes the bug from Vanilla. I know some people aren't able to do things while walking, but it goes to reason that the heros dex is high enough for this :D
Thanks for looking in to the source of the issue.
No problem. 🙂 PR is online #1988 :rocket:
Should we add vanilla tag as this also occurs in vanilla?
Should we add vanilla tag as this also occurs in vanilla?
I vote yes, because it is a part of the issue.
Yeah solving this requires solving a vanilla bug
There is an issue when walking and changing weapon at the same time. How to reproduce.
Screenshot:
Short video how it looks like: output.mkv.zip
Caused by commit 7ed009ecb71804bfe50a8f58d24417430aaeb7dc.
In vanilla, the problem is also present, rogue slides but the effect is shorter. Short video how it looks like in vanilla: vanilla.mkv.zip
Savegame: glitch.zip