LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   JA Coding (http://www.lucasforums.com/forumdisplay.php?f=539)
-   -   Persistant (http://www.lucasforums.com/showthread.php?t=166403)

alexx860 06-19-2006 05:22 PM

Persistant
 
Hi!
I'm making a command for walking on water. When you type /walkonwater, it sets ent->client->pers.walkonwater to qtrue. No problem here. But how do I retrieve walkonwater variable in bg_***.c files?? There is no ent->client's but only pm->ps ...

Thanks in advance
alexx860

Vruki Salet 06-19-2006 08:03 PM

#ifdef QAGAME

g_entities[pm->ps->clientNum].client->pers.walkonwater

#endif

Put your code between the #ifdef QAGAME and #endif tags and use g_entities[pm->ps->clientNum].client instead of ent->client. That works for me anyway.

alexx860 06-20-2006 04:52 AM

OK, I'll try that, but what is QAGAME??

alexx860 06-20-2006 06:06 AM

Sorry for double post but it work very well ;) TYVM :D
But I'm curious and I want to know what is QAGAME ^_^

ensiform 06-20-2006 08:50 AM

QAGAME is the server module, CGAME is the client module, and you need to do that in QAGAME as he said. however that seems like something that would affect pmove and would need to predict it on the client?

Vruki Salet 06-20-2006 10:32 AM

I'd like to know more about that ensiform. How would you do that and what would happen if you didn't?

ensiform 06-20-2006 01:21 PM

you would send the variable over to the client somehow :sweat:

if you didnt do it, things may look a tad bit funny because the client doesnt know about it, thats one of the reasons why the JA+ "optional" client plugin is more or less actually required. because for 1, people look absoultely retarded if you don't and it can cause you (the client) to not see proper effects of say, a pmove type change

Vruki Salet 06-20-2006 02:53 PM

Quote:

Originally Posted by ensiform
you would send the variable over to the client somehow

So how would *you* do that if you were going to? I was going to take a guess but it makes more sense to just ask you since you seem to know what you're doing. I'm not a programmer so a lot of this is guesswork and voodoo even though I'm learning some things just by doing them. I think alexx860 would like a lesson too.

ensiform 06-20-2006 05:00 PM

using a servercommand and intercept it in cg_servercmds.c or you could send it in the clientinfo thing when it gets sent and checked.

razorace 07-10-2006 08:49 PM

mmm, since it's a simple piece of information that's critical to the pmove code, I'd look into squeezing it in as entity flag, which can be seen in the bg code. Look up any of the EF_ prefixed flags to see what I'm talking about.


All times are GMT -4. The time now is 06:04 PM.

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