Counter-Strike: Fixed some warnings.

This commit is contained in:
Marco Cawthorne 2020-08-03 18:49:30 +02:00
parent 743d7a33d0
commit 3c4a518b8e
6 changed files with 13 additions and 10 deletions

View File

@ -279,14 +279,14 @@ CBaseMonster::AttackRanged(void)
void
CBaseMonster::AttackDraw(void)
{
dprint(sprintf("^1%s::AttackDraw: Not defined!\n", ::classname));
dprint(sprintf("^1%s::AttackDraw: Not defined!\n", classname));
m_flAttackThink = time + 0.5f;
}
void
CBaseMonster::AttackHolster(void)
{
dprint(sprintf("^1%s::AttackHolster: Not defined!\n", ::classname));
dprint(sprintf("^1%s::AttackHolster: Not defined!\n", classname));
m_flAttackThink = time + 0.5f;
}

View File

@ -110,7 +110,7 @@ ammoinfo_t cs_ammoinfo[11] = {
int
Ammo_BuyCaliber(player pl, int cal, int free)
{
int *ptr_ammo;
int *ptr_ammo = __NULL__;
int rv = 0;
while (pl.money - cs_ammoinfo[cal].price > 0) {
@ -145,6 +145,8 @@ Ammo_BuyCaliber(player pl, int cal, int free)
case CALIBER_57MM:
ptr_ammo = &pl.ammo_57mm;
break;
default:
error("Ammo_BuyCaliber: Impossible caliber definition.");
}
if (*ptr_ammo >= cs_ammoinfo[cal].a_max)

View File

@ -80,7 +80,7 @@ CSEv_BuyWeapon_f(float fWeapon)
maxit = rules.MaxItemPerSlot(g_weapons[iWeapon].slot);
if (maxit > 0) {
int wantslot = g_weapons[iWeapon].slot;
int c;
int c = 0;
for (int i = 0; i < g_weapons.length; i++) {
if (pl.g_items & g_weapons[i].id && g_weapons[i].slot == wantslot) {
c++;

View File

@ -81,7 +81,7 @@ Money_HasBonus(int team)
void
Money_HandleRoundReward(int winner)
{
int loser;
int loser = -1;
if (winner == TEAM_CT) {
g_cs_winstreak_ct++;
@ -93,7 +93,7 @@ Money_HandleRoundReward(int winner)
if (g_cs_winstreak_ct >= 2) {
g_cs_bonus_ct = TRUE;
}
} else if (winner == TEAM_T) {
} else {
g_cs_winstreak_t++;
g_cs_winstreak_ct = 0;
g_cs_roundslost_ct++;

View File

@ -648,7 +648,8 @@ Recursive function that gets the next spawnpoint
entity
CSMultiplayerRules::PlayerFindSpawn(float t)
{
entity point;
entity point = world;
if (t == TEAM_T) {
m_eLastTSpawn = find(m_eLastTSpawn, ::classname, "info_player_deathmatch");

View File

@ -156,7 +156,7 @@ hostage_entity::Pain(int iHitBody)
if (g_dmg_eAttacker.classname != "player")
return;
Money_AddMoney(g_dmg_eAttacker, -(g_dmg_iDamage * 25));
Money_AddMoney((base_player)g_dmg_eAttacker, -(g_dmg_iDamage * 25));
}
void
@ -176,9 +176,9 @@ hostage_entity::Death(int iHitBody)
return;
if (g_dmg_iDamage >= 100)
Money_AddMoney(g_dmg_eAttacker, -2500);
Money_AddMoney((base_player)g_dmg_eAttacker, -2500);
else
Money_AddMoney(g_dmg_eAttacker, -500);
Money_AddMoney((base_player)g_dmg_eAttacker, -500);
Radio_BroadcastMessage(RADIO_HOSDOWN);
}