EmitSound:
I have an entity that derives from CItem, and I'm using ItemTouch. I set
DEFINE_ENTITYFUNC( ItemTouch ), in my DATA_DESC. The function works fine,
but if the player leaves the collision box of the entity while the sound is
playing it just stops the sound. This doesn't happen in the case of it's
Respawn sound, which uses EmitSound without the CPASAttenuationFilter. Am I
using the CPASAttenuationFilter wrong? Or is it something to do with the
ItemTouch function itself?

Here's the relevant functions: http://pastebin.com/Mu72VBxQ


Spectating an Entity:
I've been trying unsuccessfully for a few days now to get the player to
spectate a custom entity. I did SetObserverTarget( entity ), and if I debug
it, it goes into player.cpp->bool CBasePlayer::SetObserverTarget(
CBaseEntity *target) (Line 2551 or so) (Code Here:
http://pastebin.com/YytP90ua ). I modified IsValidObserverTarget to not kick
out when trying to observe something other than a player.

It hits m_hObserverTarget.Set( target ). It also hits SetObserverTarget on
C_BasePlayer ( http://pastebin.com/eAWZy41A ), and hits everything.

It doesn't hit the if ( m_iObserverMode == OBS_MODE_ROAMING ) on
CBasePlayer::SetObserverTarget -- Do you have to be in OBS_MODE_ROAMING to
observe something?
When the player spectates another player, what is he doing. Is his logical
entity moving around, or just his camera?

Any help over these two issues would be great, I've been stuck here for 2
days now... :P


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

Reply via email to