Deathshead Corporal

Joined: 18 Feb 2005 Posts: 87
|
Posted: Fri Mar 04, 2005 7:58 am Post subject: [code] Yet another new DrawAmmo routine |
|
|
This is the DrawAmmo routine I am using for Extremeties. I thought I would share it with everyone.
Simply replace the DrawAmmo routine with this:
| Code: |
/*==
==== DrawAmmo
==== Editted by Deathshead
====
==== This is another variation of the original DrawAmmo
==== routine. For each weapon, make the ammo variable equal
==== to the necessary ammotype for the weapon.
==*/
void DrawAmmo (void)
{
char ammo;
switch (gamestate.weapon)
{
case wp_knife:
break;
case wp_pistol:
case wp_machinegun:
case wp_chaingun:
ammo = gamestate.ammo;
break;
}
LatchNumber (27,16,2,ammo);
}
|
I'm 90% sure this saves memory, as you don't need to call LatchNumber(); so many times. It also displays zero ammo when the knife is selected, and can be easily customized to suit your needs. My full one houses ammotypes for all weapons, and a few other things .
If you use this, remember me in the credits.
There you go
-Deathshead _________________ Myspace
VampireFreaks
Music4Life
Wolfing Time |
|