Forum

Reload working.... kinda

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Postby ceriux » Sun Jan 24, 2010 7:45 am

all it does, is instead of calling the macro's it sets a start frame and and end frame. um... this might be of some use to you. ( id recommend checking out the scratch tutorials.)




Code: Select all
void () SetClientFrame =
{
   
   if (self.atime > time)
      return;
   self.atime = time + 0.1;
   
   local float achange, walk;
   
   if (self.velocity_x || self.velocity_y)
      walk = TRUE;
   else 
      walk = FALSE;
      achange = FALSE;
   
   if (walk != self.awalk && self.apriority == ANIM_BASIC)
      achange = TRUE;
   
   if (achange != TRUE)
   {
      if (self.frame < self.endframe)
      {
      self.frame = self.frame +1;
      return;
      }
   
   
   if (self.apriority == ANIM_DEATH)
   {
      if (self.deadflag == DEAD_DYING)
      {
         self.nextthink = -1;
         self.deadflag = DEAD_DEAD;
      }
      return;
   }
}


   self.apriority = ANIM_BASIC;
   self.awalk = walk;
   
   
   if (self.velocity_x || self.velocity_y)
   {
      self.frame = 0;
      self.endframe = 10;
   }
   else
   {
      self.frame = 0;
      self.endframe =0;
   }
   
};
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Previous

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest