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

Implement new glitch for setGlitchEnabled that allows SA-MP-like strafing with an aimed weapon #2228

Open
cinam0n opened this issue May 18, 2021 · 17 comments
Labels
enhancement New feature or request

Comments

@cinam0n
Copy link

cinam0n commented May 18, 2021

Is your feature request related to a problem? Please describe.
The players movement while aiming is pretty different to SA-MP.
For me as an ex-SA-MP-Player this feels some kind of uncomfortable.
I know that MTA is closer to the singleplayer game than SA-MP is, but i also think that this would be a nice feature for those who want to fight like in SA-MP but want to enjoy the benefits of MTA.

Describe the solution you'd like
It would be great if you could enable this kind of strafing like a glitch with for example setGlitchEnabled("samp_strafing", true)

Describe alternatives you've considered
None.

Additional context
For a better explanation what i mean, you can watch this video and you will see that in SA-MP the change between the different GUNMOVE-Animations is faster than in MTA, left is kinda MTA-like and the old SA-MP Movement, right is the current Movement in SA-MP and the Movement i try to achieve:
https://www.youtube.com/watch?v=W2MkSXFR-RU

@cinam0n cinam0n added the enhancement New feature or request label May 18, 2021
@AlexTMjugador
Copy link
Member

I guess you've already tried to enable glitches like "fastmove" using setGlitchEnabled, but they didn't give the expected result?

@cinam0n
Copy link
Author

cinam0n commented May 18, 2021

Yes i enabled all existing glitches, fastmove isn't the same like i mentioned above, it feels more SA-MP like but the animation-blending between the GUNMOVE-Anims is still there, its like SA-MP is missing this blending-part.

@ffsPLASMA
Copy link

Hmm Im not sure and I could be totally wrong, but could it be the way it is simply because MTA uses the CJ animations for all ped models, while SAMP uses the actual ped animations for different peds?

@cinam0n
Copy link
Author

cinam0n commented May 22, 2021

In SA-MP its possible too to enable the CJ-Animations for all ped models.
I asked Whitetiger from SA-MP AC if he knows more, he said that this behaviour is caused by a fix that SA-MP has added to allow strafing with more than 45 FPS.
SA-MP is speeding up some animation, i think this "direction-change" anim.

@ffsPLASMA
Copy link

Have you tried using setPedAnimationSpeed ?

@cinam0n
Copy link
Author

cinam0n commented May 27, 2021

Yes, i already tried setPedAnimationSpeed but it only changes the speed of a animation that was set before.
I got another video-example of the bug i mean.
It was introduced with SA-MP 0.3d as you can see here: https://www.youtube.com/watch?v=W2MkSXFR-RU

@Lpsd
Copy link
Member

Lpsd commented May 27, 2021

@cinam0n Can you show the code you've tried with setPedAnimationSpeed? I don't see any reason why you shouldn't be able to detect when the desired animation is playing for the local player and change its speed.

@cinam0n
Copy link
Author

cinam0n commented May 27, 2021

I tested it again, setPedAnimationSpeed does indeed speed up the Gunmove-Animations, but the blending between those anims is not affected

@Lpsd
Copy link
Member

Lpsd commented May 27, 2021

When you detect the desired animation, how about getting the animation details with getPedAnimation, setting it again with setPedAnimation, but with blendTime set to 0? Then you can use setPedAnimationSpeed if necessary.

@AlexTMjugador
Copy link
Member

AlexTMjugador commented May 28, 2021

My thoughts: if SAMP-like strafing can be achieved by a resource, that resource probably should be published as a community resource, maybe adding a link to it in the wiki, or added to the MTA resources repo. I don't believe setGlitchEnabled should enable behaviors that didn't exist in the original game in the first place, and were introduced due to modifications other than MTA.

@Lpsd
Copy link
Member

Lpsd commented May 28, 2021

Yeah I don't agree with making any changes to MTA to achieve some possibly dodgy mechanics from SAMP.

You should be able to get it pretty close with just Lua scripting - I mean you can literally emulate SAMP inside of MTA due to how much more powerful it is, so this shouldn't be an issue.

For now, I'll close this, as it's not really an MTA issue, more of a personal preference based on your past experiences with SAMP. You can use our scripting channels on the community Discord to ask questions and investigate further: https://discord.gg/mtasa

@Lpsd Lpsd closed this as completed May 28, 2021
@AlexTMjugador
Copy link
Member

AlexTMjugador commented May 28, 2021

I also think that a considerable amount of players migrating from SAMP to MTA may need to get used to this difference, or even find it a bit awkward, though. I completely agree with @Lpsd closing this issue for the reasons he stated, but I also think it'd be nice if we continued the conversation about how to reimplement it via a resource here, because this issue serves better the purposes of archival and disclosure of related information (IMO) than a community Discord. In my view, I think it'd be fine to continue discussing an overview of how to achieve this SAMP quirk in this issue :)

@Lpsd
Copy link
Member

Lpsd commented May 28, 2021

Fair enough, I'll leave it open so people can track this better.

@Lpsd Lpsd reopened this May 28, 2021
@cinam0n
Copy link
Author

cinam0n commented May 28, 2021

Well, i agree with you, that it would be the best to implement this by using a resource.
I opened this issue because i was not able to find a proper way to reimplement this SA-MP-like behaviour with the given functions, even if I can't rule out that I missed something.

i tried to implement it by using the way mentioned in the first post here: https://forum.mtasa.com/topic/96089-changing-direction-slow-when-aiming/
But also changing the Animation-Speed, canceling the Animation or changing the Animation, like done in the mentioned post, skips this blending time or a short annoying stop between the anims

@cinam0n
Copy link
Author

cinam0n commented Aug 23, 2021

A short bump!
Does anyone have any suggestion on how to achieve the desired behavior?

@lopezloo
Copy link
Member

lopezloo commented Oct 24, 2021

Very similar to issue #502. They probably have disabled that animation time-limit altogether in SA-MP.

@Dryxio
Copy link

Dryxio commented Dec 21, 2022

bump, any news?

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

No branches or pull requests

6 participants