lfnetwork.com mark read register faq members calendar

Thread: server-side bg_pmove.c cvars...
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 07-10-2005, 07:08 PM   #1
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
server-side bg_pmove.c cvars...

Here's how i fixed up stubert's b0rked code for wp_disruptor_delay and wp_disruptor_zoomjump:


have the external declarations in g_local.h like u normally would:

Code:
extern vmCvar_t WP_DISRUPTOR_DELAY;
extern vmCvar_t WP_DISRUPTOR_ZOOMJUMP;
do not decalare them at all in cgame...

bg_local.h near the bottom above the include:

Code:
extern vmCvar_t WP_DISRUPTOR_DELAY;
extern vmCvar_t WP_DISRUPTOR_ZOOMJUMP;
now in bg_pmove.c:

inside the #ifdef QAGAME:

Code:
#define PM_DISRUPTOR_DELAY WP_DISRUPTOR_DELAY.integer
#define PM_DISRUPTOR_ZOOMJUMP (WP_DISRUPTOR_ZOOMJUMP.integer & 1)
now replace the #endif with:


Code:
#elif CGAME
#define PM_DISRUPTOR_DELAY 0 // no client mod
#define PM_DISRUPTOR_ZOOMJUMP 0 // no client mod
#endif
the original code for not allowing jump:
Code:
else if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1)
	{ //can't jump
		if (pm->cmd.upmove > 0)
		{
			pm->cmd.upmove = 0;
		}
	}
stu's ****ed up code...

Code:
else if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1)
	{ //can't jump
		//stu- THINK AGAIN!! WP_DISRUPTOR_ZOOMJUMP switches it on and off (it's a cvar)
		if (pm->cmd.upmove > 0)
		{
			if (WP_DISRUPTOR_ZOOMJUMP.integer >= 1) //stu- to allows players to jump while zoomed
			{
			pm->cmd.upmove = 0;
			}
		}
	}
better code to use:

Code:
else if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1 && !PM_DISRUPTOR_ZOOMJUMP)
	{ //can't jump
		if (pm->cmd.upmove > 0)
		{
			pm->cmd.upmove = 0;
		}
	}
Now of course you, use your own cvars and do your own sections and this is if the client really is not needed which in this case its not.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 07-10-2005, 08:16 PM   #2
Tinny
 
Tinny's Avatar
 
Join Date: Apr 2002
Posts: 1,188
Thanks bro, one thing I was trying to do was allowing the tenloss to be charged up while allowing the player to zoom, kind of like in jo sp. Any idea on how to get that to work?


Redeemed!

An old school mod for jedi academy.
Tinny is offline   you may: quote & reply,
Old 07-10-2005, 08:33 PM   #3
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
nope i can take a look maybe tomorrow.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 07-21-2005, 11:05 AM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
It's also possible to use additional pm-> OR directly access cvars while in the pm code. If anyone needs a direct example of either, I can provide one.


---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 07-21-2005, 07:37 PM   #5
stubert
 
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
ensi seriously stop sharing my **** without asking

i will slap you in the nuts
stubert 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 > server-side bg_pmove.c cvars...

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 05:31 AM.

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