lfnetwork.com mark read register faq members calendar

Thread: Sound Trackers not followins ents
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 08-01-2004, 08:24 AM   #1
=X=Master HeX
 
=X=Master HeX's Avatar
 
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
Sound Trackers not followins ents

Before I rack my brain on this one and try to hunt down the bug does anyone have any ideas?

Sound trackers (absorb loop/speed loop/rage loop/etc) don't follow the ent like they did in jk2. I started looking into this and noticed they changed the way the trackers are updated client side. Still no idea why the personal tracker follows but not other peoples.

Server? Client? sigh....

=X=Master HeX is offline   you may: quote & reply,
Old 08-01-2004, 02:07 PM   #2
stubert
 
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
how do you mean? and why is it a problem?


but i did find

Code:
 trap_S_AddLoopingSound(entityNum, lerpOrg, cSound->velocity, cSound->sfx);
check out G_Sound in g_utils... it seems to update a ents flags that include ones to play sounds?

Code:
te->s.eFlags = EF_SOUNDTRACKER;
looking around it seems that vectors/events for the sounds are read independently on the client and server from the same sv_Flags (good thing) since jk2 had so many latencey issues i wouldn't bother changing it back since it'd probably create those issues again
stubert is offline   you may: quote & reply,
Old 08-01-2004, 04:29 PM   #3
=X=Master HeX
 
=X=Master HeX's Avatar
 
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
Well, bad news is we can't go back to using the trap command for the sound.

What I'm talking about is back in jk2 if someone put absorb on and walked next to you, you could hear the absorb looping sound. Same for rage/speed/protect. Now in jka the sound is created at a fixed point and doesn't follow the player. So people can only hear the sound where it started.

=X=Master HeX is offline   you may: quote & reply,
Old 08-01-2004, 04:55 PM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
which function is used to start the sound? G_Sound or G_SoundonEnt?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 08-01-2004, 05:47 PM   #5
=X=Master HeX
 
=X=Master HeX's Avatar
 
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
It's G_Sound.. I'm thinking though that it's a clientside bug because all the old sound tracker code is basically the same. I'm only noticing changes to the client and how they handle sound trackers.

=X=Master HeX is offline   you may: quote & reply,
Old 08-01-2004, 06:40 PM   #6
=X=Master HeX
 
=X=Master HeX's Avatar
 
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
Fixed.. it's a bug in CG_UpdateSoundTrackers client side.

=X=Master HeX is offline   you may: quote & reply,
Old 08-01-2004, 06:50 PM   #7
stubert
 
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
lets see it?
stubert is offline   you may: quote & reply,
Old 08-02-2004, 01:52 AM   #8
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Quote:
Originally posted by =X=Master HeX
It's G_Sound.. I'm thinking though that it's a clientside bug because all the old sound tracker code is basically the same. I'm only noticing changes to the client and how they handle sound trackers.
Well, from my experiences with G_Sound and G_SoundonEnt, G_Sound just creates a temp entity at the given location and doesn't attach it to the entity. That's what G_SoundonEnt is for.

This is important as G_Sound ent sounds won't activate the lip syncing. I honestly don't know what the difference is as to moving sounds or looped stuff thou.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 08-03-2006, 01:05 AM   #9
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
*Massive Bump*

JKA's CG_UpdateSoundTrackers:

Code:
void CG_UpdateSoundTrackers()
{
	int num;
	centity_t *cent;

	for ( num = 0 ; num < ENTITYNUM_NONE ; num++ )
	{
		cent = &cg_entities[num];

		if (cent && (cent->currentState.eFlags & EF_SOUNDTRACKER) && cent->currentState.number == num)
			//make sure the thing is valid at least.
		{ //keep sound for this entity updated in accordance with its attached entity at all times
			if (cg.snap && cent->currentState.trickedentindex == cg.snap->ps.clientNum)
			{ //this is actually the player, so center the sound origin right on top of us
				VectorCopy(cg.refdef.vieworg, cent->lerpOrigin);
				trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin );
			}
			else
			{
				trap_S_UpdateEntityPosition( cent->currentState.number, cg_entities[cent->currentState.trickedentindex].lerpOrigin );
			}
		}

		if (cent->currentState.number == num)
		{
			//update all looping sounds..
			CG_S_UpdateLoopingSounds(num);
		}
	}
}
JK2's:

Code:
void CG_UpdateSoundTrackers()
{
	int num;
	centity_t *cent;

	for ( num = 0 ; num < ENTITYNUM_NONE ; num++ )
	{
		cent = &cg_entities[num];

		if (cent && cent->currentState.eFlags & EF_SOUNDTRACKER)
		{ //keep sound for this entity updated in accordance with its attached entity at all times
			if (cg.snap && cent->currentState.trickedentindex == cg.snap->ps.clientNum)
			{ //this is actually the player, so center the sound origin right on top of us
				VectorCopy(cg.refdef.vieworg, cent->lerpOrigin);
				trap_S_UpdateEntityPosition( cent->currentState.number, cent->lerpOrigin );
			}
			else
			{
				trap_S_UpdateEntityPosition( cent->currentState.number, cg_entities[cent->currentState.trickedentindex].lerpOrigin );
			}
		}
	}
}
The Looping Sound Code Is New to JKA so im assuming it is not that but possibly this piece in jka code:

Code:
if (cent && (cent->currentState.eFlags & EF_SOUNDTRACKER) && cent->currentState.number == num)
also, im not sure if it is related to this at all but (usually happens during siege) but at times many in-game sounds tend to not play or are like extremely quiet. For example, force sounds, saber sounds, player deaths, etc.


iojamp project lead / coder

Last edited by ensiform; 08-03-2006 at 01:28 AM.
ensiform is offline   you may: quote & reply,
Old 08-03-2006, 05:44 AM   #10
stubert
 
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
from this thread i can tell i used to know something about jka xDD
stubert is offline   you may: quote & reply,
Old 08-03-2006, 12:30 PM   #11
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
xD


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Sound Trackers not followins ents

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:14 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.