| Author |
Topic: APOXOL - Help Please! |
| D3VIANCE~rb |
General Member Since: Dec 23, 2006 Posts: 63 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Monday, Mar. 10, 2003 09:31 pm |
 |
// playerState_t is the information needed by both the client and server to predict player motion and actions // nothing outside of pmove should modify these, or some degree of prediction error will occur // you can't add anything to this without modifying the code in msg.cThe above, found in q_shared.h, is absolutely true, and has stopped me from adding in a new variable for a new "g_blah" cvar I was going to cross-reference in g_active.c, as you have done with g_speed, for example: // set speed client->ps.speed = g_speed.value; I wanted to do this so I could use the format "pm->ps->blah" in bg_pmove.c, as I cannot seem to refer to "g_blah" and get the compiler to recognise it. I've noticed that none of the bg_* files actually refer to any of the game's cvars, and this is probably why. Oh, and I can't find msg.c anywhere.  --=-- In short - please tell me how to use a conditional statement ( "if (g_blah.integer) { }" ) in bg_pmove.c, where g_blah is any given cvar, such as g_speed, g_friendlyFire etc.Many thanks in advance! |
 |
|
|
| slowJusko~rb |
General Member Since: Dec 23, 2006 Posts: 457 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Monday, Mar. 10, 2003 10:12 pm |
 |
Setup a regular g_bla cvar with the CVAR_SERVERINFO flag set. Then detect said cvar client side
ie. bg_allowProne from ManDown : In g_main.c near the top : vmCvar_t bg_allowProne;
In g_main.c at the end of gameCvarTable : { &bg_allowProne, "g_allowProne", "1", CVAR_SERVERINFO|CVAR_ARCHIVE, 0.0, 0.0, 0, qtrue },
In bg_public.h somewhere : extern vmCvar_t bg_allowProne;
In cg_main.c near the top : vmCvar_t bg_allowProne;
In cg_info.c, CG_DrawInformation() : bg_allowProne.integer = atoi(Info_ValueForKey(info, "g_allowProne")); In cg_servercmds.c, CG_ParseServerinfo() : bg_allowProne.integer = atoi(Info_ValueForKey(info, "g_allowProne"));
In bg_pmove.c, anywhere I need to use it : if (bg_allowProne.integer bla bla bla
Hope that helps. |
 |
|
|
| D3VIANCE~rb |
General Member Since: Dec 23, 2006 Posts: 63 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| Sevensins~rb |
General Member Since: Dec 23, 2006 Posts: 274 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Monday, Mar. 10, 2003 11:38 pm |
 |
ugh, I hate all caps in titles  anyways msg.c is part of the engine code...so you can stop looking  you can't add anything to the playerstate* (*note: well you can sorta, but its not really worth it) |
 |
|
|
| D3VIANCE~rb |
General Member Since: Dec 23, 2006 Posts: 63 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| Apoxol~rb |
General Member Since: Dec 23, 2006 Posts: 2139 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| D3VIANCE~rb |
General Member Since: Dec 23, 2006 Posts: 63 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Sunday, Mar. 16, 2003 03:16 am |
 |
Gotcha. Thanks Apoxol, good points also.  My mod gets released next week, and I think Raven will be particularly interested in how it's turned out - as it merges your current and your previous Soldier of Fortune projects into one. The PhoeniX is rising... |
 |
|
|
| Torchy2~rb |
General Member Since: Dec 23, 2006 Posts: 272 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Sunday, Mar. 16, 2003 01:14 pm |
 |
| Quote (D3VIANCE @ Mar. 16 2003, 3:16 am) | it merges your current and your previous Soldier of Fortune projects into one.  |
soldier of fortune 33 1/3  |
 |
|
|
| D3VIANCE~rb |
General Member Since: Dec 23, 2006 Posts: 63 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| sneax~rb |
General Member Since: Dec 23, 2006 Posts: 95 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Friday, Mar. 21, 2003 08:16 pm |
 |
| Quote (D3VIANCE @ Mar. 15 2003, 9:16 pm) | Gotcha. Thanks Apoxol, good points also. 
My mod gets released next week, and I think Raven will be particularly interested in how it's turned out - as it merges your current and your previous Soldier of Fortune projects into one.
The PhoeniX is rising... |
Take out da shotty - time to blow your way through suddan and parking, soaking through piles of intestins and dismemberd pieces of bodies - blood hanging all over the walls, then when you get round the corner, you spot that enemy - you jump and the first opponnent shot misses, you come down rolling (right in front of a body, missing its head) you jump up, and while in the air shoot the fooker a bullet right through his head ... you turn around and repeat the whole process, for every enemy - god I loved that game 
My text might not be very poetic I'm not original english but you get my friggin' point  |
 |
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|