summaryrefslogtreecommitdiff
path: root/src/game/bg_pmove.c
diff options
context:
space:
mode:
authorJeff Kent <jeff@jkent.net>2017-04-13 11:30:00 +0000
committer/dev/humancontroller <devhc@example.com>2017-04-15 17:20:41 +0200
commit26e25997647bfcc8692a2209e5670d4c0119ea8c (patch)
treebe69b2f824a6b749e12849a8b6da32e6ca59d1a0 /src/game/bg_pmove.c
parentb4c0348da140348f3cbb48cfe544c5682c9e5d34 (diff)
multi-protocol: change the playerState_t and entityState_t structs to the versions in the latest code base
this includes changing how ammo and clips r stored
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r--src/game/bg_pmove.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 88707bd..73ee6d9 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -2796,8 +2796,8 @@ static void PM_Weapon( void )
}
// start the animation even if out of ammo
-
- BG_UnpackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, &ammo, &clips );
+ ammo = pm->ps->ammo;
+ clips = pm->ps->clips;
BG_FindAmmoForWeapon( pm->ps->weapon, NULL, &maxClips );
// check for out of ammo
@@ -2825,7 +2825,8 @@ static void PM_Weapon( void )
BG_InventoryContainsUpgrade( UP_BATTPACK, pm->ps->stats ) )
ammo = (int)( (float)ammo * BATTPACK_MODIFIER );
- BG_PackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips );
+ pm->ps->ammo = ammo;
+ pm->ps->clips = clips;
//allow some time for the weapon to be raised
pm->ps->weaponstate = WEAPON_RAISING;
@@ -3079,13 +3080,15 @@ static void PM_Weapon( void )
else
ammo--;
- BG_PackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips );
+ pm->ps->ammo = ammo;
+ pm->ps->clips = clips;
}
else if( pm->ps->weapon == WP_ALEVEL3_UPG && attack3 )
{
//special case for slowblob
ammo--;
- BG_PackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips );
+ pm->ps->ammo = ammo;
+ pm->ps->clips = clips;
}
//FIXME: predicted angles miss a problem??
@@ -3291,7 +3294,8 @@ void PmoveSingle( pmove_t *pmove )
pm = pmove;
- BG_UnpackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, &ammo, &clips );
+ ammo = pm->ps->ammo;
+ clips = pm->ps->clips;
// this counter lets us debug movement problems with a journal
// by setting a conditional breakpoint fot the previous frame