The old event system had way too much overhead when we start adding more
verbose events (such as firing one each time a footstep is triggered,
something that bots use). The new system is much more efficient, it only
creates and delivers events when a listener exists. You should upgrade
to the new system.

- Alfred

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Damaged Soul
Sent: Saturday, February 19, 2005 1:05 PM
To: [email protected]
Subject: [hlcoders] IGameEventManager/IGameEventListener

I'm curious as to why Valve decided to change these interfaces and use
IGameEvent rather than KeyValues.

One guess that I have, is that KeyValues has more methods than is really
needed for game events. KeyValues has extra things for getting and
setting pointer and color data types. Events only use Bool, Int, Float,
and String data types so those extra methods are not needed for events.
And I would guess that is why IGameEvent is used instead now.

However, by using IGameEvent, a little power is lost as a result. With
KeyValues I was able to determine the data type of a particular
param/argument and also iterate through the list of params/arguments for
an event that had occurred. This kind of thing was very useful for
creating a logging system to print data about every event that occurs
without having to explicitly get the value of a key. I did not have to
actually know the names of all the event params in order to do this.

I have noticed that I am currently still able to use the older
IGameEventListener to do what I want, however the comments in
igamevents.h state it should not be used and is for legacy support. Is
there a particular reason that I should not use the older one? And is
there any chance for IGameEvent to be expanded to allow for iteration of
the event's params/arguments because I would like to use the newer
interface, but it doesn't provide everything I need at the moment.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to