Skip to content

Commit 101c828

Browse files
committed
Fixed creating and firing custom events in events.custom.CustomEvent.fire()
1 parent 0ab65f1 commit 101c828

File tree

1 file changed

+3
-3
lines changed
  • addons/source-python/packages/source-python/events

1 file changed

+3
-3
lines changed

addons/source-python/packages/source-python/events/custom.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from collections import OrderedDict
99

1010
# Source.Python Imports
11-
from event_c import GameEvent
11+
from event_c import GameEventManager
1212
from public import public
1313
# Events
1414
from events import EventsLogger
@@ -96,7 +96,7 @@ def fire(self):
9696
'''Fires the event with the stored variable values'''
9797

9898
# Get the event's instance
99-
event = GameEvent(self.name, True)
99+
event = GameEventManager.create_event(self.name, True)
100100

101101
# Loop through the event's variables
102102
for variable in self._odict:
@@ -106,7 +106,7 @@ def fire(self):
106106
variable, getattr(self, '_' + variable))
107107

108108
# Fire the event
109-
event.fire_event()
109+
GameEventManager.fire_event(event)
110110

111111
def reset(self):
112112
'''Resets all event variable values to their default values'''

0 commit comments

Comments
 (0)