 |
Wolf Planet We want you here!
|
| View previous topic :: View next topic |
| Author |
Message |
Deathshead Corporal

Joined: 18 Feb 2005 Posts: 87
|
Posted: Mon Feb 28, 2005 9:44 am Post subject: [code]Knife Ammo Display (quick fix) |
|
|
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 |
|
 |
Conner94 Moderator

Joined: 15 Jan 2005 Posts: 249 Location: ???
|
Posted: Mon Feb 28, 2005 4:39 pm Post subject: |
|
|
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 |
|
 |
Deathshead Corporal

Joined: 18 Feb 2005 Posts: 87
|
|
| Back to top |
|
 |
|
|
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
|
|