ensiform Posted July 10, 2005 Share Posted July 10, 2005 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: 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: extern vmCvar_t WP_DISRUPTOR_DELAY; extern vmCvar_t WP_DISRUPTOR_ZOOMJUMP; now in bg_pmove.c: inside the #ifdef QAGAME: #define PM_DISRUPTOR_DELAY WP_DISRUPTOR_DELAY.integer #define PM_DISRUPTOR_ZOOMJUMP (WP_DISRUPTOR_ZOOMJUMP.integer & 1) now replace the #endif with: #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: 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... 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: 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. Link to comment Share on other sites More sharing options...
Tinny Posted July 11, 2005 Share Posted July 11, 2005 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? Link to comment Share on other sites More sharing options...
ensiform Posted July 11, 2005 Author Share Posted July 11, 2005 nope i can take a look maybe tomorrow. Link to comment Share on other sites More sharing options...
razorace Posted July 21, 2005 Share Posted July 21, 2005 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. Link to comment Share on other sites More sharing options...
stubert Posted July 21, 2005 Share Posted July 21, 2005 ensi seriously stop sharing my **** without asking i will slap you in the nuts Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.