//==================
//     Tchouky      
//==================

All of the model scaling code and saber color code was done by Tchouky.
I just fixed some stuff and added a few of my own modifications like being 
able to sidekick off walls when your not on the ground.  The saber scaling 
code also would have been done by Tchouky if he hadn't left for a month
but he did so I did it instead.


//==================
//    Cvars added to/modified in JediPLUS 4.0 and 4.1
//==================

4.1
mod_kickdmgduel (allows you to turn kick damage on in duels if set to 1)
mod_teamduels (Allows Duels in Team FFA (can duel with own team if friendlyfire is on))
mod_limitgrapple (Disables grapple-kicks and grapple-attacks (no more DFAing then grappling)

4.0
ampass1 - server side, level 1 admin password
ampass2 - server side, level 2 admin password

adminpass - client side, matched with server side admin passwords to determine your admin level.

mod_balancedamage - if set to 1, 2 or more bladed sabers (or 2 sabers) do not do double damage. they do damage as normal

//==================
//    Cvars added to/modified in JediPLUS 3.5
//==================

mod_saberthrowdmg; Damage Saber Throw Does. Default 30


//==================
//    Cvars added to/modified in JediPLUS 3.4
//==================

mod_jetpack; 0 = Jetpack Unavailable. 1 = Jetpack available, except in duel. 2 = Jetpack always available always.

mod_downstab; 1 = Purple special is a Downward Stab. 0 = Purple Spinning DFA is purple Special

mod_damagecontrol;  1 = Setting Damage for All Weapons. 2 = Setting Damage and Velocity for all weapons (no velocity on saber)

mod_bryardmg; Damage Bryar Pistol Does. Default 10

mod_blasterdmg; Damage Blaster Does. Default 20

mod_disruptdmg; Damage for Disruptor Primary Fire. Default 70

mod_disruptaltdmg; Damage for Disruptor Alt. Fire. Default 120

mod_bowdmg; Damage for Bowcaster. Default 50

mod_repeatdmg; Damage for Repeater Primary. Default 14

mod_repeataltdmg; Damage for Repeater Alt-Fire. Default 60

mod_empdmg; Damage for EMP Primary. Default 50

mod_empaltdmg; Damage for EMP Secondary. Default 12

mod_flechettedmg; Damage for Flechette Primary. Default 12

mod_flechettealtdmg; Damage for Flechette Secondary. Default 60

mod_rocketdmg; Damage for Rocket. Default 100

mod_stundmg; Damage for Stun Baton. Default 20

mod_thermdmg; Damage for Thermal Detonator. Default 70

mod_tripdmg; Damage for Trip Mine. Default 100

mod_detpackdmg; Damage for Detpack. Default 100

mod_bryarvel; Bryar Pistol Projectile Velocity. Default 1600

mod_blastervel; Blaster Projectile Velocity. Default 2300

mod_bowvel; Bowcaster Projectile Velocity. Default 1300

mod_repeatvel; Repeater Primary Velocity. Default 1600

mod_repeataltvel; Repeater Alt-Fire Velocity. Default 1400

mod_empvel; EMP Velocity. Default 1800

mod_flechettevel; Flechette Velocity. Default 3700

mod_rocketvel; Rocket Velocity. Default 900


//==================
//    Cvars in JediPLUS 3.3
//==================

mod_damagecontrol;  Turns full server-side saber damage contol on if set to 1

mod_redmin;     - Minimum Damage of Red Stance Standard Attack (default 2)
mod_redmax;     - Maximum Damage of Red Stance Standard Attack (default 120)
mod_rspmin;     - Minimum Damage of Red Stance Special (default 2) (Jump Attack)
mod_rspmax;     - Maximum Damage of Red Stance Special (default 180) (Jump Attack)
mod_rbsmin;     - Minimum Damage of Red Stance Backstab (default 2)
mod_rbsmax;     - Maximum Damage of Red Stance Backstab (default 30)

mod_yspmin;     - Minimum Damage of Yellow Stance Special (default 2) (DFA)
mod_yspmax;     - Maximum Damage of Yellow Stance Special (default 80) (DFA)
mod_ybsmin;     - Minimum Damage of Yellow Stance Backstab (default 2)
mod_ybsmax;     - Maximum Damage of Yellow Stance Backstab (default 25)
mod_yellowdmg;  - Damage of Yellow Stance Standard Attack (default 60)

mod_bspmin;     - Minimum Damage of Blue Stance Special (default 2) (Lunge)
mod_bspmax;     - Maximum Damage of Blue Stance Special (default 30) (Lunge)
mod_bbsmin;     - Minimum Damage of Blue Stance Backstab (default 2)
mod_bbsmax;     - Maximum Damage of Blue Stance Backstab (default 30)
mod_bluedmg;    - Damage of Blue Stance Standard Attack (default 30)

mod_ospmin;     - Minimum Damage of Orange Stance Special (default 2) (Tornado)
mod_ospmax;     - Maximum Damage of Orange Stance Special (default 70) (Tornado)
mod_obsmin;     - Minimum Damage of Orange Stance Backstab (default 2)
mod_obsmax;     - Maximum Damage of Orange Stance Backstab (default 25)
mod_orangedmg;  - Damage of Orange Stance Standard Attack (default 55)

mod_pspmin;     - Minimum Damage of Purple Stance Special (default 2) (DFA2)
mod_pspmax;     - Maximum Damage of Purple Stance Special (default 70) (DFA2)
mod_pbsmin;     - Minimum Damage of Purple Stance Backstab (default 2)
mod_pbsmax;     - Maximum Damage of Purple Stance Backstab (default 25)
mod_purpledmg;  - Damage of Purple Stance Standard Attack (default 30)

g_motd1 to g_motd16;   - In motd.cfg. 16 line total MOTD.

all added cvars star with mod_ so you can do a cvarlist mod_ to see them all.
mod_nerfbs;	if this is 0 then backstab damage is like in 1.03 if it is 1 then it is mid way between 1.03 and 1.04
		if it is 2 then it is like in 1.04 if it is 4 then it is set to the backstab damage variables
                4 = the backstab values from damage control.

mod_blockThrow;	if this is 1 then saber throws can be blocked like in single player

mod_scaleModels;	if this is 1 then models will be scaled by the scale factor set in tckmodel.cfg

mod_scaleDamage	if this is 1 then damage will be scaled based on the attacker's saber size and the defender's 
		model size

mod_scaleKicks	if this is 1 then kick damage and knock back will be scaled based on the attackers model size
		and the defenders model size.

mod_dualbsScale	scales dualsaber style's backstab damage by this factor.  1 is default.

mod_gib		as far as I can tell if this is 1 then people sometimes disintegrate when you kill them

mod_blockScale	the amount of blocking is scaled by this factor.  Higher numbers mean less blocking.  0 means 
		no auto blocking

mod_funSize;	if mod_funMode is 1 this sets all players to the same size eg. mod_funSize 0.2 for small models 
		1.0 is normal size scaleModels might have to be on for this to work

mod_funKick;	if mod_funMode is 1 then this scales the kick dammage and throw back factor 1.0 is normal

mod_funMode;	turn funKick and funSize on and off

mod_nerfspin;	if this is 1 then you cant spin during backstabs

mod_debugcheats;	Can use cheats like /g2animent to spawn stormtroopers.  First you must use the cheataccess
		command with your client number to give yourself access to these cheats.  So if you were the
		server in non dedicated mode you would do /cheatacces 0 in console to give client 0 (you)
		access to the cheats.  You could then do /g2animent to spawn a stormtrooper  There is also
		/g2platoon to spawn a group of stormtroopers

mod_dualblade;	allow players to use the "thedestroyer" cheat without cheats on If it is 2 then players can have
		two dualbladed sabers at once (providing dualsaber is on)

mod_dualsaber;	Allows players to use two sabers at once.  Dualsabers are activated using the command /twosaber
		match must be restarted for this variable to take affect

mod_emotes;	allows emotes to be used some emotes are /nod /shake /kiss /sit /taunt

mod_tag;		kicktag, once this is set to 1 if someone is kicked then he becomes "it" and he has to tag someone
		else by kicking them.  Set this to 0 and then kick one last person and the game will end and show
		who was tagged the most and the least

mod_tagBacks;	are tagbacks allowed for kick tag

mod_funWallRun;	does nothing but you need funMode on to use it

mod_infotime;	does nothing

mod_multiduels;	if set to 1 then multiple duels can happen at once

mod_cangod;	if set to 0 then players cant use god mode when cheats are enabled

ALL MOD_*bsmin and *bsmax have been removed and
replaced with the ones on the damage control area.
if nerfbs is set to one, the damage control backstab values control backstab.


REMOVED; mod_lbsmin;     the minimum dammage that a light style backstab does

REMOVED; mod_lbsmax;     the maximum dammage

REMOVED; mod_mbsmin;     the minimum dammage that a medium style backstab does

REMOVED; mod_mbsmax;     the maximum dammage

REMOVED; mod_hbsmin;     the minimum dammage that a heavy style backstab does

REMOVED; mod_hbsmax;     the maximum dammage

mod_tckcolors;	if 1 then tck colors are enabled

mod_scaleSabers;	if 1 then sabers will be scaled

ban and clientban:  there is also a ban and clientban command that work the same was as kick and clientkick except it just adds
the person's ip to the ban list.  You	then have to kick them.

g_botdoublesaber "1" or "0"
if 1, when you add a bot, he will automatically have a double bladed saber.

g_enableextended "1" or "0"
if 1 the clients will be able to have an extended saber.
(you can bind your key to tck_dualphase or goto the controls setup screen)

g_enablesblock "1" or "0" 
if 1 the saberlockings can happen in ffa, team ffa, and all the gametypes...

bot_honorableduelacceptance "1" or "0"
cheat protection have been removed. if you have you saber off and chalenge a bot in a saber duel he will accept.

mod_infotime
-"500" This is a wait period in milliseconds to protect from people changeing models/extended saber/dualsaber rapidly
-increase for a longer wait period.  Decrease for a shorter waitperiod.  If 0 then there is no wait period.

mod_cheatprotection
-"50" You can not change models if you are this close to another person. 50 is about 4 feet in the game.  
-Increase to expand the no model change radius.  Decrease to allow players to change models when they are close

mod_boxing
-"0" Disable
-"1" You can use the /punch emote and punch people

mod_duelshields
-"0" Get 0 shields after a duel
-Any other number, Get that much shields after a duel (I like 25 since thats what players start with)

mod_pushall
-"1" Items can be pushed like in single player
-"0" Disable

mod_clientscale
-"0" Disable 
-"1" Clients can type /size somenumber to change their size. ex. /size 0.5 makes you the size 0.5

mod_maxsize
-"1.5" Default max size, if a player does /size 2.3 their size will only change to 1.5 because of the maximum
-Any other number changes the maximum size a player can become through the /size command

mod_minsize
-"0.6" Default min size, if a player does /size 0.2 their size will only change to 0.6 because of the minimum
-Any other number changes the minimum size a player can become through the /size command

mod_grapple
-"1" Grappleing hook is useable only by mercs and only in Jedi Vs. Merc mode. (+use to activate hook)
-"2" Grappleing hook is useable by all players in all game modes. (+use to activate hook, default for +use is the e key)
-"0" Grappleing hook is not useable.

/mod_timescale
-"1.0" This isn't really a variable, its actually a command that changes the timescale variable so that you dont have to
           have cheats activated to change the timescale. 
-Any other number, change the timescale.  0.4 is good for slow mo fights.


//===============
Clientside variables

tck_saber "1" or "0"
if 0 then the sabers will not have custom colors.

tck_dualcolor "1" or "0"
if 1 then you will have 2 colors one for the normal saber and one for when it s extended.
the second color is also used for the second blade on a double saber

tck_red1	1->255
tck_green1	1->255
tck_blue1	1->255
these 3 cvar will define the color n1 of your saber.

tck_red2	1->255
tck_green2	1->255
tck_blue2	1->255
these 3 cvar will define the color n2 of your saber.

g_allowForceDuel "1" or "0"
Allows Force Powers other than Mind Trick during Duel

g_allowThrowDuel "1" or "0"
Allows Throwing Saber during Duel

mod_skillMode "0" or "1"
if 1 then damage will be increased or decreased depending on which region of the body was hit.
a hit to the head does 2x damage while a hit to the legs does 0.9x damage

mod_allStances "0" or "1"
if 1 then all stances can be used with dual sabers and the dual bladed saber

mod_nerfDualBlade "0" or "1"
if 1 then players are slowed down when attacking with the double bladed saber.
This is done to make the game more balanced.

mod_hilts "0" or "1"
if 1 then custom hilts may be used.

New Commands:
/hilt "hiltmodelname"
/hilt2 "hiltmodelname"
you can change the hilt for your right hand in the player setup menu
but to change the hilt in the left hand you have to do /hilt2 hiltmodelname

how to use the /g2animent and /g2platoon commands:

g2animent takes 7 arguments: type, alignment, weapon, model, sounds, health, and owner number.

here is an example that spawns an ent that looks and sounds like a rodian, has 100 health, is friendly, and has a blaster
/g2animent 3 2 4 models/players/rodian/model.glm sound/chars/rodian/misc 100 0

type: 
there are 4 types of animents.  0 spawns a storm trooper, 1 spawns a rodian, 2 spawns a jan, and 3 spawns a custom one.
the rest of the arguments only matter if this is 3, otherwise it sets the model and gun and stuff on its own.

alignment:
1 = bad
2 = good
8 = creates one that stands still and only attacks bots unless attacked
9 = creates one that attacks everything except its owner (owner set by owner num, the last argument)

weapon:
0 = none
1 = stun batton
2 = saber (gives them a saber but they cant use it at all)
3 = bryar pistol
... it keeps going in order 13 is the last one
13 = det pack (they dont know how to use it)

model:
the path of the player model
dont put in a bad model or it gets mad.

sounds:
path to the sounds for that model

health:
the health of the animent

owner:
the owner of the animent.  If alignment is 9 then it wont attack its owner.


/g2platoon
this command is just like /g2animent except it doesn't have a health or owner argument.
it spawns a group of ents.

cmod_multipletaunts 
-"1" You will hear multiple taunt sounds
-"0" Disable

cmod_teamrgb
-"0" Disable
-"1" You will see rgb colored sabers in team games.
