HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Animated items

View previous topic View next topic Go down 
AuthorMessage
RedEye
Retired
avatar

Game username : -redeye-
Server : KITO
Male Posts : 2575
Join date : 2011-07-24
Age : 30

PostSubject: Animated items   Fri Feb 01, 2013 1:04 pm

In MagixUnit.h in the function updateAnimations:

Add in the green text (I am sad that code and quote cant be combined).
Quote :
void updateAnimation(const FrameEvent &evt, MagixExternalDefinitions *def)
{
updateAnimBase(evt);
updateAnimSecond(evt);
updateEmote(evt,def);
updateLipSync(evt);

//Item animations!
for(int slot=0; slot<MAX_EQUIP; slot++) {
if(!mEquipEnt[slot]) continue;
if(mEquipEnt[slot]->getAllAnimationStates()->hasAnimationState("Equip"))
mEquipEnt[slot]->getAnimationState("Equip")->addTime(animSpeed*evt.timeSinceLastFrame);
if(mEquipEnt[slot]->getAllAnimationStates()->hasAnimationState("Equip2"))
mEquipEnt[slot]->getAnimationState("Equip2")->addTime(animSpeed*evt.timeSinceLastFrame);
}


//Blinkblink!
if(mHeadEnt->getSkeleton()->hasAnimation("Blink")) // dont blink if blink doesn't exist

________________________________
Retired


Last edited by RedEye on Fri Feb 01, 2013 2:32 pm; edited 2 times in total
Back to top Go down
Osire

avatar

Game username : Osire
Female Posts : 29
Join date : 2011-09-06

PostSubject: Re: Animated items   Fri Feb 01, 2013 1:48 pm

[You must be registered and logged in to see this link.]

what with this? :C
Back to top Go down
RedEye
Retired
avatar

Game username : -redeye-
Server : KITO
Male Posts : 2575
Join date : 2011-07-24
Age : 30

PostSubject: Re: Animated items   Fri Feb 01, 2013 1:54 pm

guess the 1 item I picked had both Equip and Equip2 animation but not all of them has it :3
Added test!

________________________________
Retired
Back to top Go down
Osire

avatar

Game username : Osire
Female Posts : 29
Join date : 2011-09-06

PostSubject: Re: Animated items   Fri Feb 01, 2013 2:16 pm

now it can't be compiled xD

Quote :
1>h:\gameproject\kito\src\client\include\MagixUnit.h(632): error C2039: 'hasAnimationState' : is not a member of 'Ogre::Entity'
1> h:\gameproject\kito\deps\ogresdk_vc10_v1-7-4\include\ogre\OgreEntity.h(81) : see declaration of 'Ogre::Entity'
1>h:\gameproject\kito\src\client\include\MagixUnit.h(634): error C2039: 'hasAnimationState' : is not a member of 'Ogre::Entity'
1> h:\gameproject\kito\deps\ogresdk_vc10_v1-7-4\include\ogre\OgreEntity.h(81) : see declaration of 'Ogre::Entity'
Back to top Go down
RedEye
Retired
avatar

Game username : -redeye-
Server : KITO
Male Posts : 2575
Join date : 2011-07-24
Age : 30

PostSubject: Re: Animated items   Fri Feb 01, 2013 2:17 pm

Lemme check if hasAnimationState was something added later in Ogre

________________________________
Retired
Back to top Go down
RedEye
Retired
avatar

Game username : -redeye-
Server : KITO
Male Posts : 2575
Join date : 2011-07-24
Age : 30

PostSubject: Re: Animated items   Fri Feb 01, 2013 2:33 pm

Fixed. Yup, hasAnimationState for Entity's was added in 1.8

________________________________
Retired
Back to top Go down
Osire

avatar

Game username : Osire
Female Posts : 29
Join date : 2011-09-06

PostSubject: Re: Animated items   Fri Feb 01, 2013 2:47 pm

Working, thank you :3
Back to top Go down
lazyzim

™
avatar

Server : Dragon's Den
Male Posts : 740
Join date : 2011-11-27

PostSubject: Re: Animated items   Sat Feb 02, 2013 9:39 am

OUCH

Well that bloody hurt. Serves me right for adding code when I did not know what it was for.

Read the post from Redeye and there were no other comments at that time.

Assumed we had to add the code in to fix something and "stuffed" my compile.

Read the later comments and decided to remove the code and would still not compile.

God know why, just lucky I backed up before the add and so I was able to restore.

In future I will wait for an explanation of why we are to do things before proceeding.

~Lazyzim~
Back to top Go down
~Shimmer~

avatar

Game username : Shimmer
Server : Last World, DD, ER, IS, I have more~
Female Posts : 17
Join date : 2013-02-10
Age : 25
Location : United States

PostSubject: Re: Animated items   Sun Feb 24, 2013 4:21 pm

Ah, This is very helpful <3
I do need this for my server (Last World)
Thank you Redeye!

~Shim Shim
Back to top Go down
http://www.lastworld-it.proboards.com
 
Animated items
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: START HERE :: KITO's IT Source Code :: Bugs & Patches-
Jump to: