File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ type WeaponFiredEvent struct {
106106// NadeEventIf is the interface for all NadeEvents. Used to catch
107107// the different events with the same handler.
108108type NadeEventIf interface {
109- implementsNadeEventIf ()
109+ Base () NadeEvent
110110}
111111
112112// NadeEvent contains the common attributes of nade events. Dont register
@@ -118,8 +118,10 @@ type NadeEvent struct {
118118 NadeEntityID int
119119}
120120
121- // Make NadeEvents implement NadeEventIf
122- func (NadeEvent ) implementsNadeEventIf () {}
121+ // Base returns the NadeEvent itself, used for catching all events with NadeEventIf
122+ func (ne NadeEvent ) Base () NadeEvent {
123+ return ne
124+ }
123125
124126// HeExplodedEvent signals the explosion of a HE.
125127type HeExplodedEvent struct {
You can’t perform that action at this time.
0 commit comments