X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fall.qh;h=fa9d64ab8d238666270e193eb967bd4230c19e0a;hb=06ab161ccc7a263edcf926776c8482b961b21522;hp=5bf03fdbe8e8219378fad6546f8d63fbb6f2f4a6;hpb=f72821fdcebe3ca01181a99727a06198de65ea08;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 5bf03fdbe..fa9d64ab8 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -107,15 +107,15 @@ void W_PROP_reload(int chan, entity to) if (f) f(it, chan); }); } -void W_PROP_think() +void W_PROP_think(entity this) { W_PROP_reload(MSG_ALL, NULL); } STATIC_INIT_LATE(W_PROP_reloader) { - SELFPARAM(); entity e = W_PROP_reloader = new_pure(W_PROP_reloader); - WITH(entity, self, e, (e.think = W_PROP_think)()); + setthink(e, W_PROP_think); + W_PROP_think(e); } #endif @@ -299,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; @@ -309,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