Raised This Month: $12 Target: $400
 3% 

Weapon Animation Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eat1k
Senior Member
Join Date: Apr 2018
Old 02-13-2019 , 13:46   Weapon Animation Speed
Reply With Quote #1

Is there any way to change weapon animation speed? Specifically reload animation.

I tried setting m_flFrameRate/var_framerate in Ham_Weapon_SendWeaponAnim but it didn't work. The speed hasn't changed.

PHP Code:
// Thanks to Vaqtincha
new const g_iReloadAnims[any:WEAPON_P90 1] = {
    -
15, -13, -16, -111, -1144231113741361113, -1411, -11
};

public 
hamfwd_SendWeaponAnim_Pre(pWeaponiAnimiSkipLocaliBody)
{
    if(!
IsCustomWeapon(pWeapon))
        return 
HAM_IGNORED;

    new 
WeaponIdType:iId get_member(pWeaponm_iId);
    if(
iAnim == g_iReloadAnims[iId])
        
set_entvar(iAnimvar_framerate3.0); // 3x faster

    
return HAM_IGNORED;

__________________
eat1k is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 02-13-2019 , 16:46   Re: Weapon Animation Speed
Reply With Quote #2

1. set_entvar to pWeapon, not iAnim. It expects an entity.
2. Reload animations are not static, g_iReloadAdmins doesn't cover all cases like silent USP and M4A1.
3. I don't think it's possible without editing the model. Use sub models and pev_body. While v models and pev_body don't work well, you might be able to get away with it if you're only using it for reload animation and switch back to the default models once it's done.
PartialCloning is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 02-13-2019 , 17:42   Re: Weapon Animation Speed
Reply With Quote #3

Quote:
Originally Posted by PartialCloning View Post
1. set_entvar to pWeapon, not iAnim. It expects an entity.
2. Reload animations are not static, g_iReloadAdmins doesn't cover all cases like silent USP and M4A1.
3. I don't think it's possible without editing the model. Use sub models and pev_body. While v models and pev_body don't work well, you might be able to get away with it if you're only using it for reload animation and switch back to the default models once it's done.
I also tried with pWeapon and it didn't work. I want to add a CVar to change the reload speed but to do it better I wanted to change the animation speed, too. Because of this I want to change it without changing the model. Some scripter said me it's possible so maybe someone else knows how to do it.
__________________
eat1k is offline
thEsp
BANNED
Join Date: Aug 2017
Old 02-17-2019 , 06:27   Re: Weapon Animation Speed
Reply With Quote #4

I found something ...

Last edited by thEsp; 02-18-2019 at 03:38. Reason: I did not meant to troll or offend anyone!
thEsp is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 02-17-2019 , 07:36   Re: Weapon Animation Speed
Reply With Quote #5

Quote:
Originally Posted by thEsp View Post
Just search a bit more ...
At the moment there is no way to do it. I think it's possible only by changing frames but the animation will be abrupt. Moreover, some people said me it's impossible (to do it good without bugs) as minumum because the framerate it's hardcoded in the engine.
__________________
eat1k is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 02-17-2019 , 07:37   Re: Weapon Animation Speed
Reply With Quote #6

Weapon viewmodel it's handled in client side. You can try with FM_AddToFullPack. If that doesn't work I don't think there's another method to do.
__________________









Last edited by CrazY.; 02-17-2019 at 07:38.
CrazY. is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode