Wolf Planet Forum Index Wolf Planet
We want you here!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[code]Knife Ammo Display (quick fix)

 
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance
View previous topic :: View next topic  
Author Message
Deathshead
Corporal


Joined: 18 Feb 2005
Posts: 87

PostPosted: Mon Feb 28, 2005 9:44 am    Post subject: [code]Knife Ammo Display (quick fix) Reply with quote

This is a simple fix that makes the statusbar display 0 ammo when the knife is out. Simply replace the DrawAmmo routine with:

Code:

/*
===============
=
= DrawAmmo
=
===============
*/

void   DrawAmmo (void)
{
   char noammo=0;

   switch (gamestate.weapon)
   {
      case   wp_knife:
         LatchNumber (27,16,2,noammo);
         break;
      case   wp_pistol:
      case   wp_machinegun:
      case   wp_chaingun:
         LatchNumber (27,16,2,gamestate.ammo);
         break;
   }
}


With further editting (which I can't be stuffed doing right at this moment), you can make the area blank when the knife is out.

There you go
-Deathshead
_________________
Myspace
VampireFreaks
Music4Life
Wolfing Time
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Conner94
Moderator


Joined: 15 Jan 2005
Posts: 249
Location: ???

PostPosted: Mon Feb 28, 2005 4:39 pm    Post subject: Reply with quote

Using yours as a base, I found out how to show no ammo with the knife.

Code:


/*
===============
=
= DrawAmmo
=
===============
*/

void   DrawAmmo (void)
{

   switch (gamestate.weapon)
   {
      case   wp_knife:
         StatusDrawPic (27,16,N_BLANKPIC);
    StatusDrawPic (28,16,N_BLANKPIC);
         break;
      case   wp_pistol:
      case   wp_machinegun:
      case   wp_chaingun:
         LatchNumber (27,16,2,gamestate.ammo);
         break;
   }
}


/


As you can see, I simply took out the "char noammo" and had blank pics drawn instead. This is what I used for WarStorm, though is there an even easier way? The only other way I have been shown takes far more memory, so I didn't use that one. No bugs as of now, exept it will currently only work with 1 to 2 digits.
_________________
My Wolfenstein Website:
http://www.wolf94.cjb.net

Status: Falling apart over a product I ordered that is taking forever to arrive.
Back to top
View user's profile Send private message Visit poster's website
Deathshead
Corporal


Joined: 18 Feb 2005
Posts: 87

PostPosted: Tue Mar 01, 2005 12:41 am    Post subject: Reply with quote

Yeah, I thought of using a blank string. Yours is pretty good though!
_________________
Myspace
VampireFreaks
Music4Life
Wolfing Time
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance 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 © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.