Esempio n. 1
0
 new void CommonInit()
 {
     world       = renderSystem.AllocRenderWorld();
     needsRender = true;
     lightOrigin = new Vector4(-128f, 0f, 0f, 1f);
     lightColor  = new Vector4(1f, 1f, 1f, 1f);
     modelOrigin.Zero();
     viewOffset      = new Vector4(-128f, 0f, 0f, 1f);
     modelAnim       = null;
     animLength      = 0;
     animEndTime     = -1;
     modelDef        = -1;
     updateAnimation = true;
 }
Esempio n. 2
0
        void BuildAnimation(int time)
        {
            if (!updateAnimation)
            {
                return;
            }

            if (animName.Length != 0 && animClass.Length != 0)
            {
                worldEntity.numJoints = worldEntity.hModel.NumJoints;
                worldEntity.joints    = new JointMat[worldEntity.numJoints];
                modelAnim             = gameEdit.ANIM_GetAnimFromEntityDef(animClass, animName);
                if (modelAnim != null)
                {
                    animLength  = gameEdit.ANIM_GetLength(modelAnim);
                    animEndTime = time + animLength;
                }
            }
            updateAnimation = false;
        }