Skip to content

Commit

Permalink
More minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Sep 8, 2024
1 parent 57ded95 commit 4be124f
Show file tree
Hide file tree
Showing 6 changed files with 430 additions and 441 deletions.
253 changes: 140 additions & 113 deletions src/c_cmds.c

Large diffs are not rendered by default.

545 changes: 263 additions & 282 deletions src/m_config.c

Large diffs are not rendered by default.

27 changes: 4 additions & 23 deletions src/m_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,8 @@ extern uint64_t stat_firstrun;
extern uint64_t stat_gamesloaded;
extern uint64_t stat_gamessaved;
extern uint64_t stat_itemspickedup;
extern uint64_t stat_itemspickedup_ammo_bullets;
extern uint64_t stat_itemspickedup_ammo_cells;
extern uint64_t stat_itemspickedup_ammo[NUMAMMO];
extern uint64_t stat_itemspickedup_ammo_fuel;
extern uint64_t stat_itemspickedup_ammo_rockets;
extern uint64_t stat_itemspickedup_ammo_shells;
extern uint64_t stat_itemspickedup_armor;
extern uint64_t stat_itemspickedup_health;
extern uint64_t stat_itemspickedup_keys;
Expand All @@ -255,33 +252,17 @@ extern uint64_t stat_monsterskilled_banshees;
extern uint64_t stat_monsterskilled_ghouls;
extern uint64_t stat_monsterskilled_mindweavers;
extern uint64_t stat_monsterskilled_shocktroopers;
extern uint64_t stat_monsterskilled_vassagos;
extern uint64_t stat_monsterskilled_tyrants;
extern uint64_t stat_monsterskilled_vassagos;
extern uint64_t stat_monstersrespawned;
extern uint64_t stat_monstersresurrected;
extern uint64_t stat_monsterstelefragged;
extern uint64_t stat_runs;
extern uint64_t stat_secretsfound;
extern uint64_t stat_shotsfired_fists;
extern uint64_t stat_shotsfired_chainsaw;
extern uint64_t stat_shotsfired_pistol;
extern uint64_t stat_shotsfired_shotgun;
extern uint64_t stat_shotsfired_supershotgun;
extern uint64_t stat_shotsfired_chaingun;
extern uint64_t stat_shotsfired_rocketlauncher;
extern uint64_t stat_shotsfired_plasmarifle;
extern uint64_t stat_shotsfired_bfg9000;
extern uint64_t stat_shotsfired[NUMWEAPONS];
extern uint64_t stat_shotsfired_incinerator;
extern uint64_t stat_shotsfired_calamityblade;
extern uint64_t stat_shotssuccessful_fists;
extern uint64_t stat_shotssuccessful_chainsaw;
extern uint64_t stat_shotssuccessful_pistol;
extern uint64_t stat_shotssuccessful_shotgun;
extern uint64_t stat_shotssuccessful_supershotgun;
extern uint64_t stat_shotssuccessful_chaingun;
extern uint64_t stat_shotssuccessful_rocketlauncher;
extern uint64_t stat_shotssuccessful_plasmarifle;
extern uint64_t stat_shotssuccessful_bfg9000;
extern uint64_t stat_shotssuccessful[NUMWEAPONS];
extern uint64_t stat_shotssuccessful_incinerator;
extern uint64_t stat_shotssuccessful_calamityblade;
extern uint64_t stat_skilllevel_imtooyoungtodie;
Expand Down
8 changes: 4 additions & 4 deletions src/p_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,22 @@ void P_UpdateAmmoStat(const ammotype_t ammotype, const int num)
{
case am_clip:
viewplayer->itemspickedup_ammo_bullets += num;
stat_itemspickedup_ammo_bullets = SafeAdd(stat_itemspickedup_ammo_bullets, num);
stat_itemspickedup_ammo[am_clip] = SafeAdd(stat_itemspickedup_ammo[am_clip], num);
break;

case am_shell:
viewplayer->itemspickedup_ammo_shells += num;
stat_itemspickedup_ammo_shells = SafeAdd(stat_itemspickedup_ammo_shells, num);
stat_itemspickedup_ammo[am_shell] = SafeAdd(stat_itemspickedup_ammo[am_shell], num);
break;

case am_cell:
viewplayer->itemspickedup_ammo_cells += num;
stat_itemspickedup_ammo_cells = SafeAdd(stat_itemspickedup_ammo_cells, num);
stat_itemspickedup_ammo[am_cell] = SafeAdd(stat_itemspickedup_ammo[am_cell], num);
break;

case am_misl:
viewplayer->itemspickedup_ammo_rockets += num;
stat_itemspickedup_ammo_rockets = SafeAdd(stat_itemspickedup_ammo_rockets, num);
stat_itemspickedup_ammo[am_misl] = SafeAdd(stat_itemspickedup_ammo[am_misl], num);
break;

default:
Expand Down
6 changes: 3 additions & 3 deletions src/p_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,14 @@ static bool PIT_CheckThing(mobj_t *thing)
if (tmtype == MT_PLASMA)
{
viewplayer->shotssuccessful[wp_plasma]++;
stat_shotssuccessful_plasmarifle = SafeAdd(stat_shotssuccessful_plasmarifle, 1);
stat_shotssuccessful[wp_plasma] = SafeAdd(stat_shotssuccessful[wp_plasma], 1);
}
else if (tmtype == MT_ROCKET)
{
if (tmthing->nudge == 1)
{
viewplayer->shotssuccessful[wp_missile]++;
stat_shotssuccessful_rocketlauncher = SafeAdd(stat_shotssuccessful_rocketlauncher, 1);
stat_shotssuccessful[wp_missile] = SafeAdd(stat_shotssuccessful[wp_missile], 1);
}

tmthing->nudge++;
Expand Down Expand Up @@ -2069,7 +2069,7 @@ bool PIT_RadiusAttack(mobj_t *thing)
if (bombspot->nudge == 1)
{
viewplayer->shotssuccessful[wp_missile]++;
stat_shotssuccessful_rocketlauncher = SafeAdd(stat_shotssuccessful_rocketlauncher, 1);
stat_shotssuccessful[wp_missile] = SafeAdd(stat_shotssuccessful[wp_missile], 1);
}

bombspot->nudge++;
Expand Down
32 changes: 16 additions & 16 deletions src/p_pspr.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void A_Punch(mobj_t *actor, player_t *player, pspdef_t *psp)
P_LineAttack(actor, angle, range, slope, damage);

player->shotsfired[readyweapon]++;
stat_shotsfired_fists = SafeAdd(stat_shotsfired_fists, 1);
stat_shotsfired[wp_fist] = SafeAdd(stat_shotsfired[wp_fist], 1);

if (linetarget || hitwall)
{
Expand All @@ -440,7 +440,7 @@ void A_Punch(mobj_t *actor, player_t *player, pspdef_t *psp)
actor->angle = R_PointToAngle2(actor->x, actor->y, linetarget->x, linetarget->y);

player->shotssuccessful[readyweapon]++;
stat_shotssuccessful_fists = SafeAdd(stat_shotssuccessful_fists, 1);
stat_shotssuccessful[wp_fist] = SafeAdd(stat_shotssuccessful[wp_fist], 1);
}
else if (isberserk && r_shake_berserk)
{
Expand Down Expand Up @@ -473,7 +473,7 @@ void A_Saw(mobj_t *actor, player_t *player, pspdef_t *psp)
P_NoiseAlert(actor);

player->shotsfired[readyweapon]++;
stat_shotsfired_chainsaw = SafeAdd(stat_shotsfired_chainsaw, 1);
stat_shotsfired[wp_chainsaw] = SafeAdd(stat_shotsfired[wp_chainsaw], 1);
idlechainsawrumblestrength = 0;

if (!linetarget)
Expand All @@ -483,7 +483,7 @@ void A_Saw(mobj_t *actor, player_t *player, pspdef_t *psp)
}

player->shotssuccessful[readyweapon]++;
stat_shotssuccessful_chainsaw = SafeAdd(stat_shotssuccessful_chainsaw, 1);
stat_shotssuccessful[wp_chainsaw] = SafeAdd(stat_shotssuccessful[wp_chainsaw], 1);

S_StartSound(actor, sfx_sawhit);

Expand Down Expand Up @@ -517,7 +517,7 @@ void A_FireMissile(mobj_t *actor, player_t *player, pspdef_t *psp)
P_RumbleWeapon(readyweapon);

player->shotsfired[readyweapon]++;
stat_shotsfired_rocketlauncher = SafeAdd(stat_shotsfired_rocketlauncher, 1);
stat_shotsfired[wp_missile] = SafeAdd(stat_shotsfired[wp_missile], 1);
}

//
Expand Down Expand Up @@ -619,7 +619,7 @@ void A_FirePlasma(mobj_t *actor, player_t *player, pspdef_t *psp)
P_SpawnPlayerMissile(actor, MT_PLASMA);

player->shotsfired[readyweapon]++;
stat_shotsfired_plasmarifle = SafeAdd(stat_shotsfired_plasmarifle, 1);
stat_shotsfired[wp_plasma] = SafeAdd(stat_shotsfired[wp_plasma], 1);
P_RumbleWeapon(readyweapon);
}

Expand Down Expand Up @@ -699,12 +699,12 @@ void A_FirePistol(mobj_t *actor, player_t *player, pspdef_t *psp)
P_RumbleWeapon(readyweapon);

player->shotsfired[readyweapon]++;
stat_shotsfired_pistol = SafeAdd(stat_shotsfired_pistol, 1);
stat_shotsfired[wp_pistol] = SafeAdd(stat_shotsfired[wp_pistol], 1);

if (successfulshot)
{
player->shotssuccessful[readyweapon]++;
stat_shotssuccessful_pistol = SafeAdd(stat_shotssuccessful_pistol, 1);
stat_shotssuccessful[wp_pistol] = SafeAdd(stat_shotssuccessful[wp_pistol], 1);
}
}

Expand Down Expand Up @@ -734,12 +734,12 @@ void A_FireShotgun(mobj_t *actor, player_t *player, pspdef_t *psp)
P_RumbleWeapon(readyweapon);

player->shotsfired[readyweapon]++;
stat_shotsfired_shotgun = SafeAdd(stat_shotsfired_shotgun, 1);
stat_shotsfired[wp_shotgun] = SafeAdd(stat_shotsfired[wp_shotgun], 1);

if (successfulshot)
{
player->shotssuccessful[readyweapon]++;
stat_shotssuccessful_shotgun = SafeAdd(stat_shotssuccessful_shotgun, 1);
stat_shotssuccessful[wp_shotgun] = SafeAdd(stat_shotssuccessful[wp_shotgun], 1);
}

player->preferredshotgun = readyweapon;
Expand Down Expand Up @@ -772,12 +772,12 @@ void A_FireShotgun2(mobj_t *actor, player_t *player, pspdef_t *psp)
P_RumbleWeapon(readyweapon);

player->shotsfired[readyweapon]++;
stat_shotsfired_supershotgun = SafeAdd(stat_shotsfired_supershotgun, 1);
stat_shotsfired[wp_supershotgun] = SafeAdd(stat_shotsfired[wp_supershotgun], 1);

if (successfulshot)
{
player->shotssuccessful[readyweapon]++;
stat_shotssuccessful_supershotgun = SafeAdd(stat_shotssuccessful_supershotgun, 1);
stat_shotssuccessful[wp_supershotgun] = SafeAdd(stat_shotssuccessful[wp_supershotgun], 1);
}

player->preferredshotgun = readyweapon;
Expand Down Expand Up @@ -828,12 +828,12 @@ void A_FireCGun(mobj_t *actor, player_t *player, pspdef_t *psp)
P_RumbleWeapon(readyweapon);

player->shotsfired[readyweapon]++;
stat_shotsfired_chaingun = SafeAdd(stat_shotsfired_chaingun, 1);
stat_shotsfired[wp_chaingun] = SafeAdd(stat_shotsfired[wp_chaingun], 1);

if (successfulshot)
{
player->shotssuccessful[readyweapon]++;
stat_shotssuccessful_chaingun = SafeAdd(stat_shotssuccessful_chaingun, 1);
stat_shotssuccessful[wp_chaingun] = SafeAdd(stat_shotssuccessful[wp_chaingun], 1);
}
}

Expand Down Expand Up @@ -892,12 +892,12 @@ void A_BFGSpray(mobj_t *actor, player_t *player, pspdef_t *psp)
}

viewplayer->shotsfired[wp_bfg]++;
stat_shotsfired_bfg9000 = SafeAdd(stat_shotsfired_bfg9000, 1);
stat_shotsfired[wp_bfg] = SafeAdd(stat_shotsfired[wp_bfg], 1);

if (successfulshot)
{
viewplayer->shotssuccessful[wp_bfg]++;
stat_shotssuccessful_bfg9000 = SafeAdd(stat_shotssuccessful_bfg9000, 1);
stat_shotssuccessful[wp_bfg] = SafeAdd(stat_shotssuccessful[wp_bfg], 1);
}

successfulshot = false;
Expand Down

0 comments on commit 4be124f

Please sign in to comment.