Pass return value to WeaponSwitchPost, WeaponCanUsePost, WeaponCanSwitchToPost
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 60/100
Direzione di ricerca
Start from plugins/include/sdkhooks.inc, where the SDKHook_WeaponSwitchPost/WeaponCanUsePost/WeaponCanSwitchToPost callback typedefs are declared, and from the SDKHooks extension sources under extensions/sdkhooks/ where those forwards are created and invoked. Use SDKHook_ReloadPost as the working template: trace exactly how bSuccess is captured from the engine hook and pushed into the forward, then do the same for the three missing hooks. Check with the maintainer whether the pending khook migration branch should land first, since the hooks may be rewritten. Done means all three Post callbacks accept the extra bool parameter, the include file and any callback documentation match, and a small test plugin compiles against the new signatures.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
SDKHook_ReloadPost already passes the engine function's return value into the callback:
void OnReloadPost(int weapon, bool bSuccess)
The following hooks also return meaningful bool values, but their Post callbacks do not expose them:
SDKHook_WeaponSwitchPost
SDKHook_WeaponCanUsePost
SDKHook_WeaponCanSwitchToPost
Plugins need the real outcome e.g., whether a weapon switch actually succeeded. Adding the return value as an extra callback parameter, consistent with ReloadPost, would cover this cleanly.
@Kenzzer this might be a quick addition during the khook migration, or I'm happy to submit a PR once that branch lands.
- Lingua principale
- C++
- Stelle
- 1.2k
- Fork
- 476
- Merge medio
- 2g 9h
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di alliedmodders/sourcemod
-
[Bug]: RoundToNearest truncates in plugins compiled with spcomp 1.13Forse già presa @fmu1337 l’ha presa oggi. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
alliedmodders/sourcemod#2627 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
alliedmodders/sourcemod#2615 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
alliedmodders/sourcemod#2613 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
alliedmodders/sourcemod#2571 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Disable Nextmap for CSGO?ApertaFeature Request
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 64/100
alliedmodders/sourcemod#2555 · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di alliedmodders/sourcemod
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
patrick-hudson/put.gd-desktop#2044 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
uxlfoundation/oneDNN#6604 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni