*** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@629 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -40,7 +40,6 @@ void spawnstate(playerent *d) // reset player state not persistent
|
||||
if(d==player1)
|
||||
{
|
||||
gun_changed = true;
|
||||
player1->primary = m_osok ? GUN_SNIPER : (m_pistol ? GUN_PISTOL : player1->nextprimary);
|
||||
if(player1->skin!=player1->nextskin)
|
||||
{
|
||||
c2sinit=false;
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ struct vec
|
||||
struct block { int x, y, xs, ys; };
|
||||
|
||||
enum { GUN_KNIFE = 0, GUN_PISTOL, GUN_SHOTGUN, GUN_SUBGUN, GUN_SNIPER, GUN_ASSAULT, GUN_GRENADE, NUMGUNS };
|
||||
#define reloadable_gun(g) (g != GUN_KNIFE || g != GUN_GRENADE)
|
||||
#define reloadable_gun(g) (g != GUN_KNIFE && g != GUN_GRENADE)
|
||||
|
||||
enum { MCMD_KICK = 0, MCMD_BAN, MCMD_REMBANS };
|
||||
|
||||
|
||||
@@ -120,20 +120,16 @@ COMMAND(altaction, ARG_1INT);
|
||||
void reload(playerent *d)
|
||||
{
|
||||
if(!d || d->state!=CS_ALIVE || d->reloading || d->weaponchanging) return;
|
||||
if(!reloadable_gun(d->gunselect)) return;
|
||||
if(d->mag[d->gunselect] >= magsize(d->gunselect)) return;
|
||||
if(!reloadable_gun(d->gunselect) || d->ammo[d->gunselect]<=0) return;
|
||||
if(d->mag[d->gunselect] >= (has_akimbo(d) ? 2 : 1)*guns[d->gunselect].magsize) return;
|
||||
if(d == player1) setscope(false);
|
||||
|
||||
if(has_akimbo(d) && d->mag[d->gunselect]>=(guns[d->gunselect].magsize * 2)) return;
|
||||
else if(d->mag[d->gunselect]>=guns[d->gunselect].magsize && d->akimbo==0) return;
|
||||
if(d->ammo[d->gunselect]<=0) return;
|
||||
|
||||
d->reloading = true;
|
||||
d->lastaction = lastmillis;
|
||||
d->akimbolastaction[0] = d->akimbolastaction[1] = lastmillis;
|
||||
d->gunwait = guns[d->gunselect].reloadtime;
|
||||
|
||||
int numbullets = guns[d->gunselect].magsize - d->mag[d->gunselect];
|
||||
int numbullets = (has_akimbo(d) ? 2 : 1)*guns[d->gunselect].magsize - d->mag[d->gunselect];
|
||||
|
||||
if(has_akimbo(d)) numbullets = guns[d->gunselect].magsize * 2 - d->mag[d->gunselect];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user