immediate autoreload
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1640 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -827,7 +827,13 @@ struct gun : weapon
|
||||
if(attackmillis<gunwait) return false;
|
||||
gunwait = reloading = 0;
|
||||
|
||||
if(!owner->attacking) { shots = 0; return false; }
|
||||
if(!owner->attacking)
|
||||
{
|
||||
shots = 0;
|
||||
checkautoreload();
|
||||
return false;
|
||||
}
|
||||
|
||||
updatelastaction(owner);
|
||||
if(!mag)
|
||||
{
|
||||
@@ -871,10 +877,7 @@ struct gun : weapon
|
||||
|
||||
int modelanim() { return modelattacking() ? ANIM_GUN_SHOOT|ANIM_LOOP : ANIM_GUN_IDLE; };
|
||||
|
||||
void checkautoreload()
|
||||
{
|
||||
if(autoreload && owner==player1 && !mag) reload();
|
||||
}
|
||||
void checkautoreload() { if(autoreload && owner==player1 && !mag) reload(); }
|
||||
};
|
||||
|
||||
struct shotgun : gun
|
||||
|
||||
Reference in New Issue
Block a user