lfnetwork.com mark read register faq members calendar

Thread: Zero Gravity
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-22-2006, 08:14 PM   #1
ShadyD
Rookie
 
Join Date: Oct 2005
Posts: 25
Zero Gravity

right, i used this tut for Q3 and tried to apply it on JKA. It worked.. not exactly how it should. I was able to create a console CMD telling me wether its on or off but it ddnt actually turn the code on/off. So i was wondering if anyone here could help me. (I Wonder if anyone remembers me :P)
here is what i got than

Code:
#define FL_FLIGHT				0x00200000	//*SD Flight Flag
@ line 67 in g_local.h
(ty wudan for correcting the flag for me)

Code:
/* *SD Flight function for turning flight on/off
=================
Cmd_Flight_f          
=================
*/
void Cmd_Flight_f( gentity_t *ent ) {

   char *msg; // message to player

   ent->flags ^= FL_FLIGHT;

   if (!(ent->flags & FL_FLIGHT))
       msg = "f OFF\n";
   else
	   msg = "f ON\n";

   trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg));
}
@ line 572 in g_cmds.c

Code:
	else if (Q_stricmp (cmd, "fly") == 0)	//*SD flight command
		Cmd_Flight_f (ent);
@ line 3294 in g_cmds.c

and lastly i have these lines of codes i tried putting everywhere with no results

Code:
	if (ent->flags & FL_FLIGHT)		//*SD Flight Gravity
		client->ps.gravity = 0.1f;
@line 2170 in g_active.c

Any help at all would be appreciated!
ShadyD is offline   you may: quote & reply,
Old 08-23-2006, 05:16 PM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
I suspect that gravity is reset in a different part of the code. Try searching thru the files for places where the gravity setting is changed.


---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-26-2006, 07:22 PM   #3
ShadyD
Rookie
 
Join Date: Oct 2005
Posts: 25
yep, it appears i had to move the gravity code a bit up in the code. Ensiform found out the exact location for me. =)
ShadyD 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 > Zero Gravity

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 09:09 AM.

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