alexx860 Posted June 19, 2006 Share Posted June 19, 2006 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 Link to comment Share on other sites More sharing options...
Vruki Salet Posted June 20, 2006 Share Posted June 20, 2006 #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. Link to comment Share on other sites More sharing options...
alexx860 Posted June 20, 2006 Author Share Posted June 20, 2006 OK, I'll try that, but what is QAGAME?? Link to comment Share on other sites More sharing options...
alexx860 Posted June 20, 2006 Author Share Posted June 20, 2006 Sorry for double post but it work very well TYVM But I'm curious and I want to know what is QAGAME ^_^ Link to comment Share on other sites More sharing options...
ensiform Posted June 20, 2006 Share Posted June 20, 2006 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? Link to comment Share on other sites More sharing options...
Vruki Salet Posted June 20, 2006 Share Posted June 20, 2006 I'd like to know more about that ensiform. How would you do that and what would happen if you didn't? Link to comment Share on other sites More sharing options...
ensiform Posted June 20, 2006 Share Posted June 20, 2006 you would send the variable over to the client somehow 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 Link to comment Share on other sites More sharing options...
Vruki Salet Posted June 20, 2006 Share Posted June 20, 2006 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. Link to comment Share on other sites More sharing options...
ensiform Posted June 20, 2006 Share Posted June 20, 2006 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. Link to comment Share on other sites More sharing options...
razorace Posted July 11, 2006 Share Posted July 11, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.