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:
driAn
2008-02-11 14:26:58 +00:00
parent 4ac5cf8a30
commit ce678675f4
+8 -5
View File
@@ -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