Jump to content

Help for coding. :S


Recommended Posts

Posted

I am really at good poin, i need only to edit by class the effects of Heal and Mindtrick, and customize the sound of the effects changed and i end! :D after i realease all my edits! :D

Posted

Yay i am near to the end of my work! soon i share my edit code with all community! :) i hope someone can use for mod with fantasy contest about JKA. :)

Posted

Okay, men here there is ALL my code editing about the Legacy of Kain necessity.

I hope someone can use all this thing for their personal necessity on other modding project.

here is that:

 

New weapon list:

WP_SABER: sword, reavers, shield and glyphes

WP_BLASTER_PISTOL: ball of darkness.

WP_BLASTER: fireballs

WP_DISRUPTOR: first shot: spirith death (kill istantly and separe soul by body) alt fire: immolation "burn enemy and disgregate the body.

WP_BOWCASTER: lightballs

WP_REPEATER: water \ ice Bolt, also use for Rahaim hydrocinesis.

WP_FLECHETTE: earth bolt. i hacked the code for shooting only 1 stone projectile instead of six in the primary attack.

WP_DEMP2: spirit bolt, huge damage on demon and vampires and monster, low damage on sarafan and sacred warrior and mortal creature.

WP_CONCUSSION: at moment is for the stun and incapacitate spell, but i can use mindtrick and mindtrickscript on map about that so... maybe i edit for make a sonic spell with sonic shocwave?

WP_ROCKET: exposive air ball

WP_THERMAL: fire glyph grenades

WP_TRIPMINE: plant that explode impaling enemyt, and sound sonic mine: explode stunning the enemy.

DETPACK: stone glyph bomb, explode with a quake and paralysis on near enemies. i will what that someone explain me how to make the freeze code for end that.

WP_JAWA:: sonic shoot.

WP_TUSKEN_RIFLE: a bowcaster with fire arrows for human against vampires.

WP_BRYAR_PISTOL a bow with sonic and light arrows.

WP_ATST_ MAIN: huge lightning shoot. only NPC and demons

WP_ATST_SIDE: primary attack: shoot demon hell fireball. secondary attack: shoot the huge energy balls of the Elder God.

 

About Force Power:

CORE POWER:

FP_PUSH: cinetic bolt.

liv 1: weak

liv 2: medium

liv 3: frontal shockwave

FP_PULL: telekinesis

LIV 1: weak attaction

Liv 2: disarm weak enemies

Livr 3: high suck attack. enemy fall on the platyer.

editi: i make more transparent the pushblur.

FP_JUMP

liv 1: a little powered jump

liv 2: vampire and reavers standard jump ability

liv 3: Kain blood omen 2 \ defiance Jump.

I deleted jump sound, the jump sound is mixed with voice characters on sound\chars\  folders, and so everyone can make a customize juimp: vampire play their voice, mixed with the sound of the spell. reaver not play the sound ofthe spell but a flap sound of their wings. :)

FP_SPEED:

slow time for enemy  , acceleraion for vampires. i not make change

FP_GRIP: grab, choke and move the eenemy, is the telekinesis of Defiance of Kain and Turel. i changed color of the blur aura into green, like into Defiance.

FP_HEAL \ FP_DRAIN \ FP_RAGE: customize effect at second of classes of user: so the heal of the human is a white magic of sarafan chierics, the heal of vampires a read aurea, the heal of reavert the divouring of soul, and so away.

FP_DRAIN: customization of effecy by CLASS: for vampire, drain the blood, for the reavers, drain the soul, etc.

FP_LIGHTNING: every class now shoot a different elemental attack! :D dozen of new lightbning force effects! Yeah! :D

There is all edit list:

all start in weapons.H

for players: i edited the value on weapons.dat.

here, there is the speed, dmg etc of NPC about the weapons. weapons.dat edit ONLY player damage, NOT the NPC weapons damage. here the new settings:

 

 

// Bryar Pistol
//--------
#define BRYAR_PISTOL_VEL 2000
#define BRYAR_PISTOL_DAMAGE 15
#define BRYAR_CHARGE_UNIT 200.0f // bryar charging gives us one more unit every 200ms--if you change this, you'll have to do the same in bg_pmove

// E11 Blaster
//---------
#define BLASTER_MAIN_SPREAD 0.5f
#define BLASTER_ALT_SPREAD 1.5f
#define BLASTER_NPC_SPREAD 0.5f
#define BLASTER_VELOCITY 2300
#define BLASTER_NPC_VEL_CUT 0.5f
#define BLASTER_NPC_HARD_VEL_CUT 0.7f
#define BLASTER_DAMAGE 20
#define BLASTER_NPC_DAMAGE_EASY 10
#define BLASTER_NPC_DAMAGE_NORMAL 15 // 14
#define BLASTER_NPC_DAMAGE_HARD 20 // 18

// Tenloss Disruptor
//----------
#define DISRUPTOR_MAIN_DAMAGE 100
#define DISRUPTOR_NPC_MAIN_DAMAGE_EASY 50
#define DISRUPTOR_NPC_MAIN_DAMAGE_MEDIUM 75
#define DISRUPTOR_NPC_MAIN_DAMAGE_HARD 100

#define DISRUPTOR_ALT_DAMAGE 200
#define DISRUPTOR_NPC_ALT_DAMAGE_EASY 100
#define DISRUPTOR_NPC_ALT_DAMAGE_MEDIUM 150
#define DISRUPTOR_NPC_ALT_DAMAGE_HARD 200
#define DISRUPTOR_ALT_TRACES 3 // can go through a max of 3 entities
#define DISRUPTOR_CHARGE_UNIT 150.0f // distruptor charging gives us one more unit every 150ms--if you change this, you'll have to do the same in bg_pmove

// Wookie Bowcaster
//----------
#define BOWCASTER_DAMAGE 15
#define BOWCASTER_VELOCITY 2000
#define BOWCASTER_NPC_DAMAGE_EASY 10
#define BOWCASTER_NPC_DAMAGE_NORMAL 15
#define BOWCASTER_NPC_DAMAGE_HARD 20
#define BOWCASTER_SPLASH_DAMAGE 0
#define BOWCASTER_SPLASH_RADIUS 0
#define BOWCASTER_SIZE 2

#define BOWCASTER_ALT_SPREAD 5.0f
#define BOWCASTER_VEL_RANGE 0.3f
#define BOWCASTER_CHARGE_UNIT 200.0f // bowcaster charging gives us one more unit every 200ms--if you change this, you'll have to do the same in bg_pmove

// Heavy Repeater
//----------
#define REPEATER_SPREAD 0.7f
#define REPEATER_NPC_SPREAD 0.7f
#define REPEATER_DAMAGE 20
#define REPEATER_VELOCITY 1600
#define REPEATER_NPC_DAMAGE_EASY 10
#define REPEATER_NPC_DAMAGE_NORMAL 15
#define REPEATER_NPC_DAMAGE_HARD 20

#define REPEATER_ALT_SIZE 3 // half of bbox size
#define REPEATER_ALT_DAMAGE 50
#define REPEATER_ALT_SPLASH_DAMAGE 50
#define REPEATER_ALT_SPLASH_RADIUS 128
#define REPEATER_ALT_VELOCITY 1100
#define REPEATER_ALT_NPC_DAMAGE_EASY 25
#define REPEATER_ALT_NPC_DAMAGE_NORMAL 37
#define REPEATER_ALT_NPC_DAMAGE_HARD 50

// DEMP2
//----------
#define DEMP2_DAMAGE 50
#define DEMP2_VELOCITY 1800
#define DEMP2_NPC_DAMAGE_EASY 30
#define DEMP2_NPC_DAMAGE_NORMAL 40
#define DEMP2_NPC_DAMAGE_HARD 50
#define DEMP2_SIZE 2 // half of bbox size

#define DEMP2_ALT_DAMAGE 25
#define DEMP2_CHARGE_UNIT 500.0f // demp2 charging gives us one more unit every 500ms--if you change this, you'll have to do the same in bg_pmove
#define DEMP2_ALT_RANGE 4096
#define DEMP2_ALT_SPLASHRADIUS 150

// Golan Arms Flechette
//---------
#define FLECHETTE_SHOTS 1
#define FLECHETTE_SPREAD 0.5f
#define FLECHETTE_DAMAGE 20
#define FLECHETTE_VEL 1500
#define FLECHETTE_SIZE 3

#define FLECHETTE_ALT_DAMAGE 25
#define FLECHETTE_ALT_SPLASH_DAM 30
#define FLECHETTE_ALT_SPLASH_RAD 128

// NOT CURRENTLY USED
#define FLECHETTE_MINE_RADIUS_CHECK 200
#define FLECHETTE_MINE_VEL 1000
#define FLECHETTE_MINE_DAMAGE 25
#define FLECHETTE_MINE_SPLASH_DAMAGE 150
#define FLECHETTE_MINE_SPLASH_RADIUS 200

// Personal Rocket Launcher
//---------
#define ROCKET_VELOCITY 2000
#define ROCKET_DAMAGE 60
#define ROCKET_SPLASH_DAMAGE 100
#define ROCKET_SPLASH_RADIUS 160
#define ROCKET_NPC_DAMAGE_EASY 20
#define ROCKET_NPC_DAMAGE_NORMAL 40
#define ROCKET_NPC_DAMAGE_HARD 60
#define ROCKET_SIZE 3

#define ROCKET_ALT_VELOCITY (ROCKET_VELOCITY*0.5)
#define ROCKET_ALT_THINK_TIME 100

// Concussion Rifle
//---------
//primary
#define CONC_VELOCITY 3000
#define CONC_DAMAGE 20
#define CONC_NPC_SPREAD 0.7f
#define CONC_NPC_DAMAGE_EASY 10
#define CONC_NPC_DAMAGE_NORMAL 15
#define CONC_NPC_DAMAGE_HARD 20
#define CONC_SPLASH_DAMAGE 0
#define CONC_SPLASH_RADIUS 0
//alt
#define CONC_ALT_DAMAGE 5//100
#define CONC_ALT_NPC_DAMAGE_EASY 5
#define CONC_ALT_NPC_DAMAGE_MEDIUM 10
#define CONC_ALT_NPC_DAMAGE_HARD 15

// Emplaced Gun
//--------------
#define EMPLACED_VEL 5000 // very fast
#define EMPLACED_DAMAGE 50 // and very damaging
#define EMPLACED_SIZE 5 // make it easier to hit things

// ATST Main Gun
//--------------
#define ATST_MAIN_VEL 5000 //
#define ATST_MAIN_DAMAGE 40 //
#define ATST_MAIN_SIZE 3 // make it easier to hit things

// ATST Side Gun
//---------------
#define ATST_SIDE_MAIN_DAMAGE 40
#define ATST_SIDE_MAIN_VELOCITY 1500
#define ATST_SIDE_MAIN_NPC_DAMAGE_EASY 20
#define ATST_SIDE_MAIN_NPC_DAMAGE_NORMAL 30
#define ATST_SIDE_MAIN_NPC_DAMAGE_HARD 40
#define ATST_SIDE_MAIN_SIZE 4
#define ATST_SIDE_MAIN_SPLASH_DAMAGE 20 // yeah, pretty small, either zero out or make it worth having?
#define ATST_SIDE_MAIN_SPLASH_RADIUS 25 // yeah, pretty small, either zero out or make it worth having?

#define ATST_SIDE_ALT_VELOCITY 1500
#define ATST_SIDE_ALT_NPC_VELOCITY 500
#define ATST_SIDE_ALT_DAMAGE 50

#define ATST_SIDE_ROCKET_NPC_DAMAGE_EASY 50
#define ATST_SIDE_ROCKET_NPC_DAMAGE_NORMAL 75
#define ATST_SIDE_ROCKET_NPC_DAMAGE_HARD 100

#define ATST_SIDE_ALT_SPLASH_DAMAGE 25
#define ATST_SIDE_ALT_SPLASH_RADIUS 100
#define ATST_SIDE_ALT_ROCKET_SIZE 5
#define ATST_SIDE_ALT_ROCKET_SPLASH_SCALE 1.0f // scales splash for NPC's

// Stun Baton
//--------------
#define STUN_BATON_DAMAGE 20
#define STUN_BATON_ALT_DAMAGE 25
#define STUN_BATON_RANGE 25

// Laser Trip Mine
//--------------
#define LT_DAMAGE 30
#define LT_SPLASH_RAD 256.0f
#define LT_SPLASH_DAM 30

#define LT_VELOCITY 250.0f
#define LT_ALT_VELOCITY 1000.0f

#define PROX_MINE_RADIUS_CHECK 190

#define LT_SIZE 3.0f
#define LT_ALT_TIME 2000
#define LT_ACTIVATION_DELAY 1000
#define LT_DELAY_TIME 50

// Thermal Detonator
//--------------
#define TD_DAMAGE 100
#define TD_NPC_DAMAGE_CUT 0.5f // NPC thrown dets deliver only 60% of the damage that a player thrown one does
#define TD_SPLASH_RAD 200
#define TD_SPLASH_DAM 50
#define TD_VELOCITY 900
#define TD_MIN_CHARGE 0.15f
#define TD_TIME 5000
#define TD_THINK_TIME 300 // don't think too often?
#define TD_TEST_RAD (TD_SPLASH_RAD * 0.8f) // no sense in auto-blowing up if exactly on the radius edge--it would hardly do any damage
#define TD_ALT_TIME 5000

#define TD_ALT_DAMAGE 100
#define TD_ALT_SPLASH_RAD 200
#define TD_ALT_SPLASH_DAM 50
#define TD_ALT_VELOCITY 700
#define TD_ALT_MIN_CHARGE 0.15f
#define TD_ALT_TIME 5000

// Tusken Rifle Shot
//--------------
#define TUSKEN_RIFLE_VEL 3000 // fast
#define TUSKEN_RIFLE_DAMAGE_EASY 20 // damaging
#define TUSKEN_RIFLE_DAMAGE_MEDIUM 25 // very damaging
#define TUSKEN_RIFLE_DAMAGE_HARD 30 // extremely damaging

 

 

The second change was one of the more hardest: on G_combat, edit all weapons class damage at second of class on monster hitted by weapons, that's part is very long and strong to edit. but know JKA in my code is like a fantasy RPG: every class has elemental resistance and weakness. :)

line 5754 of G_COMBAT.cpp

 

 

 

/* DEMP2 SPIRIT STUNNING FUNCTION */
if (targ->client && (mod == MOD_DEMP2 || mod == MOD_DEMP2_ALT) )
{
TIMER_Set(targ, "DEMP2_StunTime", Q_irand(2000, 5000));
}
/* DEMP2 SPIRIT CLASS DAMAGE */
if ((client) &&
(mod==MOD_DEMP2 || mod==MOD_DEMP2_ALT) &&
(
client->NPC_class == CLASS_MINEMONSTER ||
client->NPC_class == CLASS_REELO ||
client->NPC_class == CLASS_WAMPA ||
client->NPC_class == CLASS_MORGANKATARN ||
client->NPC_class == CLASS_BOBAFETT
)
)
{
damage *= 2;
}

if ( mod == MOD_DEMP2 || mod == MOD_DEMP2_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_TAVION ||
client->NPC_class == CLASS_DESANN
)
{
// DEMP2 does more damage to these guys.
damage *= 3;
}
else if ( client->NPC_class == CLASS_MOUSE || client->NPC_class == CLASS_JAWA ||
client->NPC_class == CLASS_R2D2 || client->NPC_class == CLASS_R5D2 || client->NPC_class == CLASS_COMMANDO ||
client->NPC_class == CLASS_MURJJ || client->NPC_class == CLASS_JEDI )
{
// DEMP2 does way more damage to these guys.
damage *= 4;
}
else if ( client->NPC_class == CLASS_INTERROGATOR || client->NPC_class == CLASS_PRISONER )
{
// DEMP2 does way more damage to these guys.
damage *= 0.1;
}
else if ( client->NPC_class == CLASS_BESPIN_COP || client->NPC_class == CLASS_REBEL ||
client->NPC_class == CLASS_RODIAN || client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_STORMTROOPER ||
client->NPC_class == CLASS_IMPWORKER || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_LUKE || client->NPC_class == CLASS_KYLE
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_SHADOWTROOPER || client->NPC_class == CLASS_SABOTEUR ||
client->NPC_class == CLASS_SABER_DROID || client->NPC_class == CLASS_PROTOCOL || client->NPC_class == CLASS_HAZARD_TROOPER ||
client->NPC_class == CLASS_PROBE || client->NPC_class == CLASS_BARTENDER || client->NPC_class == CLASS_LUKE || client->NPC_class == CLASS_ROCKETTROOPER ||
client->NPC_class == CLASS_GALAKMECH || client->NPC_class == CLASS_GONK || client->NPC_class == CLASS_ASSASSIN_DROID
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN )
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}
/* BRYAR SONIC AND DARKNESS BLINDING FUNCTION */
if (targ->client && (mod == MOD_BRYAR || mod == MOD_BRYAR_ALT) )
{
TIMER_Set(targ, "BRYAR_StunTime", Q_irand(1000, 3000));
}
/* BRYAR DARKNESS AND SONIC CLASS DMG */
if ((client) &&
(mod==MOD_BRYAR || mod==MOD_BRYAR_ALT) &&
(
client->NPC_class == CLASS_SABER_DROID ||
client->NPC_class == CLASS_PROTOCOL
)
)
{
damage *= 3;
}

if ( mod == MOD_BRYAR || mod == MOD_BRYAR_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_INTERROGATOR
)
{
// DEMP2 does more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_SABOTEUR )
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_WEEQUAY || client->NPC_class == CLASS_GRAN ||
client->NPC_class == CLASS_SWAMPTROOPER || client->NPC_class == CLASS_COMMANDO ||
client->NPC_class == CLASS_MONMOTHA || client->NPC_class == CLASS_ALORA )
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
else if ( client->NPC_class == CLASS_SHADOWTROOPER || client->NPC_class == CLASS_LIZARD ||
client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_GLIDER || client->NPC_class == CLASS_SWAMP ||
client->NPC_class == CLASS_CLAW || client->NPC_class == CLASS_MURJJ ||
client->NPC_class == CLASS_TAVION || client->NPC_class == CLASS_KYLE ||
client->NPC_class == CLASS_LUKE
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.1;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}
/* BOWCASTER LIGHT BLINDING FUNCTION */
if (targ->client && (mod == MOD_BOWCASTER || mod == MOD_BOWCASTER_ALT) )
{
TIMER_Set(targ, "BOWCASTER_StunTime", Q_irand(500, 3500));
}
/* BOWCASTER LIGHT DAMAGE */
if ((client) &&
(mod==MOD_BOWCASTER || mod==MOD_BOWCASTER_ALT) &&
(
client->NPC_class == CLASS_SWAMPTROOPER || client-> NPC_class == CLASS_SHADOWTROOPER ||
client->NPC_class == CLASS_ALORA
)
)
{
damage *= 2.5;
}

if ( mod == MOD_BOWCASTER || mod == MOD_BOWCASTER_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_INTERROGATOR
)
{
// DEMP2 does more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_SABER_DROID || client->NPC_class == CLASS_PROTOCOL )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_SABOTEUR )
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_MONMOTHA )
{
// DEMP2 does way more damage to these guys.
damage *= 0.75;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_WEEQUAY || client->NPC_class == CLASS_GRAN
)

{
// DEMP2 does way more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_LIZARD ||
client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_GLIDER || client->NPC_class == CLASS_SWAMP ||
client->NPC_class == CLASS_CLAW || client->NPC_class == CLASS_MURJJ
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}


/* BLASTER BURNING FUNCIONT */
if (targ->client && (mod == MOD_BLASTER || mod == MOD_BLASTER_ALT) )
{
TIMER_Set(targ, "BLASTER_StunTime", Q_irand(500, 500));
}

if ((client) &&
(mod==MOD_BLASTER || mod==MOD_BLASTER_ALT) &&
(
client->NPC_class == CLASS_FISH
)
)
{
damage *= 2.5;
}

if ( mod == MOD_BLASTER || mod == MOD_BLASTER_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_BARTENDER
)
{
// DEMP2 does more damage to these guys.
damage *= 2;
}
else if (
client->NPC_class == CLASS_HAZARD_TROOPER
)
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if (
client->NPC_class == CLASS_GRAN
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_CLAW )
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
else if ( client->NPC_class == CLASS_LIZARD )
{
// DEMP2 does way more damage to these guys.
damage *= 1.75;
}
else if ( client->NPC_class == CLASS_WEEQUAY || client->NPC_class == CLASS_BARTENDER )
{
// DEMP2 does way more damage to these guys.
damage *= 2;
}
else if (
client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_SWAMPTROOPER ||
client->NPC_class == CLASS_ALORA || client->NPC_class == CLASS_MONMOTHA
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if (
client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_FLIER2 ||
client->NPC_class == CLASS_GLIDER || client->NPC_class == CLASS_SWAMP
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 3;// more damage to turret things
}
}

/* AIR HAS NOT STRANGE FUNCTION. ONLY DMG */
if ((client) &&
(mod==MOD_ROCKET || mod==MOD_ROCKET_ALT) &&
(
client->NPC_class == CLASS_GALAKMECH
)
)
{
damage *= 2;
}

if ( mod == MOD_ROCKET || mod == MOD_ROCKET_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_GONK
)
{
// DEMP2 does more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_TUSKEN || client->NPC_class == CLASS_GLIDER
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.2;
}
else if ( client->NPC_class == CLASS_ROCKETTROOPER || client->NPC_class == CLASS_FLIER2)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_NOGHRI )
{
// DEMP2 does way more damage to these guys.
damage *= 0.7;
}
else if ( client->NPC_class == CLASS_PROBE )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 5;// more damage to turret things
}
}

/* REPEATER STUNNING FUNCIONT */
if (targ->client && (mod == MOD_REPEATER) )
{
TIMER_Set(targ, "Repeater_stunTime", Q_irand(500,500));

}

/* REPEATER FREEZING FUNCIONT */
if (targ->client && (mod == MOD_REPEATER_ALT) )
{
TIMER_Set(targ, "Repeater_stunTime", Q_irand(2000,2000));

}
/* REPEATER DAMAGE FUNCIONT */
if ((client) &&
(mod==MOD_REPEATER || mod==MOD_REPEATER_ALT) &&
(
client->NPC_class == CLASS_HAZARD_TROOPER
)
)
{
damage *= 2.5;
}

if ( mod == MOD_REPEATER || mod == MOD_REPEATER_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_INTERROGATOR
)
{
// DEMP2 does more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_ALORA
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
else if ( client->NPC_class == CLASS_BARTENDER || client->NPC_class == CLASS_SWAMP ||
client->NPC_class == CLASS_SWAMPTROOPER || client->NPC_class == CLASS_FISH )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_MONMOTHA
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_FLIER2 ||
client->NPC_class == CLASS_GLIDER )
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
else if ( client->NPC_class == CLASS_GRAN )
{
// DEMP2 does way more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_CLAW )
{
// DEMP2 does way more damage to these guys.
damage *= 1.75;
}
else if ( client->NPC_class == CLASS_WEEQUAY )
{
// DEMP2 does way more damage to these guys.
damage *= 1.2;
}
else if ( client->NPC_class == CLASS_LIZARD )
{
// DEMP2 does way more damage to these guys.
damage *= 0.75;
}else if ( client->NPC_class == CLASS_BARTENDER || client->NPC_class == CLASS_SWAMP )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_BARTENDER || client->NPC_class == CLASS_SWAMP )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 5;// more damage to turret things
}
}

/* FLECHETTE ALTERNATE ATTACK STUN A LOT FOR THE STONE FREEZING */
if (targ->client && (mod == MOD_FLECHETTE_ALT) )
{
TIMER_Set(targ, "FLECHETTE_StunTime", Q_irand(1500,1500));
}
/* FLECHETTE EARTH CLASS DMG */
if ((client) &&
(mod==MOD_FLECHETTE || mod==MOD_FLECHETTE_ALT) &&
(
client->NPC_class == CLASS_PROBE
)
)
{
damage *= 2;
}

if ( mod == MOD_FLECHETTE || mod == MOD_FLECHETTE_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_ROCKETTROOPER ||
client->NPC_class == CLASS_INTERROGATOR
)
{
// DEMP2 does more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_GALAKMECH
|| client ->NPC_class == CLASS_MONMOTHA )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_GONK )
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_TUSKEN )
{
// DEMP2 does way more damage to these guys.
damage *= 0.9;
}
else if ( client->NPC_class == CLASS_GLIDER )
{
// DEMP2 does way more damage to these guys.
damage *= 0.75;
}
else if ( client->NPC_class == CLASS_NOGHRI )
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
else if ( client->NPC_class == CLASS_FLIER2 )
{
// DEMP2 does way more damage to these guys.
damage *= 1.15;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 5;// more damage to turret things
}
}
/* DISRUPTOR - SPIRITH DEATH STUNNING FUNCIONT */
if (targ->client && (mod == MOD_DISRUPTOR) )
{
TIMER_Set(targ, "DISRUPTOR_StunTime", Q_irand(2000,2000));
}

if ((client) &&
(mod==MOD_DISRUPTOR) &&
(
client->NPC_class == CLASS_JEDI
)
)
{
damage *= 0.65;
}

if ( mod == MOD_DISRUPTOR )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_INTERROGATOR ||
client->NPC_class == CLASS_SWAMP
)
{
// DEMP2 does more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_MURJJ || client->NPC_class == CLASS_FISH )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_LUKE || client->NPC_class == CLASS_COMMANDO )
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
else if ( client->NPC_class == CLASS_MINEMONSTER || client->NPC_class == CLASS_REELO ||
client->NPC_class == CLASS_WAMPA || client->NPC_class == CLASS_BOBAFETT ||
client->NPC_class == CLASS_MORGANKATARN
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.2;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_WEEQUAY || client->NPC_class == CLASS_GRAN ||
client->NPC_class == CLASS_SWAMPTROOPER || client->NPC_class == CLASS_SABOTEUR ||
client->NPC_class == CLASS_ALORA || client->NPC_class == CLASS_MONMOTHA )
{
// DEMP2 does way more damage to these guys.
damage *= 0.75;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_LIZARD ||
client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_GLIDER || client->NPC_class == CLASS_FISH ||
client->NPC_class == CLASS_CLAW
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}

/* IMMOLATION BURNING FUNCIONT */
if (targ->client && (mod == MOD_SNIPER ) )
{
TIMER_Set(targ, "SNIPER_StunTime", Q_irand(4000,4000));
}

if ((client) &&
(mod==MOD_SNIPER) &&
(
client->NPC_class == CLASS_SWAMP
)
)
{
damage *= 2;
}

if ( mod == MOD_SNIPER )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_INTERROGATOR
)
{
// DEMP2 does more damage to these guys.
damage *= 1.75;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN || client->NPC_class == CLASS_CLAW
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_HAZARD_TROOPER || client->NPC_class == CLASS_MURJJ )
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_SWAMPTROOPER ||
client->NPC_class == CLASS_ALORA || client->NPC_class == CLASS_MONMOTHA )
{
// DEMP2 does way more damage to these guys.
damage *= 1.8;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_GLIDER ||
client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_FISH
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.6;
}
else if ( client->NPC_class == CLASS_GRAN )
{
// DEMP2 does way more damage to these guys.
damage *= 1.7;
}
else if ( client->NPC_class == CLASS_WEEQUAY )
{
// DEMP2 does way more damage to these guys.
damage *= 1.9;
}
else if ( client->NPC_class == CLASS_LIZARD )
{
// DEMP2 does way more damage to these guys.
damage *= 1.85;
}
else if ( client->NPC_class == CLASS_TAVION )
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_MINEMONSTER || client->NPC_class == CLASS_REELO ||
client->NPC_class == CLASS_WAMPA || client->NPC_class == CLASS_BOBAFETT ||
client->NPC_class == CLASS_MORGANKATARN
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 7;// more damage to turret things
}
}

/* CONC STUNNING FUNCIONT */
if (targ->client && (mod == MOD_CONC) )
{
TIMER_Set(targ, "CONC_StunTime", Q_irand(3000,3000));
}

/* INCAPACITATE PARALYSIS STUNNING FUNCIONT */
if (targ->client && (mod == MOD_CONC_ALT) )
{
TIMER_Set(targ, "INCAPACITATE_StunTime", Q_irand(5000,5000));
}

if ((client) &&
(mod==MOD_CONC || MOD_CONC_ALT) &&
(
client->NPC_class == CLASS_DESANN
)
)
{
damage *= 0;
}

if ( mod == MOD_CONC || mod == MOD_CONC_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_INTERROGATOR ||
client->NPC_class == CLASS_SWAMP
)
{
// DEMP2 does more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.9;
}
else if ( client->NPC_class == CLASS_SABOTEUR )
{
// DEMP2 does way more damage to these guys.
damage *= 0.9;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_WEEQUAY || client->NPC_class == CLASS_GRAN ||
client->NPC_class == CLASS_SWAMPTROOPER || client->NPC_class == CLASS_JEDI || client->NPC_class == CLASS_ALORA ||
client->NPC_class == CLASS_MONMOTHA )
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_LIZARD || client->NPC_class == CLASS_LUKE ||
client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_GLIDER || client->NPC_class == CLASS_FISH ||
client->NPC_class == CLASS_CLAW || client->NPC_class == CLASS_MURJJ
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
else if ( client->NPC_class == CLASS_REMOTE || client->NPC_class == CLASS_SEEKER ||
client->NPC_class == CLASS_SENTRY || client->NPC_class == CLASS_MARK1 || client->NPC_class == CLASS_MARK2 ||
client->NPC_class == CLASS_SHADOWTROOPER || client->NPC_class == CLASS_SABER_DROID ||
client->NPC_class == CLASS_HAZARD_TROOPER || client->NPC_class == CLASS_ROCKETTROOPER ||
client->NPC_class == CLASS_GONK || client->NPC_class == CLASS_FISH || client->NPC_class == CLASS_BARTENDER ||
client->NPC_class == CLASS_GALAKMECH || client->NPC_class == CLASS_ASSASSIN_DROID ||
client->NPC_class == CLASS_R2D2 || client->NPC_class == CLASS_R5D2
)
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_COMMANDO || client->NPC_class == CLASS_MURJJ ||
client->NPC_class == CLASS_WAMPA || client->NPC_class == CLASS_BOBAFETT || client->NPC_class == CLASS_MONMOTHA ||
client->NPC_class == CLASS_MORGANKATARN || client->NPC_class == CLASS_SABER_DROID ||
client->NPC_class == CLASS_REELO ||
client->NPC_class == CLASS_MINEMONSTER
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.1;
}
else if ( client->NPC_class == CLASS_MOUSE || client->NPC_class == CLASS_JAWA ||
client->NPC_class == CLASS_PROBE
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.3;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}

/* GRANATA GLIFICA DEL FUOCO STUNNING FUNCIONT */
if (targ->client && (mod == MOD_THERMAL || mod == MOD_THERMAL_ALT) )
{
TIMER_Set(targ, "THERMAL_StunTime", Q_irand(4000,4000));
}


if ( mod == MOD_THERMAL || mod == MOD_THERMAL_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_FISH
)
{
// DEMP2 does more damage to these guys.
damage *= 2.5;
}
else if (
client->NPC_class == CLASS_HAZARD_TROOPER
)
{
// DEMP2 does way more damage to these guys.
damage *= 0;
}
else if (
client->NPC_class == CLASS_BARTENDER
)
{
// DEMP2 does way more damage to these guys.
damage *= 2;
}
else if (
client->NPC_class == CLASS_GRAN
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_CLAW )
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
else if ( client->NPC_class == CLASS_LIZARD )
{
// DEMP2 does way more damage to these guys.
damage *= 1.75;
}
else if ( client->NPC_class == CLASS_WEEQUAY || client->NPC_class == CLASS_BARTENDER )
{
// DEMP2 does way more damage to these guys.
damage *= 2;
}
else if (
client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_SWAMPTROOPER ||
client->NPC_class == CLASS_ALORA || client->NPC_class == CLASS_MONMOTHA
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if (
client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_FLIER2 ||
client->NPC_class == CLASS_GLIDER || client->NPC_class == CLASS_SWAMP
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 3;// more damage to turret things
}
}
/* SONIC MINES STUNNING FUNCTION */
if (targ->client && (mod == MOD_LASERTRIP || mod == MOD_LASERTRIP_ALT) )
{
TIMER_Set(targ, "LASERTRIP_StunTime", Q_irand(4000, 4000));
}
/* SONIC MINES AND SONIC CLASS DMG */
if ((client) &&
(mod==MOD_LASERTRIP || mod==MOD_LASERTRIP_ALT) &&
(
client->NPC_class == CLASS_JEDI || client->NPC_class == CLASS_LUKE ||
client->NPC_class == CLASS_COMMANDO || client->NPC_class == CLASS_MURJJ ||
client->NPC_class == CLASS_TAVION || client->NPC_class == CLASS_ASSASSIN_DROID ||
client->NPC_class == CLASS_WAMPA || client->NPC_class == CLASS_BOBAFETT ||
client->NPC_class == CLASS_HOWLER || client->NPC_class == CLASS_MONMOTHA ||
client->NPC_class == CLASS_MORGANKATARN || client->NPC_class == CLASS_REELO ||
client->NPC_class == CLASS_MINEMONSTER || client->NPC_class == CLASS_HAZARD_TROOPER ||
client->NPC_class == CLASS_REMOTE || client->NPC_class == CLASS_SEEKER ||
client->NPC_class == CLASS_SENTRY || client->NPC_class == CLASS_MARK1 ||
client->NPC_class == CLASS_MARK2 || client->NPC_class == CLASS_SHADOWTROOPER ||
client->NPC_class == CLASS_ROCKETTROOPER || client->NPC_class == CLASS_HOWLER
)
)
{
damage *= 0;
}

if ( mod == MOD_LASERTRIP || mod == MOD_LASERTRIP_ALT )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_INTERROGATOR ||
client->NPC_class == CLASS_SWAMP
)
{
// DEMP2 does more damage to these guys.
damage *= 0.75;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN || client->NPC_class == CLASS_SABOTEUR
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_GONK || client->NPC_class == CLASS_GALAKMECH ||
client->NPC_class == CLASS_BARTENDER
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_WEEQUAY ||
client->NPC_class == CLASS_SWAMPTROOPER || client->NPC_class == CLASS_ALORA ||
client->NPC_class == CLASS_MONMOTHA )
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_GLIDER ||
client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_LIZARD ||
client->NPC_class == CLASS_FISH )
{
// DEMP2 does way more damage to these guys.
damage *= 1.15;
}
else if ( client->NPC_class == CLASS_GRAN )
{
// DEMP2 does way more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_CLAW )
{
// DEMP2 does way more damage to these guys.
damage *= 1.75;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}

/* DETPACK FREEZING */
if (targ->client && (mod == MOD_DETPACK) )
{
TIMER_Set(targ, "DETPACK_StunTime", Q_irand(5000,5000));
}
/* FLECHETTE EARTH CLASS DMG */
if ((client) &&
(mod==MOD_DETPACK) &&
(
client->NPC_class == CLASS_PROBE
)
)
{
damage *= 3;
}

if ( mod == MOD_DETPACK )
{
if ( client )
{
if (
client->NPC_class == CLASS_ROCKETTROOPER ||
client->NPC_class == CLASS_INTERROGATOR
)
{
// DEMP2 does more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_GALAKMECH || client->NPC_class == CLASS_MONMOTHA )
{
// DEMP2 does way more damage to these guys.
damage *= 0.1;
}
else if ( client->NPC_class == CLASS_GONK )
{
// DEMP2 does way more damage to these guys.
damage *= 0.6;
}
else if ( client->NPC_class == CLASS_TUSKEN )
{
// DEMP2 does way more damage to these guys.
damage *= 0.95;
}
else if ( client->NPC_class == CLASS_GLIDER )
{
// DEMP2 does way more damage to these guys.
damage *= 0.85;
}
else if ( client->NPC_class == CLASS_NOGHRI )
{
// DEMP2 does way more damage to these guys.
damage *= 1.35;
}
else if ( client->NPC_class == CLASS_FLIER2 )
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 6;// more damage to turret things
}
}

/* POISON OF NOGHRI STICK DMG*/
if ( mod == MOD_GAS )
{
if ( client )
{
if (
client->NPC_class == CLASS_PRISONER || client->NPC_class == CLASS_BESPIN_COP ||
client->NPC_class == CLASS_REBEL || client->NPC_class == CLASS_RODIAN ||
client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_LANDO ||
client->NPC_class == CLASS_TRANDOSHAN || client->NPC_class == CLASS_INTERROGATOR ||
client->NPC_class == CLASS_SWAMP
)
{
// DEMP2 does more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_STORMTROOPER || client->NPC_class == CLASS_IMPWORKER ||
client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN || client->NPC_class == CLASS_SABOTEUR
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
else if ( client->NPC_class == CLASS_REBORN || client->NPC_class == CLASS_TUSKEN ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_WEEQUAY ||
client->NPC_class == CLASS_SWAMPTROOPER || client->NPC_class == CLASS_GRAN ||
client->NPC_class == CLASS_ALORA || client->NPC_class == CLASS_MONMOTHA
)
{
// DEMP2 does way more damage to these guys.
damage *= 0.5;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_GLIDER ||
client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_LIZARD ||
client->NPC_class == CLASS_FISH || client->NPC_class == CLASS_CLAW )
{
// DEMP2 does way more damage to these guys.
damage *= 0.25;
}
}
else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}

/* DETPACK FREEZING */
if (targ->client && (mod == MOD_FLECHETTE_ALT) )
{
TIMER_Set(targ, "DETPACK_StunTime", Q_irand(5000,5000));
}
/* EMPLACED HYLDEN FIRE! */
if (targ->client && (mod == MOD_EMPLACED) )
{
TIMER_Set(targ, "EMPLACED_StunTime", Q_irand(2000, 2000));
}
/* HYLDEN FIRE DMG */
if ((client) &&
(mod==MOD_EMPLACED) &&
(
client->NPC_class == CLASS_MINEMONSTER ||
client->NPC_class == CLASS_REELO ||
client->NPC_class == CLASS_WAMPA ||
client->NPC_class == CLASS_MORGANKATARN ||
client->NPC_class == CLASS_BOBAFETT
)
)
{
damage *= 0.5;
}

if ( mod == MOD_EMPLACED )
{
if ( client )
{
if (
client->NPC_class == CLASS_TAVION ||
client->NPC_class == CLASS_DESANN
)
{
// DEMP2 does more damage to these guys.
damage *= 0;
}
else if ( client->NPC_class == CLASS_MOUSE || client->NPC_class == CLASS_JAWA ||
client->NPC_class == CLASS_R2D2 || client->NPC_class == CLASS_R5D2 || client->NPC_class == CLASS_COMMANDO ||
client->NPC_class == CLASS_MURJJ || client->NPC_class == CLASS_JEDI )
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_INTERROGATOR || client->NPC_class == CLASS_PRISONER )
{
// DEMP2 does way more damage to these guys.
damage *= 3;
}
else if ( client->NPC_class == CLASS_BESPIN_COP || client->NPC_class == CLASS_REBEL ||
client->NPC_class == CLASS_RODIAN || client->NPC_class == CLASS_GALAK || client->NPC_class == CLASS_STORMTROOPER ||
client->NPC_class == CLASS_IMPWORKER || client->NPC_class == CLASS_LANDO
)
{
// DEMP2 does way more damage to these guys.
damage *= 2.5;
}
else if ( client->NPC_class == CLASS_IMPERIAL || client->NPC_class == CLASS_JAN )
{
// DEMP2 does way more damage to these guys.
damage *= 2;
}
else if ( client->NPC_class == CLASS_TUSKEN || client->NPC_class == CLASS_GLIDER ||
client->NPC_class == CLASS_NOGHRI || client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_WEEQUAY ||
client->NPC_class == CLASS_LIZARD || client->NPC_class == CLASS_SWAMPTROOPER || client->NPC_class == CLASS_FISH || client->NPC_class == CLASS_FLIER2 || client->NPC_class == CLASS_GRAN ||
client->NPC_class == CLASS_CLAW || client->NPC_class == CLASS_JEDI || client->NPC_class == CLASS_REBORN ||
client->NPC_class == CLASS_ALORA || client->NPC_class == CLASS_MONMOTHA
)
{
// DEMP2 does way more damage to these guys.
damage *= 1.5;
}
else if ( client->NPC_class == CLASS_KYLE || client->NPC_class == CLASS_LUKE )
{
// DEMP2 does way more damage to these guys.
damage *= 1.25;
}
}

else if ( targ->s.weapon == WP_TURRET )
{
damage *= 0;// more damage to turret things
}
}
/* THE GOLEMS RESIST TO THE SABERS! */
if ( client && client->NPC_class == CLASS_SHADOWTROOPER )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_SABER_DROID )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_PROTOCOL )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_R2D2 )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_R5D2 )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_HAZARD_TROOPER )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_ASSASSIN_DROID )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_BARTENDER )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_GONK )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_GALAKMECH )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if ( client && client->NPC_class == CLASS_DESANN )
{
if ( mod == MOD_SABER
&& damage>0
&& !(dflags&DAMAGE_NO_PROTECTION) )
{
damage /= 10;
}
}
if (client && client->NPC_class==CLASS_SHADOWTROOPER)
{
// The Golems are immune to Gas and blood drain
//-----------------------------------------------------------
if (mod==MOD_GAS || mod==MOD_IMPACT || mod==MOD_WATER ||
mod==MOD_FORCE_GRIP || mod==MOD_FORCE_DRAIN || mod==MOD_SEEKER || mod==MOD_MELEE )
{
damage = 0;
}
}
if (client && client->NPC_class==CLASS_SABER_DROID)
{
// The Golems are immune to Gas and blood drain
//-----------------------------------------------------------
if (mod==MOD_GAS || mod==MOD_IMPACT || mod==MOD_LAVA || mod==MOD_SLIME || mod==MOD_WATER ||
mod==MOD_FORCE_GRIP || mod==MOD_FORCE_DRAIN || mod==MOD_SEEKER || mod==MOD_MELEE )
{
damage = 0;
}
}
if (client && client->NPC_class==CLASS_HAZARD_TROOPER)
{
// The Golems are immune to Gas and blood drain
//-----------------------------------------------------------
if (mod==MOD_GAS || mod==MOD_IMPACT || mod==MOD_SLIME || mod==MOD_LAVA ||
mod==MOD_FORCE_GRIP || mod==MOD_FORCE_DRAIN || mod==MOD_SEEKER || mod==MOD_MELEE )
{
damage = 0;
}
}
if (client && client->NPC_class==CLASS_ROCKETTROOPER)
{
// The Golems are immune to Gas and blood drain
//-----------------------------------------------------------
if (mod==MOD_GAS || mod==MOD_SLIME || mod==MOD_WATER ||
mod==MOD_FORCE_GRIP || mod==MOD_FORCE_DRAIN || mod==MOD_SEEKER || mod==MOD_MELEE )
{
damage = 0;
}
}
if (client && client->NPC_class==CLASS_BARTENDER)
{
// The Golems are immune to Gas and blood drain
//-----------------------------------------------------------
if (mod==MOD_GAS || mod==MOD_SLIME || mod==MOD_WATER ||
mod==MOD_FORCE_GRIP || mod==MOD_FORCE_DRAIN || mod==MOD_SEEKER || mod==MOD_MELEE )
{
damage = 0;
}
}
if (client && client->NPC_class==CLASS_GONK || client && client->NPC_class==CLASS_GALAKMECH)
{
// The Golems are immune to Gas and blood drain
//-----------------------------------------------------------
if (mod==MOD_GAS || mod==MOD_IMPACT || mod==MOD_LAVA || mod==MOD_SLIME || mod==MOD_WATER ||
mod==MOD_FORCE_GRIP || mod==MOD_FORCE_DRAIN || mod==MOD_SEEKER || mod==MOD_MELEE )
{
damage = 0;
}
}
if (client && client ->NPC_class==CLASS_REMOTE ||client && client ->NPC_class==CLASS_SEEKER ||
client && client ->NPC_class==CLASS_SENTRY ||client && client ->NPC_class==CLASS_MARK1 ||
client && client ->NPC_class==CLASS_MARK2 ||client && client ->NPC_class==CLASS_R2D2 ||
client && client ->NPC_class==CLASS_R5D2 )
{
// The Golems are immune to Gas and blood drain
//-----------------------------------------------------------
if (mod==MOD_GAS || mod==MOD_IMPACT || mod==MOD_SLIME || mod==MOD_WATER ||
mod==MOD_FORCE_GRIP || mod==MOD_FORCE_DRAIN || mod==MOD_SEEKER || mod==MOD_MELEE )
{
damage = 0;
}
}
if (client && client ->NPC_class==CLASS_MORGANKATARN ||client && client ->NPC_class==CLASS_TUSKEN ||
client && client ->NPC_class==CLASS_GLIDER ||client && client ->NPC_class==CLASS_FLIER2 ||
client && client ->NPC_class==CLASS_NOGHRI ||client && client ->NPC_class==CLASS_SHADOWTROOPER ||
client && client ->NPC_class==CLASS_GRAN ||client && client ->NPC_class==CLASS_CLAW ||
client && client ->NPC_class==CLASS_MINEMONSTER ||client && client ->NPC_class==CLASS_PROBE ||
client && client ->NPC_class==CLASS_COMMANDO ||client && client ->NPC_class==CLASS_MURJJ ||
client && client ->NPC_class==CLASS_WEEQUAY ||client && client ->NPC_class==CLASS_LIZARD ||
client && client ->NPC_class==CLASS_MOUSE ||client && client ->NPC_class==CLASS_JAWA ||
client && client ->NPC_class==CLASS_RANCOR ||client && client ->NPC_class==CLASS_WAMPA ||
client && client ->NPC_class==CLASS_LUKE ||client && client ->NPC_class==CLASS_KYLE ||
client && client ->NPC_class==CLASS_TAVION ||client && client ->NPC_class==CLASS_DESANN ||
client && client ->NPC_class==CLASS_BOBAFETT ||client && client ->NPC_class==CLASS_REELO ||
client && client ->NPC_class==CLASS_MONMOTHA )
{
// The Undead, are immunes to Gas
//-----------------------------------------------------------
if (mod==MOD_GAS )
{
damage = 0;
}
}

 

 

that add also a saber resistance to all my golems and stone monster class and some class are immune to Noghri_stick. the funmny thing is that CLASS_DESANN, that i want to use for thre Hylden King, now is invincible to saber and to all attacks. i never understan dwhy. howeber, with this code, you can make a lot of modification: for example: some weapons deadly for the sith and unuseful against jedi, and so away. :)

That's all for Code about weapons, next post: the code of Force Power.

Posted

Okay, i begin with the arcane magic effects:

first step: on cg_media add the definition of the new effects:

 

 

shader change:

1: changing RGB color of push, pull and grip: simply edit this i setted low gray value for push and pull and the green for the grip:

 

 

//FORCE BEHAVOUR STATES EFFECTS
// Stunning
fxHandle_t forceConfusion;
// Electricity
fxHandle_t forceShock;
// Trapped
fxHandle_t forceWebbed;
// Control of Undead
fxHandle_t forceSpirithWrack;
// Poisoned
fxHandle_t forcePoisoned;
// Demon burning
fxHandle_t forceWarm;
// Hylden Corruption
fxHandle_t forceCorruption;
// Hylden lightnings
fxHandle_t forceGreenShock;
// Healing
fxHandle_t forceHealing;
// Nature attack
fxHandle_t forceNature;
// Darkness
fxHandle_t forceBlind;
// Light
fxHandle_t forceFlash;
// Sunburst
fxHandle_t forceSunlight;
// Fire
fxHandle_t forceBurn;
// Fog blinding
fxHandle_t forceFogblind;
// Storm shock and blind
fxHandle_t forceStorm;
// Water
fxHandle_t forceSlow;
// Magma
fxHandle_t forceMagma;
// Freezing
fxHandle_t forceFrost;
// Stoning
fxHandle_t forceRock;
// Sonic
fxHandle_t forceSonicstun;
// Astral Gravity
fxHandle_t forceGravity;
// InspireHate
fxHandle_t forceHate;
// Force Fear
fxHandle_t forceFear2;
// Sacred fire immolation
fxHandle_t forceHollyburn;
// Holly skill (paralyse vampire and demon)
fxHandle_t forceHollystasis;
// Spirith Death
fxHandle_t forceDeath;
// Acid \ font of putrescense
fxHandle_t forceMud;
// Time effect
fxHandle_t forceSlowtime;
// Stunning attack of Mentalist and Incapacitation
fxHandle_t forceIncapacitate;
// Force Crystal
fxHandle_t forceGlass;
// Spirit stunning
fxHandle_t forceRedemption;


// Arcane attack
// Electric
fxHandle_t forceLightning;
fxHandle_t forceLightningWide;
// Zephonim spiderweb
fxHandle_t forceWeb;
fxHandle_t forceWebwide;
// Driel Kan Necromantic Fire
fxHandle_t forceNecro;
fxHandle_t forceNecrowide;
// Poison gas
fxHandle_t forcePoison;
fxHandle_t forcePoisonwide;
// Hell Fire
fxHandle_t forceHell;
fxHandle_t forceHellwide;
// Hylden Fire
fxHandle_t forceHylden;
fxHandle_t forceHyldenwide;
// Hylden lightnings
fxHandle_t forceGreenLightning;
fxHandle_t forceGreenLightningwide;
// Ghost reverberus
fxHandle_t forceGhost;
fxHandle_t forceGhostwide;
// Darkness
fxHandle_t forceDark;
fxHandle_t forceDarkwide;
// Lightning
fxHandle_t forceYellowLightning;
fxHandle_t forceYellowLightningwide;
// Sunburst
fxHandle_t forceBurst;
fxHandle_t forceBurstwide;
// Flames
fxHandle_t forceFire;
fxHandle_t forceFirewide;
// Wind
fxHandle_t forceWind;
fxHandle_t forceWindwide;
// Water
fxHandle_t forceWater;
fxHandle_t forceWaterwide;
// Magma
fxHandle_t forceLava;
fxHandle_t forceLavawide;
// Ice
fxHandle_t forceIce;
fxHandle_t forceIcewide;
// Stone Breath
fxHandle_t forceStone;
fxHandle_t forceStonewide;
// Sonic Wave
fxHandle_t forceSonic;
fxHandle_t forceSonicwide;
// Astral \ Dimension
fxHandle_t forceAstral;
fxHandle_t forceAstralwide;
// Defiance vampire hunter fireball
fxHandle_t forceFireball;
fxHandle_t forceFireballwide;
// Sarafan Cleric Fire
fxHandle_t forceFirewhite;
fxHandle_t forceFirewhitewide;
// Asgarath holly fireb
fxHandle_t forceHollyfire;
fxHandle_t forceHollyfirewide;
// Holly
fxHandle_t forceHolly;
fxHandle_t forceHollywide;
// Life \ Nature Breath
fxHandle_t forceLife;
fxHandle_t forceLifewide;
// Death skull fire
fxHandle_t forceSkull;
fxHandle_t forceSkullwide;
// Acid \ font of putrescense
fxHandle_t forceAcid;
fxHandle_t forceAcidwide;
// Time aura
fxHandle_t forceTime;
fxHandle_t forceTimewide;
// Stunning attack of Mentalist
fxHandle_t forceStun;
fxHandle_t forceStunwide;
// Force Crystal
fxHandle_t forceCrystal;
fxHandle_t forceCrystalwide;
//fxHandle_t forceInvincibility;
fxHandle_t forceHeal;
fxHandle_t forceHeal2;
fxHandle_t forceHeal3;
fxHandle_t forceHeal4;
fxHandle_t forceHeal5;
fxHandle_t forceHeal6;
// the Rages effects new
fxHandle_t forceFear;
fxHandle_t forceRage;
fxHandle_t forceTrance;
fxHandle_t forceTkshield;
fxHandle_t forceBerserk;
fxHandle_t forceElder;


//new stuff for Jedi Academy
fxHandle_t forceDrain;
fxHandle_t forceDrainWide;
fxHandle_t forceDrained;
fxHandle_t forceSouldrain;
fxHandle_t forceSouldrainwide;
fxHandle_t forceSouldrained;
fxHandle_t forceHyldendrain;
fxHandle_t forceHyldendrainwide;
fxHandle_t forceHyldendrained;
fxHandle_t forceNecrodrain;
fxHandle_t forceNecrodrainwide;
fxHandle_t forceNecrodrained;
fxHandle_t forceHelldrain;
fxHandle_t forceHelldrainwide;
fxHandle_t forceHelldrained;

 

 

and so, make list of all particellar efx you need.

Now, on CG_weapons.cpp registered the effects with address. also need to register the sound, but i have not much clear how to make. i also registered the effect of heal, fury and mindtrick.

 

 

cgs.effects.forceHeal = theFxScheduler.RegisterEffect( "force/heal2" );
cgs.effects.forceHeal2 = theFxScheduler.RegisterEffect( "force/healv" );
cgs.effects.forceHeal3 = theFxScheduler.RegisterEffect( "force/heals" );
cgs.effects.forceHeal4 = theFxScheduler.RegisterEffect( "force/heald" );
cgs.effects.forceHeal5 = theFxScheduler.RegisterEffect( "force/healh" );
cgs.effects.forceHeal6 = theFxScheduler.RegisterEffect( "force/healm" );

//cgs.effects.forceInvincibility = theFxScheduler.RegisterEffect( "force/invin" );
// BEHAVOUR STATES EFFECTS
cgs.effects.forceConfusion = theFxScheduler.RegisterEffect( "force/confusion" );
cgs.effects.forceShock = theFxScheduler.RegisterEffect( "force/shock" );
cgs.effects.forceWebbed = theFxScheduler.RegisterEffect( "force/Webtrap" );
cgs.effects.forceSpirithWrack = theFxScheduler.RegisterEffect( "force/Wrack" );
cgs.effects.forcePoisoned = theFxScheduler.RegisterEffect( "force/poison2" );
cgs.effects.forceWarm = theFxScheduler.RegisterEffect( "force/hellburning" );
cgs.effects.forceCorruption = theFxScheduler.RegisterEffect( "force/corruption" );
cgs.effects.forceGreenShock = theFxScheduler.RegisterEffect( "force/greenshock" );
cgs.effects.forceHealing = theFxScheduler.RegisterEffect( "force/healed" );
cgs.effects.forceNature = theFxScheduler.RegisterEffect( "force/Nature" );
cgs.effects.forceBlind = theFxScheduler.RegisterEffect( "force/blind" );
cgs.effects.forceFlash = theFxScheduler.RegisterEffect( "force/flash" );
cgs.effects.forceSunlight = theFxScheduler.RegisterEffect( "force/sun" );
cgs.effects.forceBurn = theFxScheduler.RegisterEffect( "force/burn" );
cgs.effects.forceFogblind = theFxScheduler.RegisterEffect( "force/fog" );
cgs.effects.forceStorm = theFxScheduler.RegisterEffect( "force/storm" );
cgs.effects.forceSlow = theFxScheduler.RegisterEffect( "force/slow" );
cgs.effects.forceMagma = theFxScheduler.RegisterEffect( "force/magma" );
cgs.effects.forceFrost = theFxScheduler.RegisterEffect( "force/frost" );
cgs.effects.forceRock = theFxScheduler.RegisterEffect( "force/rock" );
cgs.effects.forceSonicstun = theFxScheduler.RegisterEffect( "force/sonicstun" );
cgs.effects.forceGravity = theFxScheduler.RegisterEffect( "force/gravity" );
cgs.effects.forceHate = theFxScheduler.RegisterEffect( "force/hate" );
cgs.effects.forceFear2 = theFxScheduler.RegisterEffect( "force/fear2" );
cgs.effects.forceHollyburn = theFxScheduler.RegisterEffect( "force/hollyburn" );
cgs.effects.forceHollystasis = theFxScheduler.RegisterEffect( "force/hollystasis" );
cgs.effects.forceDeath = theFxScheduler.RegisterEffect( "force/Death" );
cgs.effects.forceMud = theFxScheduler.RegisterEffect( "force/mud" );
cgs.effects.forceSlowtime = theFxScheduler.RegisterEffect( "force/slowtime" );
cgs.effects.forceIncapacitate = theFxScheduler.RegisterEffect( "force/incapacitate" );
cgs.effects.forceGlass = theFxScheduler.RegisterEffect( "force/glass" );
cgs.effects.forceRedemption = theFxScheduler.RegisterEffect( "force/redemption" );
// ARCANE ATTACKS EFFECTS
cgs.effects.forceLightning = theFxScheduler.RegisterEffect( "force/lightning" );
cgs.effects.forceLightningWide = theFxScheduler.RegisterEffect( "force/lightningwide" );
cgs.effects.forceWeb = theFxScheduler.RegisterEffect( "force/Web" );
cgs.effects.forceWebwide = theFxScheduler.RegisterEffect( "force/Webwide" );
cgs.effects.forceNecro = theFxScheduler.RegisterEffect( "force/necro" );
cgs.effects.forceNecrowide = theFxScheduler.RegisterEffect( "force/necrowide" );
cgs.effects.forcePoison = theFxScheduler.RegisterEffect( "force/poison" );
cgs.effects.forcePoisonwide = theFxScheduler.RegisterEffect( "force/poisonwide" );
cgs.effects.forceHell = theFxScheduler.RegisterEffect( "force/hell" );
cgs.effects.forceHellwide = theFxScheduler.RegisterEffect( "force/hellwide" );
cgs.effects.forceHylden = theFxScheduler.RegisterEffect( "force/hylden" );
cgs.effects.forceHyldenwide = theFxScheduler.RegisterEffect( "force/hyldenwide" );
cgs.effects.forceGreenLightning = theFxScheduler.RegisterEffect( "force/greenlightning" );
cgs.effects.forceGreenLightningwide = theFxScheduler.RegisterEffect( "force/greenlightning2" );
cgs.effects.forceGhost = theFxScheduler.RegisterEffect( "force/ghost" );
cgs.effects.forceGhostwide = theFxScheduler.RegisterEffect( "force/ghostwide" );
cgs.effects.forceDark = theFxScheduler.RegisterEffect( "force/dark" );
cgs.effects.forceDarkwide = theFxScheduler.RegisterEffect( "force/darkwide" );
cgs.effects.forceYellowLightning = theFxScheduler.RegisterEffect( "force/yellowlightning" );
cgs.effects.forceYellowLightningwide = theFxScheduler.RegisterEffect( "force/yellowlightningwide" );
cgs.effects.forceBurst = theFxScheduler.RegisterEffect( "force/burst" );
cgs.effects.forceBurstwide = theFxScheduler.RegisterEffect( "force/burstwide" );
cgs.effects.forceFire = theFxScheduler.RegisterEffect( "force/fire" );
cgs.effects.forceFirewide = theFxScheduler.RegisterEffect( "force/firewide" );
cgs.effects.forceWind = theFxScheduler.RegisterEffect( "force/wind" );
cgs.effects.forceWindwide = theFxScheduler.RegisterEffect( "force/windwide" );
cgs.effects.forceWater = theFxScheduler.RegisterEffect( "force/water" );
cgs.effects.forceWaterwide = theFxScheduler.RegisterEffect( "force/waterwide" );
cgs.effects.forceLava = theFxScheduler.RegisterEffect( "force/lava" );
cgs.effects.forceLavawide = theFxScheduler.RegisterEffect( "force/lavawide" );
cgs.effects.forceIce = theFxScheduler.RegisterEffect( "force/ice" );
cgs.effects.forceIcewide = theFxScheduler.RegisterEffect( "force/icewide" );
cgs.effects.forceStone = theFxScheduler.RegisterEffect( "force/stone" );
cgs.effects.forceStonewide = theFxScheduler.RegisterEffect( "force/stonewide" );
cgs.effects.forceSonic = theFxScheduler.RegisterEffect( "force/sonic" );
cgs.effects.forceSonicwide = theFxScheduler.RegisterEffect( "force/sonicwide" );
cgs.effects.forceAstral = theFxScheduler.RegisterEffect( "force/astral" );
cgs.effects.forceAstralwide = theFxScheduler.RegisterEffect( "force/astralwide" );
cgs.effects.forceFireball = theFxScheduler.RegisterEffect( "force/fireball" );
cgs.effects.forceFireballwide = theFxScheduler.RegisterEffect( "force/fireballwide" );
cgs.effects.forceFirewhite = theFxScheduler.RegisterEffect( "force/firewhite" );
cgs.effects.forceFirewhitewide = theFxScheduler.RegisterEffect( "force/firewhitewide" );
cgs.effects.forceHollyfire = theFxScheduler.RegisterEffect( "force/hollyfire" );
cgs.effects.forceHollyfirewide = theFxScheduler.RegisterEffect( "force/hollyfirewide" );
cgs.effects.forceHolly = theFxScheduler.RegisterEffect( "force/holly" );
cgs.effects.forceHollywide = theFxScheduler.RegisterEffect( "force/hollywide" );
cgs.effects.forceLife = theFxScheduler.RegisterEffect( "force/life" );
cgs.effects.forceLifewide = theFxScheduler.RegisterEffect( "force/lifewide" );
cgs.effects.forceSkull = theFxScheduler.RegisterEffect( "force/skull" );
cgs.effects.forceSkullwide = theFxScheduler.RegisterEffect( "force/skullwide" );
cgs.effects.forceAcid = theFxScheduler.RegisterEffect( "force/acid" );
cgs.effects.forceAcidwide = theFxScheduler.RegisterEffect( "force/acidwide" );
cgs.effects.forceTime = theFxScheduler.RegisterEffect( "force/time" );
cgs.effects.forceTimewide = theFxScheduler.RegisterEffect( "force/timewide" );
cgs.effects.forceStun = theFxScheduler.RegisterEffect( "force/stun" );
cgs.effects.forceStunwide = theFxScheduler.RegisterEffect( "force/stunwide" );
cgs.effects.forceCrystal = theFxScheduler.RegisterEffect( "force/crystal" );
cgs.effects.forceCrystalwide = theFxScheduler.RegisterEffect( "force/crystalwide" );

//new Jedi Academy force power effects
cgs.effects.forceDrain = theFxScheduler.RegisterEffect( "mp/drain" );
cgs.effects.forceDrainWide = theFxScheduler.RegisterEffect( "mp/drainwide" );
cgs.effects.forceSouldrain = theFxScheduler.RegisterEffect( "mp/drain2" );
cgs.effects.forceSouldrainwide = theFxScheduler.RegisterEffect( "mp/drainwide2" );
cgs.effects.forceSouldrained = theFxScheduler.RegisterEffect( "mp/drainhit2" );
cgs.effects.forceNecrodrain = theFxScheduler.RegisterEffect( "mp/drain3" );
cgs.effects.forceNecrodrainwide = theFxScheduler.RegisterEffect( "mp/drainwide3" );
cgs.effects.forceNecrodrained = theFxScheduler.RegisterEffect( "mp/drainhit3" );
cgs.effects.forceHelldrain = theFxScheduler.RegisterEffect( "mp/drain4" );
cgs.effects.forceHelldrainwide = theFxScheduler.RegisterEffect( "mp/drainwide4" );
cgs.effects.forceHelldrained = theFxScheduler.RegisterEffect( "mp/drainhit4" );
cgs.effects.forceHyldendrain = theFxScheduler.RegisterEffect( "mp/drain5" );
cgs.effects.forceHyldendrainwide = theFxScheduler.RegisterEffect( "mp/drainwide5" );
cgs.effects.forceHyldendrained = theFxScheduler.RegisterEffect( "mp/drainhit5" );
//cgs.effects.forceDrained = theFxScheduler.RegisterEffect( "mp/drainhit");
// register rage effect
cgs.effects.forceRage = theFxScheduler.RegisterEffect( "force/rage2" );
cgs.effects.forceBerserk = theFxScheduler.RegisterEffect( "force/berserk" );
cgs.effects.forceFear = theFxScheduler.RegisterEffect( "force/fear" );
cgs.effects.forceTrance = theFxScheduler.RegisterEffect( "force/trance" );
cgs.effects.forceTkshield = theFxScheduler.RegisterEffect( "force/tkshield" );
cgs.effects.forceElder = theFxScheduler.RegisterEffect( "force/eldershield" )

 

 

Now for the specific edit of the power by class is kinda complicated. about lightning and draining the code is really hard, more easy is about heal, rage, protect, absorb, mindtrick and sight.

On cg_players.cpp, you can edit the sight, protect, absorb, lightning and drain effects power. for heal, rage, push, pull grip and mindtrick, all the code is in wp_saber.cpp, also the working of all force power effects, are into wp_saber.cpp.

okay. that's is my lightning new code!

first, i silent on line 8404 the mindtrick effect code, because i not want intereference about the effect of Confusion, it working however.

 

 

//play special force effects
/*
if ( cent->gent->NPC && ( cent->gent->NPC->confusionTime > cg.time || cent->gent->NPC->charmedTime > cg.time || cent->gent->NPC->controlledTime > cg.time) )
{// we are currently confused, so play an effect at the headBolt position
if ( TIMER_Done( cent->gent, "confusionEffectDebounce" ) )
{//ARGH!!!
theFxScheduler.PlayEffect( cgs.effects.forceConfusion, cent->gent->client->renderInfo.eyePoint );
TIMER_Set( cent->gent, "confusionEffectDebounce", 1000 );
}
}
*/

 

second time, here the lightning class effect, is VEEEERY LONG.

 

 

if ( cent->gent->client->ps.forcePowersActive&(1< {//doing the electrocuting
//FIXME: if the target is absorbing or blocking lightning w/saber, draw a beam from my hand to his (hand?chest?saber?)
vec3_t tAng, fxDir;
VectorCopy( cent->lerpAngles, tAng );
if ( cent->gent->client->ps.forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_2 )
{//arc
vec3_t fxAxis[3];
AnglesToAxis( tAng, fxAxis );
/* theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis ); */
if ( cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING
|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_START
|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_HOLD
|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_RELEASE )
{//jackin' 'em up, Palpatine-style
/* theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis ); */
if ( cent->gent->client->NPC_class == CLASS_REELO )
{
theFxScheduler.PlayEffect( cgs.effects.forceWebwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ALORA )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_LUKE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLifewide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_REBORN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_KYLE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_TRANDOSHAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceHollyfirewide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_TUSKEN )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GLIDER )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_NOGHRI )
{
theFxScheduler.PlayEffect( cgs.effects.forceStunwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_FLIER2 )
{
theFxScheduler.PlayEffect( cgs.effects.forceStunwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_WEEQUAY )
{
theFxScheduler.PlayEffect( cgs.effects.forceCrystalwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_LIZARD )
{
theFxScheduler.PlayEffect( cgs.effects.forceStonewide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SWAMPTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceSkullwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_FISH )
{
theFxScheduler.PlayEffect( cgs.effects.forceSkullwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GRAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_CLAW )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MOUSE )
{
theFxScheduler.PlayEffect( cgs.effects.forceGhostwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MINEMONSTER )
{
theFxScheduler.PlayEffect( cgs.effects.forcePoisonwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_INTERROGATOR )
{
theFxScheduler.PlayEffect( cgs.effects.forcePoisonwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_WAMPA )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_BOBAFETT )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION )
{
theFxScheduler.PlayEffect( cgs.effects.forceHyldenwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_DESANN )
{
theFxScheduler.PlayEffect( cgs.effects.forceGreenLightningwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_JAWA )
{
theFxScheduler.PlayEffect( cgs.effects.forceGhostwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_PROBE )
{
theFxScheduler.PlayEffect( cgs.effects.forceWindwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ROCKETTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceWindwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_COMMANDO )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MURJJ )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SEEKER )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_REMOTE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MARK1 )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MARK2 )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SABOTEUR )
{
theFxScheduler.PlayEffect( cgs.effects.forceDarkwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SHADOWTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceDarkwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SABER_DROID )
{
theFxScheduler.PlayEffect( cgs.effects.forceYellowLightningwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_PROTOCOL )
{
theFxScheduler.PlayEffect( cgs.effects.forceBurstwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceLavawide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GALAKMECH )
{
theFxScheduler.PlayEffect( cgs.effects.forceIcewide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_BARTENDER )
{
theFxScheduler.PlayEffect( cgs.effects.forceIcewide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SWAMP )
{
theFxScheduler.PlayEffect( cgs.effects.forceWaterwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GONK )
{
theFxScheduler.PlayEffect( cgs.effects.forceStonewide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_HOWLER )
{
theFxScheduler.PlayEffect( cgs.effects.forceSonicwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ATST )
{
theFxScheduler.PlayEffect( cgs.effects.forceBurstwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
theFxScheduler.PlayEffect( cgs.effects.forceGreenLightningwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_PRISONER )
{
theFxScheduler.PlayEffect( cgs.effects.forceAcidwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_BESPIN_COP )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_REBEL )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_LANDO )
{
theFxScheduler.PlayEffect( cgs.effects.forceAstralwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_RODIAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceFireballwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GALAK )
{
theFxScheduler.PlayEffect( cgs.effects.forceFireballwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_JAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceHollywide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_STORMTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceHollywide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_IMPWORKER )
{
theFxScheduler.PlayEffect( cgs.effects.forceFirewide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_IMPERIAL )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handRPoint, fxAxis );
}
}
}
if ( cent->gent->client->ps.forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_2 )
{//arc
vec3_t fxAxis[3];
AnglesToAxis( tAng, fxAxis );
/* theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis ); */
if ( cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING
|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_START
|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_HOLD
|| cent->gent->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_RELEASE )
{//jackin' 'em up, Palpatine-style
/* theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handRPoint, fxAxis ); */
if ( cent->gent->client->NPC_class == CLASS_REELO )
{
theFxScheduler.PlayEffect( cgs.effects.forceWebwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ALORA )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_LUKE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLifewide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_REBORN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_KYLE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_TRANDOSHAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceHollyfirewide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_TUSKEN )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GLIDER )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_NOGHRI )
{
theFxScheduler.PlayEffect( cgs.effects.forceStunwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_FLIER2 )
{
theFxScheduler.PlayEffect( cgs.effects.forceStunwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_WEEQUAY )
{
theFxScheduler.PlayEffect( cgs.effects.forceCrystalwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_LIZARD )
{
theFxScheduler.PlayEffect( cgs.effects.forceStonewide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SWAMPTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceSkullwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_FISH )
{
theFxScheduler.PlayEffect( cgs.effects.forceSkullwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GRAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_CLAW )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MOUSE )
{
theFxScheduler.PlayEffect( cgs.effects.forceGhostwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MINEMONSTER )
{
theFxScheduler.PlayEffect( cgs.effects.forcePoisonwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_INTERROGATOR )
{
theFxScheduler.PlayEffect( cgs.effects.forcePoisonwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_WAMPA )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_BOBAFETT )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION )
{
theFxScheduler.PlayEffect( cgs.effects.forceHyldenwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_DESANN )
{
theFxScheduler.PlayEffect( cgs.effects.forceGreenLightningwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_JAWA )
{
theFxScheduler.PlayEffect( cgs.effects.forceGhostwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_PROBE )
{
theFxScheduler.PlayEffect( cgs.effects.forceWindwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ROCKETTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceWindwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_COMMANDO )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MURJJ )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrowide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SEEKER )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_REMOTE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MARK1 )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MARK2 )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SABOTEUR )
{
theFxScheduler.PlayEffect( cgs.effects.forceDarkwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SHADOWTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceDarkwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SABER_DROID )
{
theFxScheduler.PlayEffect( cgs.effects.forceYellowLightningwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_PROTOCOL )
{
theFxScheduler.PlayEffect( cgs.effects.forceBurstwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceLavawide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GALAKMECH )
{
theFxScheduler.PlayEffect( cgs.effects.forceIcewide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_BARTENDER )
{
theFxScheduler.PlayEffect( cgs.effects.forceIcewide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SWAMP )
{
theFxScheduler.PlayEffect( cgs.effects.forceWaterwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GONK )
{
theFxScheduler.PlayEffect( cgs.effects.forceStonewide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_HOWLER )
{
theFxScheduler.PlayEffect( cgs.effects.forceSonicwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_ATST )
{
theFxScheduler.PlayEffect( cgs.effects.forceBurstwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
theFxScheduler.PlayEffect( cgs.effects.forceGreenLightningwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_PRISONER )
{
theFxScheduler.PlayEffect( cgs.effects.forceAcidwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_BESPIN_COP )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_REBEL )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightningWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_LANDO )
{
theFxScheduler.PlayEffect( cgs.effects.forceAstralwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_RODIAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceFireballwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_GALAK )
{
theFxScheduler.PlayEffect( cgs.effects.forceFireballwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_JAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceHollywide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_STORMTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceHollywide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_IMPWORKER )
{
theFxScheduler.PlayEffect( cgs.effects.forceFirewide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_IMPERIAL )
{
theFxScheduler.PlayEffect( cgs.effects.forceHellwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
}
}
else
{//line
AngleVectors( tAng, fxDir, NULL, NULL );
/* theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir ); */
if ( cent->gent->client->NPC_class == CLASS_REELO )
{
theFxScheduler.PlayEffect( cgs.effects.forceWeb, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_ALORA )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_LUKE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLife, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_REBORN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_KYLE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_TRANDOSHAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceHollyfire, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_TUSKEN )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecro, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_GLIDER )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecro, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_NOGHRI )
{
theFxScheduler.PlayEffect( cgs.effects.forceStun, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_FLIER2 )
{
theFxScheduler.PlayEffect( cgs.effects.forceStun, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_WEEQUAY )
{
theFxScheduler.PlayEffect( cgs.effects.forceCrystal, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_LIZARD )
{
theFxScheduler.PlayEffect( cgs.effects.forceStone, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_SWAMPTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceSkull, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_FISH )
{
theFxScheduler.PlayEffect( cgs.effects.forceSkull, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_GRAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_CLAW )
{
theFxScheduler.PlayEffect( cgs.effects.forceHell, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MOUSE )
{
theFxScheduler.PlayEffect( cgs.effects.forceGhost, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MINEMONSTER )
{
theFxScheduler.PlayEffect( cgs.effects.forcePoison, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_INTERROGATOR )
{
theFxScheduler.PlayEffect( cgs.effects.forcePoison, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_WAMPA )
{
theFxScheduler.PlayEffect( cgs.effects.forceHell, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_BOBAFETT )
{
theFxScheduler.PlayEffect( cgs.effects.forceHell, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION )
{
theFxScheduler.PlayEffect( cgs.effects.forceHylden, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_DESANN )
{
theFxScheduler.PlayEffect( cgs.effects.forceGreenLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_JAWA )
{
theFxScheduler.PlayEffect( cgs.effects.forceGhost, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_PROBE )
{
theFxScheduler.PlayEffect( cgs.effects.forceWind, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_ROCKETTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceWind, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_COMMANDO )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecro, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MURJJ )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecro, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_SEEKER )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_REMOTE )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MARK1 )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MARK2 )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_SABOTEUR )
{
theFxScheduler.PlayEffect( cgs.effects.forceDark, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_SHADOWTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceDark, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_SABER_DROID )
{
theFxScheduler.PlayEffect( cgs.effects.forceYellowLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_PROTOCOL )
{
theFxScheduler.PlayEffect( cgs.effects.forceBurst, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceLava, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_GALAKMECH )
{
theFxScheduler.PlayEffect( cgs.effects.forceIce, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_BARTENDER )
{
theFxScheduler.PlayEffect( cgs.effects.forceIce, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_SWAMP )
{
theFxScheduler.PlayEffect( cgs.effects.forceWater, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_GONK )
{
theFxScheduler.PlayEffect( cgs.effects.forceStone, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_HOWLER )
{
theFxScheduler.PlayEffect( cgs.effects.forceSonic, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_ATST )
{
theFxScheduler.PlayEffect( cgs.effects.forceBurst, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
theFxScheduler.PlayEffect( cgs.effects.forceGreenLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_PRISONER )
{
theFxScheduler.PlayEffect( cgs.effects.forceAcid, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_BESPIN_COP )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_REBEL )
{
theFxScheduler.PlayEffect( cgs.effects.forceLightning, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_LANDO )
{
theFxScheduler.PlayEffect( cgs.effects.forceAstral, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_RODIAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceFireball, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_GALAK )
{
theFxScheduler.PlayEffect( cgs.effects.forceFireball, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_JAN )
{
theFxScheduler.PlayEffect( cgs.effects.forceHolly, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_STORMTROOPER )
{
theFxScheduler.PlayEffect( cgs.effects.forceHolly, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_IMPWORKER )
{
theFxScheduler.PlayEffect( cgs.effects.forceFire, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_IMPERIAL )
{
theFxScheduler.PlayEffect( cgs.effects.forceHell, cent->gent->client->renderInfo.handLPoint, fxDir );
}
}
}

 

 

Very careful about the branks, or you get strange problems XD at the startt of time, i wrong the branks open\cleasure and i got some funny thing, like no visual efx on power 1 and 2 and the efx of power 1 and 2 of lightning... played with effects lightning level 3... togeher! O.o

you can notice the effect is played 3 times: two times for the two hand of the force_lightning level 3 and the third time for the left end about level 1 and 2.

Now for the force drain, same thing of the lightning.

 

 

if ( cent->gent->client->ps.forcePowersActive&(1< && cent->gent->client->ps.forceDrainEntityNum >= ENTITYNUM_WORLD )
{//doing the draining and not on a single person
vec3_t tAng, fxDir;
VectorCopy( cent->lerpAngles, tAng );
if ( cent->gent->client->ps.forcePowerLevel[FP_DRAIN] > FORCE_LEVEL_2 )
{//arc
vec3_t fxAxis[3];
AnglesToAxis( tAng, fxAxis );
/* theFxScheduler.PlayEffect( cgs.effects.forceDrainWide, cent->gent->client->renderInfo.handLPoint, fxAxis );*/
if ( cent->gent->client->NPC_class == CLASS_REELO || cent->gent->client->NPC_class == CLASS_PROBE ||
cent->gent->client->NPC_class == CLASS_RANCOR || cent->gent->client->NPC_class == CLASS_LUKE ||
cent->gent->client->NPC_class == CLASS_MOUSE || cent->gent->client->NPC_class == CLASS_JAWA ||
cent->gent->client->NPC_class == CLASS_ATST || cent->gent->client->NPC_class == CLASS_SAND_CREATURE ||
cent->gent->client->NPC_class == CLASS_ROCKETTROOPER || cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID )
{
theFxScheduler.PlayEffect( cgs.effects.forceSouldrainwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
theFxScheduler.PlayEffect( cgs.effects.forceSouldrained, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI )
{
theFxScheduler.PlayEffect( cgs.effects.forceSouldrainwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_KYLE || cent->gent->client->NPC_class == CLASS_REBORN ||
cent->gent->client->NPC_class == CLASS_TUSKEN || cent->gent->client->NPC_class == CLASS_GLIDER ||
cent->gent->client->NPC_class == CLASS_NOGHRI || cent->gent->client->NPC_class == CLASS_FLIER2 ||
cent->gent->client->NPC_class == CLASS_WEEQUAY || cent->gent->client->NPC_class == CLASS_LIZARD ||
cent->gent->client->NPC_class == CLASS_SWAMPTROOPER || cent->gent->client->NPC_class == CLASS_FISH ||
cent->gent->client->NPC_class == CLASS_NOGHRI || cent->gent->client->NPC_class == CLASS_FLIER2 ||
cent->gent->client->NPC_class == CLASS_GRAN || cent->gent->client->NPC_class == CLASS_CLAW ||
cent->gent->client->NPC_class == CLASS_MONMOTHA || cent->gent->client->NPC_class == CLASS_ALORA ||
cent->gent->client->NPC_class == CLASS_SWAMP || cent->gent->client->NPC_class == CLASS_INTERROGATOR )
{
theFxScheduler.PlayEffect( cgs.effects.forceDrainWide, cent->gent->client->renderInfo.handLPoint, fxAxis );
theFxScheduler.PlayEffect( cgs.effects.forceDrained, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MURJJ || cent->gent->client->NPC_class == CLASS_COMMANDO ||
cent->gent->client->NPC_class == CLASS_PRISONER || cent->gent->client->NPC_class == CLASS_REBEL ||
cent->gent->client->NPC_class == CLASS_BESPIN_COP || cent->gent->client->NPC_class == CLASS_SABOTEUR ||
cent->gent->client->NPC_class == CLASS_SHADOWTROOPER || cent->gent->client->NPC_class == CLASS_STORMTROOPER ||
cent->gent->client->NPC_class == CLASS_SWAMPTROOPER || cent->gent->client->NPC_class == CLASS_FISH ||
cent->gent->client->NPC_class == CLASS_TRANDOSHAN || cent->gent->client->NPC_class == CLASS_SWAMP ||
cent->gent->client->NPC_class == CLASS_IMPERIAL || cent->gent->client->NPC_class == CLASS_IMPWORKER ||
cent->gent->client->NPC_class == CLASS_JAN || cent->gent->client->NPC_class == CLASS_LANDO ||
cent->gent->client->NPC_class == CLASS_GALAK || cent->gent->client->NPC_class == CLASS_RODIAN ||
cent->gent->client->NPC_class == CLASS_SABER_DROID || cent->gent->client->NPC_class == CLASS_PROTOCOL ||
cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER || cent->gent->client->NPC_class == CLASS_GALAKMECH ||
cent->gent->client->NPC_class == CLASS_BARTENDER || cent->gent->client->NPC_class == CLASS_GONK ||
cent->gent->client->NPC_class == CLASS_R2D2 || cent->gent->client->NPC_class == CLASS_R5D2 ||
cent->gent->client->NPC_class == CLASS_MARK1 || cent->gent->client->NPC_class == CLASS_MARK2 ||
cent->gent->client->NPC_class == CLASS_HOWLER )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrodrainwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
theFxScheduler.PlayEffect( cgs.effects.forceNecrodrained, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN || cent->gent->client->NPC_class == CLASS_MINEMONSTER ||
cent->gent->client->NPC_class == CLASS_BOBAFETT || cent->gent->client->NPC_class == CLASS_WAMPA )
{
theFxScheduler.PlayEffect( cgs.effects.forceHelldrainwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
theFxScheduler.PlayEffect( cgs.effects.forceHelldrained, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION || cent->gent->client->NPC_class == CLASS_DESANN )
{
theFxScheduler.PlayEffect( cgs.effects.forceHyldendrainwide, cent->gent->client->renderInfo.handLPoint, fxAxis );
theFxScheduler.PlayEffect( cgs.effects.forceHyldendrained, cent->gent->client->renderInfo.handLPoint, fxAxis );
}
}
else
{//line
AngleVectors( tAng, fxDir, NULL, NULL );
/*theFxScheduler.PlayEffect( cgs.effects.forceDrain, cent->gent->client->renderInfo.handLPoint, fxDir );*/
if ( cent->gent->client->NPC_class == CLASS_REELO || cent->gent->client->NPC_class == CLASS_PROBE||
cent->gent->client->NPC_class == CLASS_RANCOR || cent->gent->client->NPC_class == CLASS_LUKE ||
cent->gent->client->NPC_class == CLASS_MOUSE || cent->gent->client->NPC_class == CLASS_JAWA ||
cent->gent->client->NPC_class == CLASS_ATST || cent->gent->client->NPC_class == CLASS_SAND_CREATURE ||
cent->gent->client->NPC_class == CLASS_ROCKETTROOPER || cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID ||
cent->gent->client->NPC_class == CLASS_GLIDER || cent->gent->client->NPC_class == CLASS_TUSKEN ||
cent->gent->client->NPC_class == CLASS_FISH || cent->gent->client->NPC_class == CLASS_LIZARD ||
cent->gent->client->NPC_class == CLASS_FLIER2 )
{
theFxScheduler.PlayEffect( cgs.effects.forceSouldrain, cent->gent->client->renderInfo.handLPoint, fxDir );
theFxScheduler.PlayEffect( cgs.effects.forceSouldrained, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI )
{
theFxScheduler.PlayEffect( cgs.effects.forceSouldrain, cent->gent->client->renderInfo.handLPoint, fxDir );
theFxScheduler.PlayEffect( cgs.effects.forceSouldrained, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_KYLE || cent->gent->client->NPC_class == CLASS_REBORN ||
cent->gent->client->NPC_class == CLASS_TUSKEN || cent->gent->client->NPC_class == CLASS_NOGHRI ||
cent->gent->client->NPC_class == CLASS_WEEQUAY || cent->gent->client->NPC_class == CLASS_SWAMPTROOPER ||
cent->gent->client->NPC_class == CLASS_GRAN || cent->gent->client->NPC_class == CLASS_MONMOTHA || cent->gent->client->NPC_class == CLASS_ALORA ||
cent->gent->client->NPC_class == CLASS_SWAMP || cent->gent->client->NPC_class == CLASS_INTERROGATOR )
{
theFxScheduler.PlayEffect( cgs.effects.forceDrain, cent->gent->client->renderInfo.handLPoint, fxDir );
theFxScheduler.PlayEffect( cgs.effects.forceDrained, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MURJJ || cent->gent->client->NPC_class == CLASS_COMMANDO ||
cent->gent->client->NPC_class == CLASS_PRISONER || cent->gent->client->NPC_class == CLASS_REBEL ||
cent->gent->client->NPC_class == CLASS_BESPIN_COP || cent->gent->client->NPC_class == CLASS_SABOTEUR ||
cent->gent->client->NPC_class == CLASS_SHADOWTROOPER || cent->gent->client->NPC_class == CLASS_STORMTROOPER ||
cent->gent->client->NPC_class == CLASS_SWAMPTROOPER || cent->gent->client->NPC_class == CLASS_FISH ||
cent->gent->client->NPC_class == CLASS_TRANDOSHAN || cent->gent->client->NPC_class == CLASS_SWAMP ||
cent->gent->client->NPC_class == CLASS_IMPERIAL || cent->gent->client->NPC_class == CLASS_IMPWORKER ||
cent->gent->client->NPC_class == CLASS_JAN || cent->gent->client->NPC_class == CLASS_LANDO ||
cent->gent->client->NPC_class == CLASS_GALAK || cent->gent->client->NPC_class == CLASS_RODIAN ||
cent->gent->client->NPC_class == CLASS_SABER_DROID || cent->gent->client->NPC_class == CLASS_PROTOCOL ||
cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER || cent->gent->client->NPC_class == CLASS_GALAKMECH ||
cent->gent->client->NPC_class == CLASS_BARTENDER || cent->gent->client->NPC_class == CLASS_GONK ||
cent->gent->client->NPC_class == CLASS_R2D2 || cent->gent->client->NPC_class == CLASS_R5D2 ||
cent->gent->client->NPC_class == CLASS_MARK1 || cent->gent->client->NPC_class == CLASS_MARK2 ||
cent->gent->client->NPC_class == CLASS_HOWLER )
{
theFxScheduler.PlayEffect( cgs.effects.forceNecrodrain, cent->gent->client->renderInfo.handLPoint, fxDir );
theFxScheduler.PlayEffect( cgs.effects.forceNecrodrained, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN || cent->gent->client->NPC_class == CLASS_MINEMONSTER ||
cent->gent->client->NPC_class == CLASS_BOBAFETT || cent->gent->client->NPC_class == CLASS_WAMPA )
{
theFxScheduler.PlayEffect( cgs.effects.forceHelldrain, cent->gent->client->renderInfo.handLPoint, fxDir );
theFxScheduler.PlayEffect( cgs.effects.forceHelldrained, cent->gent->client->renderInfo.handLPoint, fxDir );
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION || cent->gent->client->NPC_class == CLASS_DESANN )
{theFxScheduler.PlayEffect( cgs.effects.forceHyldendrain, cent->gent->client->renderInfo.handLPoint, fxDir );

theFxScheduler.PlayEffect( cgs.effects.forceHyldendrained, cent->gent->client->renderInfo.handLPoint, fxDir );
}
}
}

 

 

and that's is for force drain and lightning. In the third post i show you the other effects. :)

Posted

Okay, here the protect and absorb code for edit the RGB color of the shader:

thanks to @@Serenity937 for all suggest! :D

 

 

//FIXME: Tavion possessed effect? White?
//For now, these two are using the old shield shader. This is just so that you
//can tell it apart from the JM/duel shaders, but it's still very obvious.
if ( (cent->gent->client->ps.forcePowersActive & (1 << FP_PROTECT))
&& (cent->gent->client->ps.forcePowersActive & (1 << FP_ABSORB)) )
{//using both at once, save ourselves some rendering
//protect+absorb is represented by cyan..
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 255;
ent->shaderRGBA[3] = 254;

ent->renderfx &= ~RF_RGB_TINT;
//ent->renderfx &= ~RF_FORCE_ENT_ALPHA;
if ( cent->gent->client->ps.forcePowerLevel[FP_PROTECT] > FORCE_LEVEL_1
|| cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_1 )
{
ent->customShader = cgs.media.forceShell;
}
else
{
ent->customShader = cgs.media.playerShieldDamage;
}

cgi_R_AddRefEntityToScene( ent );
}
else if ( cent->gent->client->ps.forcePowersActive & (1 << FP_PROTECT) )
{ //protect is represented by green..
// Vampires
if ( cent->gent->client->NPC_class == CLASS_REBORN
|| cent->gent->client->NPC_class == CLASS_ALORA
|| cent->gent->client->NPC_class == CLASS_KYLE
|| cent->gent->client->NPC_class == CLASS_TUSKEN
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_NOGHRI
|| cent->gent->client->NPC_class == CLASS_FLIER2
|| cent->gent->client->NPC_class == CLASS_WEEQUAY
|| cent->gent->client->NPC_class == CLASS_LIZARD
|| cent->gent->client->NPC_class == CLASS_GRAN
|| cent->gent->client->NPC_class == CLASS_CLAW
|| cent->gent->client->NPC_class == CLASS_SWAMPTROOPER
|| cent->gent->client->NPC_class == CLASS_FISH
|| cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
ent->shaderRGBA[0] = 89; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 147; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 237; //add any number from 0-255 to use your own color
}
// Mietitori e Spettri
else if ( cent->gent->client->NPC_class == CLASS_JEDI
|| cent->gent->client->NPC_class == CLASS_LUKE
|| cent->gent->client->NPC_class == CLASS_MOUSE
|| cent->gent->client->NPC_class == CLASS_JAWA
|| cent->gent->client->NPC_class == CLASS_PROBE )
{
ent->shaderRGBA[0] = 89; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 147; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 237; //add any number from 0-255 to use your own color
}
// Demoni
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN
|| cent->gent->client->NPC_class == CLASS_BOBAFETT
|| cent->gent->client->NPC_class == CLASS_WAMPA )
{
ent->shaderRGBA[0] = 229; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 47; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 33; //add any number from 0-255 to use your own color
}
// Hylden
else if ( cent->gent->client->NPC_class == CLASS_TAVION
|| cent->gent->client->NPC_class == CLASS_DESANN )
{
ent->shaderRGBA[0] = 229; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 247; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 88; //add any number from 0-255 to use your own color
}
// The Elder God
else if ( cent->gent->client->NPC_class == CLASS_ATST
|| cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
ent->shaderRGBA[0] = 0; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 55; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 0; //add any number from 0-255 to use your own color
}
// Human and Mortal Creatures
else if ( cent->gent->client->NPC_class == CLASS_PRISONER
|| cent->gent->client->NPC_class == CLASS_BESPIN_COP
|| cent->gent->client->NPC_class == CLASS_RODIAN
|| cent->gent->client->NPC_class == CLASS_REELO
|| cent->gent->client->NPC_class == CLASS_JAN
|| cent->gent->client->NPC_class == CLASS_GALAK
|| cent->gent->client->NPC_class == CLASS_LANDO
|| cent->gent->client->NPC_class == CLASS_STORMTROOPER
|| cent->gent->client->NPC_class == CLASS_IMPWORKER
|| cent->gent->client->NPC_class == CLASS_IMPERIAL
|| cent->gent->client->NPC_class == CLASS_PROTOCOL
|| cent->gent->client->NPC_class == CLASS_REBEL
|| cent->gent->client->NPC_class == CLASS_INTERROGATOR
|| cent->gent->client->NPC_class == CLASS_TRANDOSHAN
|| cent->gent->client->NPC_class == CLASS_SWAMP )
{
ent->shaderRGBA[0] = 69;
ent->shaderRGBA[1] = 197;
ent->shaderRGBA[2] = 128;
ent->customShader = cgs.media.runeShell;
}
// Artifacts
else if ( cent->gent->client->NPC_class == CLASS_R2D2
|| cent->gent->client->NPC_class == CLASS_R5D2 )
{
ent->shaderRGBA[0] = 50;
ent->shaderRGBA[1] = 50;
ent->shaderRGBA[2] = 50;
}
else if ( cent->gent->client->NPC_class == CLASS_SABOTEUR
|| cent->gent->client->NPC_class == CLASS_SHADOWTROOPER )
{
ent->shaderRGBA[0] = 50;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 50;
}
else if ( cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_SABER_DROID
|| cent->gent->client->NPC_class == CLASS_PROTOCOL )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_ROCKETTROOPER )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_BARTENDER
|| cent->gent->client->NPC_class == CLASS_GALAKMECH )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 100;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_GONK )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 0;
}
else //this just insures i didnt miss anybody
{
if ( cent->gent->client->ps.forcePowerLevel[FP_PROTECT] > FORCE_LEVEL_2 )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 255;
ent->shaderRGBA[3] = 0;
}
}

ent->renderfx &= ~RF_RGB_TINT;
//ent->renderfx &= ~RF_FORCE_ENT_ALPHA;
if ( cent->gent->client->ps.forcePowerLevel[FP_PROTECT] > FORCE_LEVEL_1 )
{
ent->customShader = cgs.media.forceShell;
}
else
{
ent->customShader = cgs.media.playerShieldDamage;
}

cgi_R_AddRefEntityToScene( ent );
}
else if ( cent->gent->client->ps.forcePowersActive & (1 << FP_ABSORB))
{ //absorb is represented by blue..
// Vampires
if ( cent->gent->client->NPC_class == CLASS_REBORN
|| cent->gent->client->NPC_class == CLASS_ALORA
|| cent->gent->client->NPC_class == CLASS_KYLE
|| cent->gent->client->NPC_class == CLASS_TUSKEN
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_NOGHRI
|| cent->gent->client->NPC_class == CLASS_FLIER2
|| cent->gent->client->NPC_class == CLASS_WEEQUAY
|| cent->gent->client->NPC_class == CLASS_LIZARD
|| cent->gent->client->NPC_class == CLASS_GRAN
|| cent->gent->client->NPC_class == CLASS_CLAW
|| cent->gent->client->NPC_class == CLASS_SWAMPTROOPER
|| cent->gent->client->NPC_class == CLASS_FISH
|| cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
ent->shaderRGBA[0] = 221; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 22; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 239; //add any number from 0-255 to use your own color
}
// Mietitori e Spettri
else if ( cent->gent->client->NPC_class == CLASS_JEDI
|| cent->gent->client->NPC_class == CLASS_LUKE
|| cent->gent->client->NPC_class == CLASS_MOUSE
|| cent->gent->client->NPC_class == CLASS_JAWA
|| cent->gent->client->NPC_class == CLASS_PROBE )
{
ent->shaderRGBA[0] = 29; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 232; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 239; //add any number from 0-255 to use your own color
}
// Demoni
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN
|| cent->gent->client->NPC_class == CLASS_BOBAFETT
|| cent->gent->client->NPC_class == CLASS_WAMPA )
{
ent->shaderRGBA[0] = 146; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 36; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 34; //add any number from 0-255 to use your own color
}
// Hylden
else if ( cent->gent->client->NPC_class == CLASS_TAVION
|| cent->gent->client->NPC_class == CLASS_DESANN )
{
ent->shaderRGBA[0] = 44; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 207; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 117; //add any number from 0-255 to use your own color
}
// The Elder God
else if ( cent->gent->client->NPC_class == CLASS_ATST
|| cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
ent->shaderRGBA[0] = 255; //add any number from 0-255 to use your own color
ent->shaderRGBA[1] = 0; //add any number from 0-255 to use your own color
ent->shaderRGBA[2] = 0; //add any number from 0-255 to use your own color
}
// Human and Mortal Creatures
else if ( cent->gent->client->NPC_class == CLASS_PRISONER
|| cent->gent->client->NPC_class == CLASS_BESPIN_COP
|| cent->gent->client->NPC_class == CLASS_RODIAN
|| cent->gent->client->NPC_class == CLASS_REELO
|| cent->gent->client->NPC_class == CLASS_LANDO
|| cent->gent->client->NPC_class == CLASS_GALAK
|| cent->gent->client->NPC_class == CLASS_JAN
|| cent->gent->client->NPC_class == CLASS_STORMTROOPER
|| cent->gent->client->NPC_class == CLASS_IMPWORKER
|| cent->gent->client->NPC_class == CLASS_IMPERIAL
|| cent->gent->client->NPC_class == CLASS_PROTOCOL
|| cent->gent->client->NPC_class == CLASS_REBEL
|| cent->gent->client->NPC_class == CLASS_INTERROGATOR
|| cent->gent->client->NPC_class == CLASS_TRANDOSHAN
|| cent->gent->client->NPC_class == CLASS_SWAMP )
{
ent->shaderRGBA[0] = 172;
ent->shaderRGBA[1] = 248;
ent->shaderRGBA[2] = 254;
ent->customShader = cgs.media.runeShell;
}
// Artifacts
else if ( cent->gent->client->NPC_class == CLASS_R2D2
|| cent->gent->client->NPC_class == CLASS_R5D2 )
{
ent->shaderRGBA[0] = 50;
ent->shaderRGBA[1] = 50;
ent->shaderRGBA[2] = 100;
}
else if ( cent->gent->client->NPC_class == CLASS_SABOTEUR
|| cent->gent->client->NPC_class == CLASS_SHADOWTROOPER )
{
ent->shaderRGBA[0] = 50;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 150;
}
else if ( cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 100;
}
else if ( cent->gent->client->NPC_class == CLASS_SABER_DROID
|| cent->gent->client->NPC_class == CLASS_PROTOCOL )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 100;
}
else if ( cent->gent->client->NPC_class == CLASS_ROCKETTROOPER )
{
ent->shaderRGBA[0] = 155;
ent->shaderRGBA[1] = 155;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_BARTENDER
|| cent->gent->client->NPC_class == CLASS_GALAKMECH )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_GONK )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 100;
}
else //this just insures i didnt miss anybody
{
if ( cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_2 )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 255;
ent->shaderRGBA[3] = 254;
}
}

ent->renderfx &= ~RF_RGB_TINT;
if ( cent->gent->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_1 )
{
ent->customShader = cgs.media.forceShell;
}
else
{
ent->customShader = cgs.media.playerShieldDamage;
}

cgi_R_AddRefEntityToScene( ent );
}

 

 

here i follow Serenity indication, i make thirst sight, and later protect and absorb, with FP_SIGHT, i learn the tecnique.

 

 

/*
===============
CG_AddForceSightShell

Adds the special effect
===============
*/
extern void CG_AddHealthBarEnt( int entNum );
void CG_AddForceSightShell( refEntity_t *ent, centity_t *cent )
{
ent->customShader = cgs.media.forceShell;
ent->renderfx &= ~RF_RGB_TINT;
// See through walls.
ent->renderfx |= (RF_MORELIGHT|RF_NODEPTH);

if ( (cent->currentState.eFlags&EF_FORCE_VISIBLE)
|| (cent->currentState.eType == ET_PLAYER && cent->gent && cent->gent->message) )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 255;
ent->shaderRGBA[3] = 254;

cgi_R_AddRefEntityToScene( ent );
return;
}

ent->shaderRGBA[0] = 210;
ent->shaderRGBA[1] = 145;
ent->shaderRGBA[2] = 55;

//if ( g_entities[0].client->ps.forcePowerLevel[FP_SEE] > FORCE_LEVEL_2 )
//{TEST: level 3 identifies friend or foe with color
team_t team = TEAM_NEUTRAL;
if ( cent->gent && cent->gent->client )
{
team = cent->gent->client->playerTeam;
}
else if ( cent->gent->owner )
{
if ( cent->gent->owner->client )
{
team = cent->gent->owner->client->playerTeam;
}
else
{
team = cent->gent->owner->noDamageTeam;
}
}
switch ( team )
{
case TEAM_ENEMY:
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 0;
if ( cent->gent && cent->gent->client )
{
if ( cent->gent->client->NPC_class == CLASS_PRISONER
|| cent->gent->client->NPC_class == CLASS_BESPIN_COP
|| cent->gent->client->NPC_class == CLASS_REBEL
|| cent->gent->client->NPC_class == CLASS_RODIAN
|| cent->gent->client->NPC_class == CLASS_JAN
|| cent->gent->client->NPC_class == CLASS_LANDO
|| cent->gent->client->NPC_class == CLASS_GALAK
|| cent->gent->client->NPC_class == CLASS_STORMTROOPER
|| cent->gent->client->NPC_class == CLASS_IMPWORKER
|| cent->gent->client->NPC_class == CLASS_IMPERIAL )
{
ent->shaderRGBA[0] = 142;
ent->shaderRGBA[1] = 249;
ent->shaderRGBA[2] = 208;
}
else if ( cent->gent->client->NPC_class == CLASS_SEEKER
|| cent->gent->client->NPC_class == CLASS_REMOTE
|| cent->gent->client->NPC_class == CLASS_GALAKMECH
|| cent->gent->client->NPC_class == CLASS_SHADOWTROOPER
|| cent->gent->client->NPC_class == CLASS_SABOTEUR
|| cent->gent->client->NPC_class == CLASS_SABER_DROID
|| cent->gent->client->NPC_class == CLASS_PROTOCOL
|| cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER
|| cent->gent->client->NPC_class == CLASS_ROCKETTROOPER
|| cent->gent->client->NPC_class == CLASS_MARK1
|| cent->gent->client->NPC_class == CLASS_MARK2
|| cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID
|| cent->gent->client->NPC_class == CLASS_GONK
|| cent->gent->client->NPC_class == CLASS_HOWLER )
{
ent->shaderRGBA[0] = 120;
ent->shaderRGBA[1] = 120;
ent->shaderRGBA[2] = 120;
}
else if ( cent->gent->client->NPC_class == CLASS_TUSKEN
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_NOGHRI
|| cent->gent->client->NPC_class == CLASS_FLIER2
|| cent->gent->client->NPC_class == CLASS_WEEQUAY
|| cent->gent->client->NPC_class == CLASS_LIZARD
|| cent->gent->client->NPC_class == CLASS_SWAMPTROOPER
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_FISH
|| cent->gent->client->NPC_class == CLASS_GRAN
|| cent->gent->client->NPC_class == CLASS_CLAW )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_REBORN
|| cent->gent->client->NPC_class == CLASS_KYLE )
{
ent->shaderRGBA[0] = 208;
ent->shaderRGBA[1] = 55;
ent->shaderRGBA[2] = 53;
}
else if ( cent->gent->client->NPC_class == CLASS_ALORA )
{
ent->shaderRGBA[0] = 205;
ent->shaderRGBA[1] = 200;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
ent->shaderRGBA[0] = 208;
ent->shaderRGBA[1] = 106;
ent->shaderRGBA[2] = 206;
}
else if ( cent->gent->client->NPC_class == CLASS_MOUSE
|| cent->gent->client->NPC_class == CLASS_JAWA
|| cent->gent->client->NPC_class == CLASS_PROBE
|| cent->gent->client->NPC_class == CLASS_RANCOR )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI
|| cent->gent->client->NPC_class == CLASS_LUKE )
{
ent->shaderRGBA[0] = 240;
ent->shaderRGBA[1] = 240;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN
|| cent->gent->client->NPC_class == CLASS_WAMPA
|| cent->gent->client->NPC_class == CLASS_BOBAFETT
|| cent->gent->client->NPC_class == CLASS_MINEMONSTER )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 43;
}
else if ( cent->gent->client->NPC_class == CLASS_INTERROGATOR
|| cent->gent->client->NPC_class == CLASS_TRANDOSHAN )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 100;
ent->shaderRGBA[2] = 100;
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION
|| cent->gent->client->NPC_class == CLASS_DESANN
|| cent->gent->client->NPC_class == CLASS_REELO )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 156;
}
else if ( cent->gent->client->NPC_class == CLASS_ATST
|| cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
ent->shaderRGBA[0] = 10;
ent->shaderRGBA[1] = 10;
ent->shaderRGBA[2] = 10;
}
}
break;
case TEAM_PLAYER:
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 0;
if ( cent->gent && cent->gent->client )
{
if ( cent->gent->client->NPC_class == CLASS_PRISONER
|| cent->gent->client->NPC_class == CLASS_BESPIN_COP
|| cent->gent->client->NPC_class == CLASS_REBEL
|| cent->gent->client->NPC_class == CLASS_RODIAN
|| cent->gent->client->NPC_class == CLASS_JAN
|| cent->gent->client->NPC_class == CLASS_LANDO
|| cent->gent->client->NPC_class == CLASS_GALAK
|| cent->gent->client->NPC_class == CLASS_STORMTROOPER
|| cent->gent->client->NPC_class == CLASS_IMPWORKER
|| cent->gent->client->NPC_class == CLASS_IMPERIAL )
{
ent->shaderRGBA[0] = 92;
ent->shaderRGBA[1] = 249;
ent->shaderRGBA[2] = 208;
}
else if ( cent->gent->client->NPC_class == CLASS_SEEKER
|| cent->gent->client->NPC_class == CLASS_REMOTE
|| cent->gent->client->NPC_class == CLASS_GALAKMECH
|| cent->gent->client->NPC_class == CLASS_SHADOWTROOPER
|| cent->gent->client->NPC_class == CLASS_SABOTEUR
|| cent->gent->client->NPC_class == CLASS_SABER_DROID
|| cent->gent->client->NPC_class == CLASS_PROTOCOL
|| cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER
|| cent->gent->client->NPC_class == CLASS_ROCKETTROOPER
|| cent->gent->client->NPC_class == CLASS_MARK1
|| cent->gent->client->NPC_class == CLASS_MARK2
|| cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID
|| cent->gent->client->NPC_class == CLASS_GONK
|| cent->gent->client->NPC_class == CLASS_HOWLER )
{
ent->shaderRGBA[0] = 70;
ent->shaderRGBA[1] = 120;
ent->shaderRGBA[2] = 120;
}
else if ( cent->gent->client->NPC_class == CLASS_TUSKEN
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_NOGHRI
|| cent->gent->client->NPC_class == CLASS_FLIER2
|| cent->gent->client->NPC_class == CLASS_WEEQUAY
|| cent->gent->client->NPC_class == CLASS_LIZARD
|| cent->gent->client->NPC_class == CLASS_SWAMPTROOPER
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_FISH
|| cent->gent->client->NPC_class == CLASS_GRAN
|| cent->gent->client->NPC_class == CLASS_CLAW )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_REBORN
|| cent->gent->client->NPC_class == CLASS_KYLE )
{
ent->shaderRGBA[0] = 208;
ent->shaderRGBA[1] = 55;
ent->shaderRGBA[2] = 53;
}
else if ( cent->gent->client->NPC_class == CLASS_ALORA )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 200;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
ent->shaderRGBA[0] = 218;
ent->shaderRGBA[1] = 156;
ent->shaderRGBA[2] = 226;
}
else if ( cent->gent->client->NPC_class == CLASS_MOUSE
|| cent->gent->client->NPC_class == CLASS_JAWA
|| cent->gent->client->NPC_class == CLASS_PROBE
|| cent->gent->client->NPC_class == CLASS_RANCOR )
{
ent->shaderRGBA[0] = 205;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI
|| cent->gent->client->NPC_class == CLASS_LUKE )
{
ent->shaderRGBA[0] = 240;
ent->shaderRGBA[1] = 240;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN
|| cent->gent->client->NPC_class == CLASS_WAMPA
|| cent->gent->client->NPC_class == CLASS_BOBAFETT
|| cent->gent->client->NPC_class == CLASS_MINEMONSTER )
{
ent->shaderRGBA[0] = 205;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 43;
}
else if ( cent->gent->client->NPC_class == CLASS_INTERROGATOR
|| cent->gent->client->NPC_class == CLASS_TRANDOSHAN )
{
ent->shaderRGBA[0] = 205;
ent->shaderRGBA[1] = 100;
ent->shaderRGBA[2] = 100;
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION
|| cent->gent->client->NPC_class == CLASS_DESANN
|| cent->gent->client->NPC_class == CLASS_REELO )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_ATST
|| cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 250;
ent->shaderRGBA[2] = 0;
}
}
break;
case TEAM_FREE:
if ( cent->gent->client->NPC_class == CLASS_PRISONER
|| cent->gent->client->NPC_class == CLASS_BESPIN_COP
|| cent->gent->client->NPC_class == CLASS_REBEL
|| cent->gent->client->NPC_class == CLASS_RODIAN
|| cent->gent->client->NPC_class == CLASS_JAN
|| cent->gent->client->NPC_class == CLASS_LANDO
|| cent->gent->client->NPC_class == CLASS_GALAK
|| cent->gent->client->NPC_class == CLASS_STORMTROOPER
|| cent->gent->client->NPC_class == CLASS_IMPWORKER
|| cent->gent->client->NPC_class == CLASS_IMPERIAL )
{
ent->shaderRGBA[0] = 142;
ent->shaderRGBA[1] = 249;
ent->shaderRGBA[2] = 208;
}
else if ( cent->gent->client->NPC_class == CLASS_SEEKER
|| cent->gent->client->NPC_class == CLASS_REMOTE
|| cent->gent->client->NPC_class == CLASS_GALAKMECH
|| cent->gent->client->NPC_class == CLASS_SHADOWTROOPER
|| cent->gent->client->NPC_class == CLASS_SABOTEUR
|| cent->gent->client->NPC_class == CLASS_SABER_DROID
|| cent->gent->client->NPC_class == CLASS_HAZARD_TROOPER
|| cent->gent->client->NPC_class == CLASS_ROCKETTROOPER
|| cent->gent->client->NPC_class == CLASS_MARK1
|| cent->gent->client->NPC_class == CLASS_MARK2
|| cent->gent->client->NPC_class == CLASS_ASSASSIN_DROID
|| cent->gent->client->NPC_class == CLASS_GONK
|| cent->gent->client->NPC_class == CLASS_HOWLER )
{
ent->shaderRGBA[0] = 120;
ent->shaderRGBA[1] = 120;
ent->shaderRGBA[2] = 120;
}
else if ( cent->gent->client->NPC_class == CLASS_TUSKEN
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_NOGHRI
|| cent->gent->client->NPC_class == CLASS_FLIER2
|| cent->gent->client->NPC_class == CLASS_WEEQUAY
|| cent->gent->client->NPC_class == CLASS_LIZARD
|| cent->gent->client->NPC_class == CLASS_SWAMPTROOPER
|| cent->gent->client->NPC_class == CLASS_GLIDER
|| cent->gent->client->NPC_class == CLASS_FISH
|| cent->gent->client->NPC_class == CLASS_GRAN
|| cent->gent->client->NPC_class == CLASS_CLAW )
{
ent->shaderRGBA[0] = 208;
ent->shaderRGBA[1] = 55;
ent->shaderRGBA[2] = 53;
}
else if ( cent->gent->client->NPC_class == CLASS_REBORN
|| cent->gent->client->NPC_class == CLASS_KYLE )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 231;
ent->shaderRGBA[2] = 53;
}
else if ( cent->gent->client->NPC_class == CLASS_ALORA )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 200;
ent->shaderRGBA[2] = 0;
}
else if ( cent->gent->client->NPC_class == CLASS_MONMOTHA )
{
ent->shaderRGBA[0] = 218;
ent->shaderRGBA[1] = 156;
ent->shaderRGBA[2] = 226;
}
else if ( cent->gent->client->NPC_class == CLASS_MOUSE
|| cent->gent->client->NPC_class == CLASS_JAWA
|| cent->gent->client->NPC_class == CLASS_PROBE
|| cent->gent->client->NPC_class == CLASS_RANCOR )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_JEDI
|| cent->gent->client->NPC_class == CLASS_LUKE )
{
ent->shaderRGBA[0] = 240;
ent->shaderRGBA[1] = 240;
ent->shaderRGBA[2] = 255;
}
else if ( cent->gent->client->NPC_class == CLASS_MORGANKATARN
|| cent->gent->client->NPC_class == CLASS_WAMPA
|| cent->gent->client->NPC_class == CLASS_BOBAFETT
|| cent->gent->client->NPC_class == CLASS_MINEMONSTER )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 0;
ent->shaderRGBA[2] = 43;
}
else if ( cent->gent->client->NPC_class == CLASS_INTERROGATOR
|| cent->gent->client->NPC_class == CLASS_TRANDOSHAN )
{
ent->shaderRGBA[0] = 255;
ent->shaderRGBA[1] = 100;
ent->shaderRGBA[2] = 100;
}
else if ( cent->gent->client->NPC_class == CLASS_TAVION
|| cent->gent->client->NPC_class == CLASS_DESANN
|| cent->gent->client->NPC_class == CLASS_REELO )
{
ent->shaderRGBA[0] = 0;
ent->shaderRGBA[1] = 255;
ent->shaderRGBA[2] = 156;
}
else if ( cent->gent->client->NPC_class == CLASS_ATST
|| cent->gent->client->NPC_class == CLASS_SAND_CREATURE )
{
ent->shaderRGBA[0] = 10;
ent->shaderRGBA[1] = 10;
ent->shaderRGBA[2] = 10;
}
break;
default:
break;
}
[/code]

 

 

Posted

Changing force Push \ Pull \ Grip color shadering:

line 4480 of cg_players.cpp

 

 

[code] void CG_ForcePushBlur( const vec3_t org, qboolean darkSide )
{
localEntity_t *ex;

ex = CG_AllocLocalEntity();
ex->leType = LE_PUFF;
ex->refEntity.reType = RT_SPRITE;
ex->radius = 2.0f;
ex->startTime = cg.time;
ex->endTime = ex->startTime + 120;
VectorCopy( org, ex->pos.trBase );
ex->pos.trTime = cg.time;
ex->pos.trType = TR_LINEAR;
VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta );

if ( darkSide )
{//make it red
ex->color[0] = 16;
ex->color[1] = 100;
ex->color[2] = 40;
}
else
{//blue
ex->color[0] = 10;
ex->color[1] = 10;
ex->color[2] = 10;
}
ex->refEntity.customShader = cgi_R_RegisterShader( "gfx/effects/forcePush" );

ex = CG_AllocLocalEntity();
ex->leType = LE_PUFF;
ex->refEntity.reType = RT_SPRITE;
ex->refEntity.rotation = 180.0f;
ex->radius = 2.0f;
ex->startTime = cg.time;
ex->endTime = ex->startTime + 120;
VectorCopy( org, ex->pos.trBase );
ex->pos.trTime = cg.time;
ex->pos.trType = TR_LINEAR;
VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta );

if ( darkSide )
{// Tk Grip of Kain is red
ex->color[0] = 16;
ex->color[1] = 100;
ex->color[2] = 40;
}
else
{// Push and Pull of Reavers
ex->color[0] = 10;
ex->color[1] = 10;
ex->color[2] = 10;
}
ex->refEntity.customShader = cgi_R_RegisterShader( "gfx/effects/forcePush" );
}

 

 

About force heal: you can customize effect on wp_saber.cpp on line 10023

 

 

void WP_StartForceHealEffects( gentity_t *self )
{
if ( self->ghoul2.size() )
{
if ( self->chestBolt != -1 )
{
/*G_PlayEffect( G_EffectIndex( "force/heal2" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );*/
//The Heal efx aura change by user class..
// Vampires usano la classica furia
if (self->client->NPC_class == CLASS_REBORN
|| self->client->NPC_class == CLASS_ALORA
|| self->client->NPC_class == CLASS_KYLE
|| self->client->NPC_class == CLASS_TUSKEN
|| self->client->NPC_class == CLASS_GLIDER
|| self->client->NPC_class == CLASS_NOGHRI
|| self->client->NPC_class == CLASS_FLIER2
|| self->client->NPC_class == CLASS_WEEQUAY
|| self->client->NPC_class == CLASS_LIZARD
|| self->client->NPC_class == CLASS_GRAN
|| self->client->NPC_class == CLASS_CLAW
|| self->client->NPC_class == CLASS_SWAMPTROOPER
|| self->client->NPC_class == CLASS_FISH
|| self->client->NPC_class == CLASS_MONMOTHA )
{
G_PlayEffect( G_EffectIndex( "force/healv" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
// Mietitori e Spettri usano un'aura focalizzante
else if ( self->client->NPC_class == CLASS_JEDI
|| self->client->NPC_class == CLASS_ASSASSIN_DROID
|| self->client->NPC_class == CLASS_LUKE
|| self->client->NPC_class == CLASS_MOUSE
|| self->client->NPC_class == CLASS_JAWA
|| self->client->NPC_class == CLASS_PROBE
|| self->client->NPC_class == CLASS_REELO )
{
G_PlayEffect( G_EffectIndex( "force/heal2" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
// Demoni
else if ( self->client->NPC_class == CLASS_MORGANKATARN
|| self->client->NPC_class == CLASS_BOBAFETT
|| self->client->NPC_class == CLASS_WAMPA )
{
G_PlayEffect( G_EffectIndex( "force/heald" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
// Hylden resistance to telekinesis
else if ( self->client->NPC_class == CLASS_TAVION
|| self->client->NPC_class == CLASS_DESANN )
{
G_PlayEffect( G_EffectIndex( "force/healh" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
// The Elder God Shield hitself for shoots energy buster
else if ( self->client->NPC_class == CLASS_ATST
|| self->client->NPC_class == CLASS_SAND_CREATURE
|| self->client->NPC_class == CLASS_HOWLER )
{
G_PlayEffect( G_EffectIndex( "force/heald" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
// Human and Mortal Creatures the berserk of the vampire slayers of defiance.
else if ( self->client->NPC_class == CLASS_PRISONER
|| self->client->NPC_class == CLASS_BESPIN_COP
|| self->client->NPC_class == CLASS_RODIAN
|| self->client->NPC_class == CLASS_LANDO
|| self->client->NPC_class == CLASS_GALAK
|| self->client->NPC_class == CLASS_JAN
|| self->client->NPC_class == CLASS_STORMTROOPER
|| self->client->NPC_class == CLASS_IMPWORKER
|| self->client->NPC_class == CLASS_IMPERIAL
|| self->client->NPC_class == CLASS_PROTOCOL
|| self->client->NPC_class == CLASS_REBEL
|| self->client->NPC_class == CLASS_INTERROGATOR
|| self->client->NPC_class == CLASS_TRANDOSHAN
|| self->client->NPC_class == CLASS_SWAMP )
{
G_PlayEffect( G_EffectIndex( "force/heals" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
// Artifact and elemental creatures
else if ( self->client->NPC_class == CLASS_R2D2
|| self->client->NPC_class == CLASS_R5D2
|| self->client->NPC_class == CLASS_MARK1
|| self->client->NPC_class == CLASS_MARK2
|| self->client->NPC_class == CLASS_REMOTE
|| self->client->NPC_class == CLASS_SEEKER )
{
G_PlayEffect( G_EffectIndex( "force/healm" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
else if ( self->client->NPC_class == CLASS_SABOTEUR
|| self->client->NPC_class == CLASS_SHADOWTROOPER )
{
G_PlayEffect( G_EffectIndex( "force/heals" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
else if ( self->client->NPC_class == CLASS_HAZARD_TROOPER )
{
G_PlayEffect( G_EffectIndex( "force/heald" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
else if ( self->client->NPC_class == CLASS_SABER_DROID
|| self->client->NPC_class == CLASS_PROTOCOL )
{
G_PlayEffect( G_EffectIndex( "force/healm" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
else if ( self->client->NPC_class == CLASS_ROCKETTROOPER )
{
G_PlayEffect( G_EffectIndex( "force/heal2" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
else if ( self->client->NPC_class == CLASS_BARTENDER
|| self->client->NPC_class == CLASS_GALAKMECH )
{
G_PlayEffect( G_EffectIndex( "force/heals" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
else if ( self->client->NPC_class == CLASS_GONK )
{
G_PlayEffect( G_EffectIndex( "force/healm" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue );
}
}

 

 


Posted

For the end, Rage work with same procedure:
line 13137

 

 

case FP_RAGE:
//duration is always 5 seconds, player time
duration = ceil(FORCE_RAGE_DURATION*forceSpeedValue[self->client->ps.forcePowerLevel[FP_RAGE]-1]);//FIXME: because the timescale scales down (not instant), this doesn't end up being exactly right...
self->client->ps.forcePowersActive |= ( 1 << forcePower );
G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/rage.mp3" );
self->s.loopSound = G_SoundIndex( "sound/weapons/force/rageloop.wav" );
if ( self->chestBolt != -1 )
{
/*if (self->client->NPC_class==CLASS_WAMPA)
{
G_PlayEffect( G_EffectIndex( "force/fear" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}*/
//The rage efx aura change by user class..
// Vampires usano la classica furia
if (self->client->NPC_class == CLASS_REBORN
|| self->client->NPC_class == CLASS_ALORA
|| self->client->NPC_class == CLASS_KYLE
|| self->client->NPC_class == CLASS_TUSKEN
|| self->client->NPC_class == CLASS_GLIDER
|| self->client->NPC_class == CLASS_NOGHRI
|| self->client->NPC_class == CLASS_FLIER2
|| self->client->NPC_class == CLASS_WEEQUAY
|| self->client->NPC_class == CLASS_LIZARD
|| self->client->NPC_class == CLASS_GRAN
|| self->client->NPC_class == CLASS_CLAW
|| self->client->NPC_class == CLASS_SWAMPTROOPER
|| self->client->NPC_class == CLASS_FISH
|| self->client->NPC_class == CLASS_MONMOTHA )
{
G_PlayEffect( G_EffectIndex( "force/rage2" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
// Mietitori e Spettri usano un'aura focalizzante
else if ( self->client->NPC_class == CLASS_JEDI
|| self->client->NPC_class == CLASS_ASSASSIN_DROID
|| self->client->NPC_class == CLASS_LUKE
|| self->client->NPC_class == CLASS_MOUSE
|| self->client->NPC_class == CLASS_JAWA
|| self->client->NPC_class == CLASS_PROBE
|| self->client->NPC_class == CLASS_REELO )
{
G_PlayEffect( G_EffectIndex( "force/trance" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
// Demoni
else if ( self->client->NPC_class == CLASS_MORGANKATARN
|| self->client->NPC_class == CLASS_BOBAFETT
|| self->client->NPC_class == CLASS_WAMPA )
{
G_PlayEffect( G_EffectIndex( "force/fear" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
// Hylden resistance to telekinesis
else if ( self->client->NPC_class == CLASS_TAVION
|| self->client->NPC_class == CLASS_DESANN )
{
G_PlayEffect( G_EffectIndex( "force/tkshield" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
// The Elder God Shield hitself for shoots energy buster
else if ( self->client->NPC_class == CLASS_ATST
|| self->client->NPC_class == CLASS_SAND_CREATURE )
{
G_PlayEffect( G_EffectIndex( "force/eldershield" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
// Human and Mortal Creatures the berserk of the vampire slayers of defiance.
else if ( self->client->NPC_class == CLASS_PRISONER
|| self->client->NPC_class == CLASS_BESPIN_COP
|| self->client->NPC_class == CLASS_RODIAN
|| self->client->NPC_class == CLASS_LANDO
|| self->client->NPC_class == CLASS_GALAK
|| self->client->NPC_class == CLASS_JAN
|| self->client->NPC_class == CLASS_STORMTROOPER
|| self->client->NPC_class == CLASS_IMPWORKER
|| self->client->NPC_class == CLASS_IMPERIAL
|| self->client->NPC_class == CLASS_PROTOCOL
|| self->client->NPC_class == CLASS_REBEL
|| self->client->NPC_class == CLASS_INTERROGATOR
|| self->client->NPC_class == CLASS_TRANDOSHAN
|| self->client->NPC_class == CLASS_SWAMP )
{
G_PlayEffect( G_EffectIndex( "force/berserk" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
// Artifact and elemental creatures
else if ( self->client->NPC_class == CLASS_R2D2
|| self->client->NPC_class == CLASS_R5D2
|| self->client->NPC_class == CLASS_MARK1
|| self->client->NPC_class == CLASS_MARK2
|| self->client->NPC_class == CLASS_REMOTE
|| self->client->NPC_class == CLASS_SEEKER )
{
G_PlayEffect( G_EffectIndex( "force/rage2" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
else if ( self->client->NPC_class == CLASS_SABOTEUR
|| self->client->NPC_class == CLASS_SHADOWTROOPER )
{
G_PlayEffect( G_EffectIndex( "force/berserk" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
else if ( self->client->NPC_class == CLASS_HAZARD_TROOPER )
{
G_PlayEffect( G_EffectIndex( "force/rage2" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
else if ( self->client->NPC_class == CLASS_SABER_DROID
|| self->client->NPC_class == CLASS_PROTOCOL )
{
G_PlayEffect( G_EffectIndex( "force/eldershield" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
else if ( self->client->NPC_class == CLASS_ROCKETTROOPER )
{
G_PlayEffect( G_EffectIndex( "force/trance" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
else if ( self->client->NPC_class == CLASS_BARTENDER
|| self->client->NPC_class == CLASS_GALAKMECH )
{
G_PlayEffect( G_EffectIndex( "force/trance" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
else if ( self->client->NPC_class == CLASS_GONK )
{
G_PlayEffect( G_EffectIndex( "force/fear" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue );
}
}
break;

 

 

special thanks to:

@@ent

@@Serenity937

@@Raz0r

@@eezstreet

Serenity937 and Keyten like this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...