Jump to content

Home

Tchouky...need help with Model scaling


zERoCooL2479

Recommended Posts

Okay,

1) I wanna say thanks for creating such aspects to the game as model and saber scaling....

 

2) I am recently building a mod which I want to keep server side only...however, I found a lot of the scaling code has those #ifdef CLIENTSIDE, #ifdef CLIENTCOMPILE...Is it possible just to get rid of those?

 

3) There are multiple declarations of the cvar mod_scaleModels...one in game and one is cgame...I would get rid of the cgame one right?

 

Anyways, those are my main questions...and if you or anyone else for that matter can help me with this issue...I'd be more that glad to include them in my mod.

 

Thanks!!

 

PS: Can we e-mail instead of public post?

Link to comment
Share on other sites

you can get rid of all clientside and cliencompile defines....

 

i never wrote them ...

dest added them....

I've copied everything Tchouky did, except commented the CLIENTSIDE stuff (I think thats legal)...Now the guys legs are through the floor, it is quite a funny sight I must say...However, does anyone know how to resolve this issue?

well you must have missed a few lines.

check out the origin of your players....

 

a little off topic :

i removed all dest's defines....

 

you just have to use the tck struct which is BG so all you have to do is create let s say a big array with all the rules.

like nerfspin, scalemodel...

and store it in the tck struct.

and fill it clientside and server side so you won't have these ugly defines....

Link to comment
Share on other sites

Tchouky, Thanks for your reply...however, I am having trouble understanding the whole rules thing in an array and putting the clientside and serverside in there. Could you explain further? Or if not we can talk it over via e-mail...Thanks a lot man, you been a great help so far :)

Link to comment
Share on other sites

Originally posted by zERoCooL2479

Tchouky, Thanks for your reply...however, I am having trouble understanding the whole rules thing in an array and putting the clientside and serverside in there. Could you explain further? Or if not we can talk it over via e-mail...Thanks a lot man, you been a great help so far :)

 

2 hours of research/reading will save you 10 hours of debugging/contemplating suicide. At least, that's this coder's motto.

 

'nuff said?

Link to comment
Share on other sites

ok , here it is :

 

let's start with the rule struct :

typedef struct
{
...
...
int nerfspin;

}tck_rules_t;

then in the tck struct add :

typedef struct 
{
...
...
...
tck_rules_t rules;

} tck_t;


in cg_servercommands.c
in CG_ParseServerinfo()

put :

tck.rules.nerfspin = atoi( Info_ValueForKey( info, "mod_nerfspin" ) ); 

in g_active.c
in ClientTimerActions() (<< can find a better place)

put :
tck.rules.nerfspin = g_mof_nerfspin;


and in you BG_ files

use tck.rules.nerfspin instead of :

#ifdef CLIENTCOMPILE
vmCvar_t mod_nerfspin;
#endif

#ifdef CLIENTCOMPILE
mod_nerfspin.integer=cgs.mod_nerfspin;
#endif

 

 

there might be errors i didn't really checked nor tested this...

(well i did it a long time ago but i wrote this now without veryfying)

there is room for improvement of course and i invite you to understand this and not copy and paste the code...

(which could lead to many errors :) )

good luck

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...