Just taking a swing here at this. But 2 problems I see right off with this
system is the fact that

A.) With a entity being in the map (your grate to emit steam) its spawn
function is called generally when the map is still loading (your not in the
map yet). So wouldnt sending a playevent while your not fully in the game,
b\c the server is still loading, pretty much void that call ?

B.) If this is a multiplayer mod then the other clients would not get this
event b\c its only called on map load. So clients connecting after that load
would never get the msg.

Thats the 2 possible problem areas Im seeing right off.

-Brandon "Axis" Russell
Programmer for
Day of Defeat



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:hlcoders-admin@;list.valvesoftware.com]On Behalf Of Persuter
Sent: Sunday, October 27, 2002 1:25 AM
To: [EMAIL PROTECTED]
Subject: [hlcoders] Problem with client-side events


Hey folks.

I have a question about client-side events. I'm trying to program something
simple here: an entity that sends a message to the client-side telling it
to start a particle system when it spawns, i.e., a grate from which dynamic
steam emits, or something similar.

I have the following code:

void CParticleEmitter::Spawn( void )
{
        Precache();
        PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_UPDATE, edict(), m_usStartParticle,
0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, type, 0, 0, 0 );
}

void CParticleEmitter::Precache( void )
{
        m_usStartParticle = PRECACHE_EVENT( 1, "events/particle.sc" );
}

(type, by the way, is the type of system to add)

Now, this all works fine and dandy, the event gets precached, the playback
function goes through fine, the problem is that on the client side the
corresponding function never gets called. On the client-side dll, I've
added the function declaration in both ev_hldm.cpp and hl_events.cpp, and
I've added the HookEvent in hl_events.cpp as well. I dunno, I'm perfectly
able to do weapons but for some reason this one has me at a loss, and the
one client-side non-weapon event in the SDK isn't much help. Am I missing
something required in the spawn function or on the client side that is
simply part of the weapons code?

Thanks for any help.

Persuter

_______________________________________________
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