Jump to content

Home

Persistant


alexx860

Recommended Posts

Posted

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

Posted

#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.

Posted

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?

Posted

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

Posted
  ensiform said:
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.

  • 3 weeks later...
Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...