]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qh
Only spawn a single casing when firing shotgun
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qh
index b86b77fadf4ffc0cb14de612227121f3433c2635..fa9d64ab8d238666270e193eb967bd4230c19e0a 100644 (file)
@@ -114,7 +114,8 @@ void W_PROP_think(entity this)
 STATIC_INIT_LATE(W_PROP_reloader)
 {
     entity e = W_PROP_reloader = new_pure(W_PROP_reloader);
-    WITHSELF(e, (setthink(e, W_PROP_think))(e));
+    setthink(e, W_PROP_think);
+    W_PROP_think(e);
 }
 #endif
 
@@ -298,6 +299,7 @@ REGISTRY_CHECK(Weapons)
 
 STATIC_INIT(register_weapons_done)
 {
+       string inaccessible = "";
     FOREACH(Weapons, true, {
         WepSet set = it.m_wepset = _WepSet_FromWeapon(it.m_id = i);
         WEPSET_ALL |= set;
@@ -308,8 +310,9 @@ STATIC_INIT(register_weapons_done)
         if (imp <= WEP_IMPULSE_END)
             localcmd(sprintf("alias weapon_%s \"impulse %d\"\n", it.netname, imp));
         else
-            LOG_TRACEF("Impulse limit exceeded, weapon will not be directly accessible: %s\n", it.netname);
+               inaccessible = strcat(inaccessible, "\n", it.netname);
     });
+    if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s\n", inaccessible);
     #ifdef CSQC
     FOREACH(Weapons, true, it.wr_init(it));
     #endif