lfnetwork.com mark read register faq members calendar

Thread: Jedi Master
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 03-04-2006, 09:32 PM   #1
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Jedi Master

I've noticed when you kick the jedi master or they disco it doesnt exactly drop the saber and return it so i figured it needs the same code as when they suicide in ClientDisconnect:

Code:
	if ( g_gametype.integer == GT_JEDIMASTER ) {
		if ( ent->client->ps.isJediMaster )
		{ //killed ourself so return the saber to the original position
			//(to avoid people jumping off ledges and making the saber
			//unreachable for 60 seconds)
			ThrowSaberToAttacker(ent, NULL);
			ent->client->ps.isJediMaster = qfalse;
		}
	}
i stuck that just below the part about stop following in clientdisconnect.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 03-04-2006, 09:38 PM   #2
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
i also noticed bots dont attempt to shoot people when there is no master yet the other functions seem to say they can but PassStandardEnemyChecks doesnt check it.

so..

move the declaration of qboolean G_ThereIsAMaster(void); above PassStandardEnemyChecks and change the jedi master part of it in that function (ai_main.c) to this:

Code:
	if (g_gametype.integer == GT_JEDIMASTER && !en->client->ps.isJediMaster && !bs->cur_ps.isJediMaster && G_ThereIsAMaster())
	{ //rules for attacking non-JM in JM mode
		vec3_t vs;
		float vLen = 0;

		if (!g_friendlyFire.integer)
		{ //can't harm non-JM in JM mode if FF is off
			return 0;
		}

		VectorSubtract(bs->origin, en->client->ps.origin, vs);
		vLen = VectorLength(vs);

		if (vLen > 350)
		{
			return 0;
		}
	}


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 03-04-2006, 10:13 PM   #3
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Quote:
Originally Posted by ensiform
I've noticed when you kick the jedi master or they disco it doesnt exactly drop the saber and return it so i figured it needs the same code as when they suicide in ClientDisconnect:
I thought the JM saber think function handled that by just respawning?


---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 03-04-2006, 10:21 PM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Also, thanks for the JM fix. I'll add it to the code now.


---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,
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 > Community > Hosted Forums > Open Jedi Project (OJP) > Jedi Master

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 12:54 AM.

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