]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reloadable shotgun: fix broken automatic switch to best weapon when out of ammo
authorterencehill <piuntn@gmail.com>
Tue, 9 Aug 2022 13:02:22 +0000 (15:02 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 9 Aug 2022 13:13:03 +0000 (15:13 +0200)
qcsrc/common/weapons/weapon/shotgun.qc

index e43aa89aa16344a928276c65eb6d729c95e763e0..403299caabd2af51229b3551c6083a30b37fb3bf 100644 (file)
@@ -212,7 +212,8 @@ METHOD(Shotgun, wr_think, void(entity thiswep, entity actor, .entity weaponentit
             return;
         }
     }
-    else
+
+    if(actor.(weaponentity).clip_load >= 0) // we are not currently reloading
     {
         if(fire & 1)
         {