Raised This Month: $ Target: $400
 0% 

Weapon animation bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Inhabitant Of Heavens
Member
Join Date: Aug 2011
Old 11-12-2011 , 15:59   Weapon animation bug
Reply With Quote #1

Help me to fix this animation bug.

I suppose the fault is in this forward

Code:
g_UpdateClientData_Forward = register_forward(FM_UpdateClientData, "UpdateClientData_Post", 1);
I am enabling this forward at weapon Deploy_Post, and disabling at ItemPostFrame.

Code:
public UpdateClientData_Post(iPlayer, iSendWeapons, CD_Handle)
{
        set_cd(CD_Handle, CD_ID, 0)
 
        return FMRES_IGNORED
}
The Inhabitant Of Heavens is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-12-2011 , 16:04   Re: Weapon animation bug
Reply With Quote #2

If you want to block properly weapon animation + sound, don't use this way.

Hook Ham_Item_Deploy and set m_flNextPrimaryAttack + m_flNextSecondaryAttack + m_flNextAttack offsets to high value.
__________________

Last edited by Arkshine; 11-12-2011 at 16:04.
Arkshine is offline
The Inhabitant Of Heavens
Member
Join Date: Aug 2011
Old 11-12-2011 , 16:24   Re: Weapon animation bug
Reply With Quote #3

I've explained a lil bit incorrect.

Well, I have created my own knife(based on CS default knife of course), but new knife weapon deploy, attack etc. animation ID's are not like in CS knife.
It's not a problem, I succesfully fixed it.
The main problem is, whenever I switch from my new knife to any other weapon, other weapon deploy animation is showing incorrectly.For example my knife deploy anim ID is 3, so on all other weapons on deplot anim ID 3 will be played, not their original animation.
The Inhabitant Of Heavens is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-12-2011 , 17:27   Re: Weapon animation bug
Reply With Quote #4

Without seeing your code, what you say doesn't help. Generally when you want to create your own weapon, it would be more appropriate to fully block the original weapon to avoid weird behaviors.
__________________
Arkshine is offline
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 11-12-2011 , 17:55   Re: Weapon animation bug
Reply With Quote #5

Quote:
Originally Posted by The Inhabitant Of Heavens View Post
I've explained a lil bit incorrect.

Well, I have created my own knife(based on CS default knife of course), but new knife weapon deploy, attack etc. animation ID's are not like in CS knife.
It's not a problem, I succesfully fixed it.
The main problem is, whenever I switch from my new knife to any other weapon, other weapon deploy animation is showing incorrectly.For example my knife deploy anim ID is 3, so on all other weapons on deplot anim ID 3 will be played, not their original animation.
You have to decompile the model and order the animations...

Put the model here if you don't know what i'm talking about.

Last edited by XINLEI; 11-12-2011 at 17:56.
XINLEI is offline
Reply



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 08:31.


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