Cleaned up some warnings.

This commit is contained in:
Marco Cawthorne 2020-05-02 05:28:21 +02:00
parent b7c2c61a88
commit bfa3412277
4 changed files with 8 additions and 7 deletions

View file

@ -45,6 +45,7 @@ static float g_obituary_time;
void
Obituary_Init(void)
{
int c;
int i;
filestream fh;
string line;
@ -61,7 +62,7 @@ Obituary_Init(void)
/* count valid entries */
while ((line = fgets(fh))) {
if (substring(line, 0, 2) == "d_") {
int c = tokenize(line);
c = tokenize(line);
if (c == 7 && argv(1) == "640") {
g_obtype_count++;
}
@ -75,7 +76,7 @@ Obituary_Init(void)
/* read them in */
while ((line = fgets(fh))) {
if (substring(line, 0, 2) == "d_") {
int c = tokenize(line);
c = tokenize(line);
/* we only care about the high-res (640) variants. the 320
* HUD is useless to us. Just use the builtin scaler */

View file

@ -39,7 +39,7 @@ void item_pickup::touch(void)
}
}
void item_pickup::setitem(int i)
void item_pickup::SetItem(int i)
{
id = i;
m_oldModel = Weapons_GetWorldmodel(id);
@ -66,7 +66,7 @@ void item_pickup::Respawn(void)
think = __NULL__;
nextthink = -1;
if (!m_iWasDropped || cvar("sv_playerslots") > 1) {
if (!m_iWasDropped && cvar("sv_playerslots") > 1) {
Sound_Play(this, CHAN_ITEM, "item.respawn");
m_iClip = -1;
}

View file

@ -24,7 +24,7 @@ class item_pickup:CBaseTrigger
void(void) item_pickup;
virtual void(void) touch;
virtual void(int i) setitem;
virtual void(int i) SetItem;
virtual void(void) Respawn;
virtual void(int) SetFloating;
};

View file

@ -382,7 +382,7 @@ void Weapons_InitItem(int w)
{
item_pickup it = (item_pickup)self;
spawnfunc_item_pickup();
it.setitem(w);
it.SetItem(w);
}
void Weapons_UpdateAmmo(player pl, int a1, int a2, int a3)
@ -433,7 +433,7 @@ void Weapon_DropCurrentWeapon(player pl)
return;
item_pickup drop = spawn(item_pickup, m_iWasDropped: TRUE, m_iClip: pl.a_ammo1);
drop.setitem(pl.activeweapon);
drop.SetItem(pl.activeweapon);
setorigin(drop, pl.origin);
drop.solid = SOLID_NOT;
drop.think = DropWeapon_Enable;