Inside3D!
     

Animations in DarkPlaces

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Boss429



Joined: 03 Dec 2006
Posts: 22

PostPosted: Sun Mar 01, 2009 7:20 am    Post subject: Animations in DarkPlaces Reply with quote

I've been tearing my hair out trying to get quakec to use the correct frames for a different v_shotgun model.
I'm using that q3mdl mod as a base for my code.
The firing animation I want to use is from frame 14 to 17 but it keeps playing something like frame 2 instead.


Here's what the shotgun section of W_Attack
Code:
   else if (self.weapon == IT_SHOTGUN)
   {

      player_shot1 ();
      W_FireShotgun ();

      self.attack_finished = time + 0.5;
   }

player_shot1:
Code:
void() player_shot1 = {W_FireShotgun(); self.torso.animation = 1;};


here's the player eachframe:
Code:
void() md3_player_eachframe =
{
   local   float   r;

   if (intermission_running)
      return;

   if (self.weapon == IT_AXE)
   {
      if (self.weaponframe > 0)
      {
         self.weaponframe = self.weaponframe + 1;
         if (self.weaponframe == 4 || self.weaponframe == 8)
            self.weaponframe = 0;
      }
      if (self.newattack)
      {
         r = random();
              if (r < 0.25)   {self.weaponframe = 1;}
         else if (r < 0.5)   {self.weaponframe = 5;}
         else if (r < 0.75)   {self.weaponframe = 1;}
         else         {self.weaponframe = 5;}
         self.newattack = FALSE;
      }
   }
   else if (self.weapon == IT_SHOTGUN)
   {
      if (self.weaponframe > 13)
      {
         self.weaponframe = self.weaponframe + 1;
         if (self.weaponframe == 17)
            self.weaponframe = 13;

      }
      if (self.newattack)
      {
         self.weaponframe = 14;
         self.newattack = FALSE;
      }
   }


what am I missing?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group