lfnetwork.com mark read register faq members calendar

Thread: making efx instant
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-21-2007, 02:56 AM   #1
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
making efx instant

I was just wondering if anyone knew where I could look and try to make the disruptor fire immediately no matter what ping you have, like how the weapons are in HL2.
Thanks.
Cohsty243 is offline   you may: quote & reply,
Old 08-21-2007, 11:59 AM   #2
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
I didn't think there was a delay. And thats almost impossible for a game to do that, having lag will cause you to lose packets and such a possibility to not see the effects. That being said, this would be an engine issue, not a server-module issue. So the answer is nowhere.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-22-2007, 03:21 AM   #3
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
I'n other words predicted weapon effects like cg_trueLightning.
Cohsty243 is offline   you may: quote & reply,
Old 08-22-2007, 01:42 PM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
It's possible, but you'd have to hack the client side to predict where the beam would shoot. Currently the effect is rendered in response to a game event that is sent from the server.


---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-22-2007, 06:09 PM   #5
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
cg_trueLightning doesn't do anything. That is, in jka anyway.

And you still would need to have an event of some-sort.

I don't think you would want to mimick the affect of cg_trueLightning anyway, that is more along the lines of a lightning gun or flame thrower, grapple hook etc. Not a single beam. The reason it takes long is because there is a fireTime.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-23-2007, 01:13 PM   #6
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Well, it could be made to be an animation based effect.


---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-24-2007, 02:52 AM   #7
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
I know this is offtopic but lol, does anybody know what tools I can use to compile Q3 1.32 src code for linux and which OS and compiler is recommended?
Cohsty243 is offline   you may: quote & reply,
Old 08-24-2007, 12:34 PM   #8
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Quote:
Originally Posted by Cohsty243
I know this is offtopic but lol, does anybody know what tools I can use to compile Q3 1.32 src code for linux and which OS and compiler is recommended?
Linux is the OS. GCC is the tools you want and comes with the distro generally.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-24-2007, 06:05 PM   #9
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
if I compile a qvm on win32 would it work on linux too?
Cohsty243 is offline   you may: quote & reply,
Old 08-25-2007, 07:56 AM   #10
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
yes
XycaleTh is offline   you may: quote & reply,
Old 08-25-2007, 11:00 AM   #11
Deathspike
Rookie
 
Join Date: Sep 2005
Posts: 11
At the bottom of CG_FireWeapon( centity_t *cent, qboolean altFire )
Code:
CG_PredictWeaponEffects( cent );
The magically calculation, renders and functions
Code:
void CG_CalculateLinePath( centity_t *cent, vec3_t uMuzzlePoint, vec3_t uForward, vec3_t uRight, vec3_t uUp, vec3_t endPoint, vec3_t uNormal, int entityNum )
{
	// Moved the calculation into this function so not only unlagged can use it, but
	// other functions such as the lasersight will have access so it too.

	trace_t		trace;

	// Fetch the muzzle point.
	CG_CalcMuzzlePoint( cg.predictedPlayerState.clientNum, uMuzzlePoint );

	// Get the foward vector.
	AngleVectors( cg.predictedPlayerState.viewangles, uForward, uRight, uUp );

	// Trace to what end position we might come.
	VectorMA( uMuzzlePoint, 8192, uForward, endPoint );

	// Find where the trace ends, for example if we hit a player or not.
	CG_Trace( &trace, uMuzzlePoint, vec3_origin, vec3_origin, endPoint, cg.predictedPlayerState.clientNum, CONTENTS_SOLID|CONTENTS_BODY );

	// Team ghosting? Predicted effects have to do this manually now i presume.
	// Keep looping and looping untill we have been cleared from that entityNum.
	while ( 1 )
	{
		if ((( trace.fraction < 1.0 || trace.startsolid ) && trace.entityNum < MAX_CLIENTS ) && cgs.clientinfo[trace.entityNum].team != TEAM_FREE && cgs.clientinfo[trace.entityNum].team == cgs.clientinfo[cg.predictedPlayerState.clientNum].team )
		{
			CG_Trace( &trace, trace.endpos, vec3_origin, vec3_origin, endPoint, trace.entityNum, CONTENTS_SOLID|CONTENTS_BODY );
		}
		else
		{
			break;
		}
	}

	// If you are in first person, we need to alter the position slightly.
	if ( !cg.renderingThirdPerson )
	{
		// Forward a bit, otherwise i will break it at spawn. (Base working)
		VectorMA( uMuzzlePoint, 18, uForward, uMuzzlePoint );

		// Its at the middle of the screen at this point. Slightly alter it.
		VectorMA( uMuzzlePoint, 2, uRight, uMuzzlePoint );
		VectorMA( uMuzzlePoint, -4, uUp, uMuzzlePoint );

		// Snipers want to have the muzzle slightly altered again, a bit lower.
		if ( cg.predictedPlayerState.zoomMode )
		{
			VectorMA( uMuzzlePoint, -2, uUp, uMuzzlePoint );
		}
	}
	
	// Copy the trace end position, whats supposed to be real, to the endPoint.
	VectorCopy( trace.endpos, endPoint );

	// Copy the plane normal to uNormal so we can render some effects.
	VectorCopy( trace.plane.normal, uNormal );

}

void CG_PredictWeaponEffects( centity_t *cent )
{
	vec3_t		endPoint, uMuzzlePoint, uForward, uRight, uUp, uNormal;
	int			entityNum = -1;

	// If the client isn't me, ignore it.
	if ( cent->currentState.number != cg.predictedPlayerState.clientNum ) 
	{
		return;
	}

	// Calculate all the positions.
	CG_CalculateLinePath( cent, uMuzzlePoint, uForward, uRight, uUp, endPoint, uNormal, entityNum );

	// Make a nice effect for when you are sniping.
	if ( cg.predictedPlayerState.zoomMode )
	{
		FX_DisruptorAltShot( uMuzzlePoint, endPoint, cent->currentState.shouldtarget );
	}
	// And obviously, do that too, when you're not sniping.
	else
	{
		FX_DisruptorMainShot( uMuzzlePoint, endPoint ); 
	}

	// We hit something, can be a client but also an object.
	if ( entityNum < MAX_CLIENTS )
	{
		FX_DisruptorHitPlayer( endPoint, uNormal, qtrue );
	}
	// We didn't hit anything.
	else
	{
		if ( cg.predictedPlayerState.zoomMode )
		{
			FX_DisruptorAltMiss( endPoint, uNormal );
		}
		else
		{
			FX_DisruptorHitWall( endPoint, uNormal );
		}
	}
	
}
Credits to Deathspike if you use it please, thank you.

NoteNote: This code was written for my mod which had some things such as teamghosting. You're going to have to wreck that part out if you dont want it in the prediction. Also in order to have only one line, you'll need to supress the fire, impact events from the server (which belong to you).
Deathspike is offline   you may: quote & reply,
Old 08-26-2007, 02:02 AM   #12
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
JK3 does not support qvm anyway and the lcc compiler with jk2 will not work correctly, so don't try it.

Anywho, I just made a hack that does team colored always size of alt fire beam when in instagib mode for my mod. Going to be working on a way to toggle if zoom is allowed or not.

FYI there is no need to have unlagged anymore than the optimized prediction in the client side. Newer technologies on the server side eliminate the need for the unnecessary ugly hacks :S.

I have: Minimal unlagged (took out the G_RunFrame loops and such). Moved the prediction stuff to be done on the pmove itself of the server-side. Added some Antilag features of Wolf:ET, and even merged the recently posted code for antiwarp from ETPro.

Hmm deathspike from what I can tell is that its only determining to use the alt fire beam when YOU are using zoom, not the entity. That will cause everyone with a disruptor shot at the time of you scoping to show as that and everyone with a disruptor shot when you are to show up as the normal beam.


iojamp project lead / coder

Last edited by ensiform; 08-27-2007 at 12:48 AM.
ensiform is offline   you may: quote & reply,
Old 08-29-2007, 08:02 AM   #13
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
well im going to use qvm for q3 not jk3 lol.

oh, where'd you find that antiwarp src code at ? :P

i figured out how to make cvars control the fireTimes of weapons a long time ago if anyone is interested.

does anyone know where i can find the fireTimes in q3 source, been searching a while but i keep missing it lol.

EDIT: found them.

Last edited by Cohsty243; 08-29-2007 at 08:42 AM.
Cohsty243 is offline   you may: quote & reply,
Old 08-29-2007, 04:54 PM   #14
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
For making mods for q3, should I be using Q3A_TA_Gamesource_132 or quake3-1.32b? and does anyone know of tutorials for making QVMs, I have Microsoft Visual C++ 2005 Express and Microsoft Visual C++ 6.0.
Cohsty243 is offline   you may: quote & reply,
Old 08-29-2007, 11:01 PM   #15
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
You should be using the ioq3 source. FYI this is a JKA coding section not Q3 and Lucas/Star Wars related stuff for that matter .

Try www.quakesrc.org/forums.

Building QVMs usually involves using a batch file or shell script; not compiling in MSVC any version.

As for antiwarp... well lets just say I know some people.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-30-2007, 01:12 AM   #16
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
haha, I finally figured out how to compile a QVM, but I get errors from using Haste's unlagged 2.01 code lol.

Thanks for the Link.
Cohsty243 is offline   you may: quote & reply,
Old 08-30-2007, 05:46 AM   #17
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
Quote:
As for antiwarp... well lets just say I know some people.
I found the antiwarp code from the ETPub mod, dunno if it's the same thing though
XycaleTh is offline   you may: quote & reply,
Old 08-30-2007, 02:25 PM   #18
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Quote:
Originally Posted by XycaleTh
I found the antiwarp code from the ETPub mod, dunno if it's the same thing though
As did I.


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 > making efx instant

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 11:15 AM.

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