Advertisement
MonsOlympus

GVSeqAct_Interp

Aug 17th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class GVSeqAct_Interp extends SeqAct_Interp;
  2.  
  3. var() editinline GVAnimNodeCollector AnimNodeCollector;
  4.  
  5. /** this is the amount of time either side of the current position to load/save cached data */
  6. var float BufferSize;
  7.  
  8. var array<BlendNode> BufferedNodes;
  9.  
  10. var bool bFillNodes;
  11.  
  12. var float OldPosition;
  13.  
  14. var() float SampleRate;
  15.  
  16. //var transient name CacheFile;
  17.  
  18.  
  19. event bool Update(float DeltaTime)
  20. {
  21.     if(AnimNodeCollector != none)
  22.     {
  23. /*      if(AnimNodeCollector.Nodes.Length > 0 && bFillNodes)
  24.         {
  25.             FillNodes(Players);
  26.             `log("AnimNodeCollector: Nodes Filled!",,'Gavit')
  27.             bFillNodes=false;
  28.         }*/
  29.  
  30.         if(Position != OldPosition)
  31.         {
  32.             OldPosition = Position;//InterpData.InterpLength
  33.             if(Position > OldPosition+SampleRate)
  34.                 AnimNodeCollector.Update(Position);
  35.  
  36.             if(Position > round(CurrentIndex+AnimNodeCollector.BufferLength/SampleRate))
  37.         }
  38.  
  39.         foreach Players(Pawns)
  40.         {
  41.             if(GVPawn(Pawns) != none && GVPawn(Pawns).PlayMode == PM_Playback)
  42.             {
  43.  
  44.             }
  45.         }
  46.     }
  47.  
  48.     //native(247) static final function float Lerp  ( float A, float B, float Alpha );
  49.  
  50.     return true;
  51. }
  52.  
  53. function Reset()
  54. {
  55.  
  56. }
  57.  
  58. event Activated()
  59. {
  60.     local GVAnimNodeCache CacheObject;
  61.     local Object Pawns;
  62.  
  63.     if(AnimNodeCollector == none)
  64.     {
  65.         AnimNodeCollector = new() class'GVAnimNodeCollector';
  66.         `log("GVMatinee: AnimNodeCollector Initialized!",,'Gavit')
  67.  
  68. //      AnimNodeCollector.FillNodes(Players);
  69.     }
  70.  
  71.     if(AnimNodeCollector != none)
  72.     {
  73.         foreach Players(Pawns)
  74.         {
  75.             if(GVPawn(Pawns) != none)
  76.                 GVPawn(Pawns).AnimNodeCollector=AnimNodeCollector;
  77.         }
  78.     }
  79. }
  80.  
  81. event Deactivated()
  82. {
  83.     if(AnimNodeCollector != none)
  84.     {
  85.  
  86.     }
  87. }
  88.  
  89. defaultproperties
  90. {
  91.     //0.001
  92.  
  93.     ObjName="GVMatinee"
  94.  
  95.     bLooping=false
  96.  
  97.     PlayRate=1.0
  98.     SampleRate=0.03     //0.001
  99.  
  100. //  InputLinks(5)=(LinkDesc="Cache Collector")
  101.  
  102.     VariableLinks(1)=(ExpectedType=class'SeqVar_Player',LinkDesc="Player",PropertyName=Players)
  103. //  VariableLinks(2)=(ExpectedType=class'SeqVar_Name',LinkDesc="Cache File",PropertyName=CacheFile)
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement