Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Some grenades have weird interactions...

Aperta
#116 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
game-dev

Direzione di ricerca

Reproduce the impulse grenade behavior with the Dummy Faction using the five steps in the issue, then trace how AI weapon switching and grenade timers interact with inventory, equipping, dropping, and death. The issue does not name source files or tests, so begin at the grenade and AI weapon switching entry points. Done means grenades no longer detonate unexpectedly after being switched away from, equipped, dropped, or carried by a dying unit.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

So I was playing with the Dummy Faction and found a weird bug with the impulse grenade.
If any unit controlled by the AI is left holding an impulse grenade in hand they will auto switch to their primary (if they have any) but the grenade will turn active on the units pocket, meaning that once you equip it or the unit dies (causing it to leave the inventory) it will trigger the explosion in pretty much an instant.

Here is how to do it:
Step 1: Have a fellow unit with the impulse grenade and any weapon.
Step 2: Take control of the unit and switch to the impulse grenade.
Step 3: Let the AI take control of the unit.
Step 4: Once again take control of the unit and switch to the impulse grenade.
Step 5: The impulse grenade will either explode as soon as you select it again or after a small delay, it will also activate on death or by dropping it.

Step 5 in particular happens with any other grenade if you first activate it in hand before switching to another weapon yourself (the AI won’t do it).

This grenade in inventory issue could be solved by either deactivating the grenade once a unit switch to another weapon (indirectly fixing the impulse grenade bug as well) or by keeping a timer on the unit that will eventually detonate the grenade on its pocket rather than once it gets dropped or equipped again (this would require fixing the impulse grenade being automatically activated by the AI like done above in Step 3).

The second fix sounds more funny and would fix the main issue of having a grenade with a 0-second timer in your inventory that explodes as soon as it appears.

Lingua principale
C++
Stelle
329
Fork
47
Merge medio
6g 10h
PR unite (30g)
14

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cortex-command-community/Cortex-Command-Community-Project

Tutte le issue di cortex-command-community/Cortex-Command-Community-Project

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.