Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // on BerimbauClientMode
- // ===============================
- // first time initializing your array of models (cbaseanimatingoverlay, or whatever)
- Initialize(){
- for all character models
- set model()
- useclientsideanimation()
- }
- // looped
- UpdateCharacterModels(){
- for all character models
- model->frameadvance
- }
- // on CharacterMenu
- // ===============================
- // have a pointer record which one you have selected
- CBaseAnimatingOverlay *pSelectedCharacter;
- // on click
- OnClick(){
- // figure out which character the player is attempting to select
- CBaseAnimatingOverlay *pNewSelected = // however you actually get it
- // if we have one already selected
- if( pSelectedCharacter != null )
- {
- // find the idle animation for this character
- idleanimation = character GetData( idle animation key )
- // set the animation
- pSelectedCharacter-> ResetSequence( idleanimation )
- }
- pSelectedCharacter = pNewSelected;
- // find the active animation for this character
- activeanimation = character GetData( active animation key )
- pSelectedCharacter->ResetSequence( activeanimation )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement