Asgarath83 Posted August 19, 2014 Posted August 19, 2014 @@Asgarath83 Imagine the Concussion Rifle without Concussion/Shot.efx; That's what's happening with Destruction right now. Everything else is working fine, which means there's something else I'm missing in the actual SP code.mmm, i got a similar problem after i have registereed the new effect of my force effects and i used theFXscheduler for play the effects. try with the Gplayeffect and the address of the effect of projectile. Please post the code about the show of the destruction shot efx projectile. maybe i have an idea of what is wrong, beucase i get the same error with all my effects after i edited and register new effect with force lightning.the other weapons effects and blade effects of the saber and the other weapons shooted by the enemy works fine? or also they not show the efx?
JediBantha Posted August 19, 2014 Author Posted August 19, 2014 @@Asgarath83@@eezstreet FX_Destruction.cpp: void FX_DestructProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon ) { vec3_t forward; if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f ) { forward[2] = 1.0f; } theFxScheduler.PlayEffect( "force/destruction", cent->lerpOrigin, forward ); } /* --------------------------- FX_DestructHitWall --------------------------- */ void FX_DestructHitWall( vec3_t origin, vec3_t normal ) { theFxScheduler.PlayEffect( "force/destruction_explode", origin, normal ); } /* --------------------------- FX_DestructHitPlayer --------------------------- */ void FX_DestructHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid ) { theFxScheduler.PlayEffect( "force/destruction_explode", origin, normal ); } cg_weapons.cpp: case WP_SABER: theFxScheduler.RegisterEffect( "force/destruction" ); theFxScheduler.RegisterEffect( "force/destruction_explode" ); Asgarath83 likes this
Asgarath83 Posted August 20, 2014 Posted August 20, 2014 Ah yes... that problem. i got too. for some unknown reason (i ask aslo on Jacoders to @@ent about that )rregistering and playing and efx on theFxScheduler can cause that issue. i registered and played with fxscheduler dozens of effect only for see... nothing! XD all effects of blades, projectile of weapons and force power disapperead! And at the end of a long debug, i see that the cause of the problem is theFxscheduler itself.how to fix:1 On cgweapons: put thefxscheduler after case WP_SABER into /* */ so they are green and code not read.2: on FxDestruction.cpp. Replace that:"theFxScheduler.PlayEffect( "force/destruction", cent->lerpOrigin, forward );"with"G_PlayEffect( "force/destruction", cent->lerpOrigin, forward );" that"theFxScheduler.PlayEffect( "force/destruction_explode", origin, normal );"with"G_PlayEffect( "force/destruction_explode", origin, normal );"andthat"theFxScheduler.PlayEffect( "force/destruction_explode", origin, normal );"with"G_PlayEffect( "force/destruction_explode", origin, normal );" Now should work, i hope. with my force power this method works for drain, lightning, rage, heal, telepathy.@@JediBantha
JediBantha Posted August 22, 2014 Author Posted August 22, 2014 Have you tested that in-game? Asgarath83 likes this
Asgarath83 Posted August 22, 2014 Posted August 22, 2014 Have you tested that in-game?for me it's working without problem. register sound and effect is not necessary for play an effect, and to me has got a large amount of issue. with Gplay in my coide work. with Fxscheduler not work. i not know why but for some strange reason registering effect on cg_weapons on fxscheduler cause trouble to effects visualizzation. i show that issue also to @@ent and @@ensiform .also , i know that a not precached sound \ efx increase the time of loading of mod and maps. and also that is not tecnically correct, but for me it works. O.o
JediBantha Posted August 23, 2014 Author Posted August 23, 2014 What kind of configuration do you have in the files? You might already have this solved, by the look of things.
Asgarath83 Posted August 23, 2014 Posted August 23, 2014 the same of the force effect rage. Cgmedia // Stored FX handles //-------------------- typedef struct { // BRYAR PISTOL fxHandle_t bryarShotEffect; fxHandle_t bryarPowerupShotEffect; fxHandle_t bryarWallImpactEffect; fxHandle_t bryarWallImpactEffect2; fxHandle_t bryarWallImpactEffect3; fxHandle_t bryarFleshImpactEffect; // BLASTER fxHandle_t blasterShotEffect; fxHandle_t blasterOverchargeEffect; fxHandle_t blasterWallImpactEffect; fxHandle_t blasterFleshImpactEffect; // BOWCASTER fxHandle_t bowcasterShotEffect; fxHandle_t bowcasterBounceEffect; fxHandle_t bowcasterImpactEffect; // FLECHETTE fxHandle_t flechetteShotEffect; fxHandle_t flechetteAltShotEffect; fxHandle_t flechetteShotDeathEffect; fxHandle_t flechetteFleshImpactEffect; fxHandle_t flechetteRicochetEffect; //FORCE BEHAVOUR STATES EFFECTS // Stunning fxHandle_t forceConfusion; /* // Trapped fxHandle_t forceWebbed; // Control of Undead fxHandle_t forceSpirithWrack; // Poisoned fxHandle_t forcePoisoned; // Hylden Corruption fxHandle_t forceCorruption; // cura 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 fxHandle_t forceStorm; // Smog and void fxHandle_t forceGasp; // 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; // Acid \ font of putrescense fxHandle_t forceMud; // Time effect fxHandle_t forceSlowtime;*/ // 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;*/ //footstep effects fxHandle_t footstepMud; fxHandle_t footstepSand; fxHandle_t footstepSnow; fxHandle_t footstepGravel; //landing effects fxHandle_t landingMud; fxHandle_t landingSand; fxHandle_t landingDirt; fxHandle_t landingSnow; fxHandle_t landingGravel; } cgEffects_t;Cg_Weapons
Asgarath83 Posted August 23, 2014 Posted August 23, 2014 CG PLAYERS(i used the same syntax of force drain for force lightning, too. ) THE FORCE DRAIN if ( cent->gent->client->ps.forcePowersActive&(1<<FP_DRAIN) && 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 ) { G_PlayEffect( G_EffectIndex( "mp/drainwide2" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); G_PlayEffect( G_EffectIndex( "mp/drainhit2" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); } else if ( cent->gent->client->NPC_class == CLASS_JEDI ) { G_PlayEffect( G_EffectIndex( "mp/drainwide2" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); G_PlayEffect( G_EffectIndex( "mp/drainhit2" ), 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 ) { G_PlayEffect( G_EffectIndex( "mp/drainwide" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); /*G_PlayEffect( G_EffectIndex( "mp/drainhit" ), 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_SWAMP || 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 || cent->gent->client->NPC_class == CLASS_SEEKER || cent->gent->client->NPC_class == CLASS_SENTRY || cent->gent->client->NPC_class == CLASS_REMOTE ) { G_PlayEffect( G_EffectIndex( "mp/drainwide3" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); G_PlayEffect( G_EffectIndex( "mp/drainhit3" ), 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 ) { G_PlayEffect( G_EffectIndex( "mp/drainwide4" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); G_PlayEffect( G_EffectIndex( "mp/drainhit4" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); } else if ( cent->gent->client->NPC_class == CLASS_TAVION || cent->gent->client->NPC_class == CLASS_DESANN ) { G_PlayEffect( G_EffectIndex( "mp/drainwide5" ), cent->gent->client->renderInfo.handLPoint, fxAxis ); G_PlayEffect( G_EffectIndex( "mp/drainhit5" ), 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 ) { G_PlayEffect( G_EffectIndex( "mp/drain2" ), cent->gent->client->renderInfo.handLPoint, fxDir ); G_PlayEffect( G_EffectIndex( "mp/drainhit2" ), cent->gent->client->renderInfo.handLPoint, fxDir ); } else if ( cent->gent->client->NPC_class == CLASS_JEDI ) { G_PlayEffect( G_EffectIndex( "mp/drain2" ), cent->gent->client->renderInfo.handLPoint, fxDir ); G_PlayEffect( G_EffectIndex( "mp/drainhit2" ), 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 ) { G_PlayEffect( G_EffectIndex( "mp/drain" ), cent->gent->client->renderInfo.handLPoint, fxDir ); /*G_PlayEffect( G_EffectIndex( "mp/drainhit" ), 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_SWAMP || 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 || cent->gent->client->NPC_class == CLASS_SEEKER || cent->gent->client->NPC_class == CLASS_SENTRY || cent->gent->client->NPC_class == CLASS_REMOTE ) { G_PlayEffect( G_EffectIndex( "mp/drain3" ), cent->gent->client->renderInfo.handLPoint, fxDir ); G_PlayEffect( G_EffectIndex( "mp/drainhit3" ), 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 ) { G_PlayEffect( G_EffectIndex( "mp/drain4" ), cent->gent->client->renderInfo.handLPoint, fxDir ); G_PlayEffect( G_EffectIndex( "mp/drainhit4" ), cent->gent->client->renderInfo.handLPoint, fxDir ); } else if ( cent->gent->client->NPC_class == CLASS_TAVION || cent->gent->client->NPC_class == CLASS_DESANN ) { G_PlayEffect( G_EffectIndex( "mp/drain5" ), cent->gent->client->renderInfo.handLPoint, fxDir ); G_PlayEffect( G_EffectIndex( "mp/drainhit5" ), cent->gent->client->renderInfo.handLPoint, fxDir ); } } } WP_SABER RAGE 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/rage.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/rageloop.wav"); } // 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_RANCOR || 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/trance.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/tranceloop.wav"); } // 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/fear.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/fearloop.wav"); } // 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/tkshield.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/tkshieldloop.wav"); } // 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/eldershield.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/eldershieldloop.wav"); } // 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_RODIAN || self->client->NPC_class == CLASS_LANDO || self->client->NPC_class == CLASS_GALAK || self->client->NPC_class == CLASS_INTERROGATOR || self->client->NPC_class == CLASS_TRANDOSHAN || self->client->NPC_class == CLASS_SWAMP ) { G_PlayEffect( G_EffectIndex( "force/runeshield" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/runeshield.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/runeshieldloop.wav"); } // The Sarafan Wizard protect itself with a rune shield! else if ( self->client->NPC_class == CLASS_JAN || self->client->NPC_class == CLASS_BESPIN_COP || self->client->NPC_class == CLASS_STORMTROOPER || self->client->NPC_class == CLASS_IMPWORKER || self->client->NPC_class == CLASS_IMPERIAL || self->client->NPC_class == CLASS_REBEL ) { G_PlayEffect( G_EffectIndex( "force/berserk" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/berserk.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/berserkloop.wav"); } // 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 || self->client->NPC_class == CLASS_SENTRY ) { G_PlayEffect( G_EffectIndex( "force/rage2" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, duration, qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/rage.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/rageloop.wav"); } 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/berserk.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/berserkloop.wav"); } 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/rage.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/rageloop.wav"); } 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/eldershield.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/eldershieldloop.wav"); } 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/trance.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/tranceloop.wav"); } 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/trance.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/tranceloop.wav"); } 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 ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/fear.mp3" ); self->s.loopSound = G_SoundIndex( "sound/weapons/force/fearloop.wav"); } } break; HEAL 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 rigenerazione 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 divorano l'anima else if ( self->client->NPC_class == CLASS_JEDI || self->client->NPC_class == CLASS_ASSASSIN_DROID || self->client->NPC_class == CLASS_RANCOR || 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 ); } // rigenerazione dei 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 ); } // rigenerazione degli Hylden 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 usa la rigenerazione demoniaca come effetto 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 ); } // Umani e sarafan usano la magia bianca per curarsi. 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_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 ); } // Magia rigenerante elementale dei Golem l'effetto cambia a seconda dell'elemento del golem 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 || self->client->NPC_class == CLASS_SENTRY ) { 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 ); } /* if ( self->headBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->headBolt, self->s.number, self->currentOrigin, 3000, qtrue ); } if ( self->cervicalBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->cervicalBolt, self->s.number, self->currentOrigin, 3000, qtrue ); } if ( self->chestBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->chestBolt, self->s.number, self->currentOrigin, 3000, qtrue ); } if ( self->gutBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->gutBolt, self->s.number, self->currentOrigin, 3000, qtrue ); } if ( self->kneeLBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->kneeLBolt, self->s.number, self->currentOrigin, 3000, qtrue ); } if ( self->kneeRBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->kneeRBolt, self->s.number, self->currentOrigin, 3000, qtrue ); } if ( self->elbowLBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->elbowLBolt, self->s.number, self->currentOrigin, 3000, qtrue ); } if ( self->elbowRBolt != -1 ) { G_PlayEffect( G_EffectIndex( "force/heal_joint" ), self->playerModel, self->elbowRBolt, self->s.number, self->currentOrigin, 3000, qtrue ); */ } } }
Asgarath83 Posted August 23, 2014 Posted August 23, 2014 CG_weapons switch ( weaponNum ) //extra client only stuff{case WP_SABER://saber/force FXtheFxScheduler.RegisterEffect( "sparks/spark_nosnd" );//was "sparks/spark"theFxScheduler.RegisterEffect( "sparks/blood_sparks2" );theFxScheduler.RegisterEffect( "force/force_touch" );theFxScheduler.RegisterEffect( "saber/saber_block" );theFxScheduler.RegisterEffect( "saber/saber_cut" );//theFxScheduler.RegisterEffect( "saber/limb_bolton" );theFxScheduler.RegisterEffect( "saber/fizz" );theFxScheduler.RegisterEffect( "saber/boil" );//theFxScheduler.RegisterEffect( "saber/fire" );//was "sparks/spark"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 EFFECTScgs.effects.forceConfusion = theFxScheduler.RegisterEffect( "force/confusion" );/*cgs.effects.forceWebbed = theFxScheduler.RegisterEffect( "force/Webtrap" );cgs.effects.forceSpirithWrack = theFxScheduler.RegisterEffect( "force/Wrack" );cgs.effects.forcePoisoned = theFxScheduler.RegisterEffect( "force/poison2" );cgs.effects.forceCorruption = theFxScheduler.RegisterEffect( "force/corruption" );cgs.effects.forceHealing = theFxScheduler.RegisterEffect( "force/healed" );cgs.effects.forceNature = theFxScheduler.RegisterEffect( "force/Nature" );cgs.effects.forceBlind = theFxScheduler.RegisterEffect( "force/blind" );cgs.effects.forceGasp = theFxScheduler.RegisterEffect( "force/smog" );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.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.forceMud = theFxScheduler.RegisterEffect( "force/mud" );cgs.effects.forceSlowtime = theFxScheduler.RegisterEffect( "force/slowtime" );*/// ARCANE ATTACKS EFFECTScgs.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 effectcgs.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" );*///saber sounds//cgi_S_RegisterSound( "sound/weapons/saber/saberon.wav" );//cgi_S_RegisterSound( "sound/weapons/saber/enemy_saber_on.wav" );cgi_S_RegisterSound( "sound/weapons/saber/saberonquick.wav" );//cgi_S_RegisterSound( "sound/weapons/saber/saberoff.wav" );//cgi_S_RegisterSound( "sound/weapons/saber/enemy_saber_off.wav" );cgi_S_RegisterSound( "sound/weapons/saber/saberspinoff.wav" );cgi_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" );for ( i = 1; i < 4; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/saberbounce%d.wav", i ) );}for ( i = 1; i < 4; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/saberhit%d.wav", i ) );}for ( i = 1; i < 4; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/saberhitwall%d.wav", i ) );}for ( i = 1; i < 10; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/saberblock%d.wav", i ) );}/*for ( i = 1; i < 6; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/saberhum%d.wav", i ) );}*/for ( i = 1; i < 10; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/saberhup%d.wav", i ) );}for ( i = 1; i < 4; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/saberspin%d.wav", i ) );}cgi_S_RegisterSound( "sound/weapons/saber/saber_catch.wav" );for ( i = 1; i < 4; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/bounce%d.wav", i ) );}cgi_S_RegisterSound( "sound/weapons/saber/hitwater.wav" );cgi_S_RegisterSound( "sound/weapons/saber/boiling.wav" );for ( i = 1; i < 4; i++ ){cgi_S_RegisterSound( va( "sound/weapons/saber/rainfizz%d.wav", i ) );}cgi_S_RegisterSound( "sound/movers/objects/saber_slam" );//force soundscgi_S_RegisterSound( "sound/weapons/force/heal.mp3" );cgi_S_RegisterSound( "sound/weapons/force/speed.mp3" );cgi_S_RegisterSound( "sound/weapons/force/speedloop.mp3" );for ( i = 1; i < 5; i++ ){cgi_S_RegisterSound( va( "sound/weapons/force/heal%d_m.mp3", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/heal%d_f.mp3", i ) );}cgi_S_RegisterSound( "sound/weapons/force/lightning.wav" );cgi_S_RegisterSound( "sound/weapons/force/lightning2.wav" );cgi_S_RegisterSound( "sound/weapons/force/web.wav" );cgi_S_RegisterSound( "sound/weapons/force/web2.wav");cgi_S_RegisterSound( "sound/weapons/force/necro.wav" );cgi_S_RegisterSound( "sound/weapons/force/necro2.wav" );cgi_S_RegisterSound( "sound/weapons/force/poison.wav" );cgi_S_RegisterSound( "sound/weapons/force/poison2.wav");cgi_S_RegisterSound( "sound/weapons/force/hell.wav" );cgi_S_RegisterSound( "sound/weapons/force/hell2.wav" );cgi_S_RegisterSound( "sound/weapons/force/hylden.wav" );cgi_S_RegisterSound( "sound/weapons/force/hylden2.wav");cgi_S_RegisterSound( "sound/weapons/force/greenlightning.wav" );cgi_S_RegisterSound( "sound/weapons/force/greenlightning2.wav" );cgi_S_RegisterSound( "sound/weapons/force/ghost.wav" );cgi_S_RegisterSound( "sound/weapons/force/ghost2.wav");cgi_S_RegisterSound( "sound/weapons/force/dark.wav" );cgi_S_RegisterSound( "sound/weapons/force/dark2.wav" );cgi_S_RegisterSound( "sound/weapons/force/yellowlightning.wav" );cgi_S_RegisterSound( "sound/weapons/force/yellowlightning2.wav");cgi_S_RegisterSound( "sound/weapons/force/burst.wav" );cgi_S_RegisterSound( "sound/weapons/force/burst2.wav" );cgi_S_RegisterSound( "sound/weapons/force/fire.wav" );cgi_S_RegisterSound( "sound/weapons/force/fire2.wav");cgi_S_RegisterSound( "sound/weapons/force/wind.wav" );cgi_S_RegisterSound( "sound/weapons/force/wind2.wav" );cgi_S_RegisterSound( "sound/weapons/force/water.wav" );cgi_S_RegisterSound( "sound/weapons/force/water2.wav");cgi_S_RegisterSound( "sound/weapons/force/lava.wav" );cgi_S_RegisterSound( "sound/weapons/force/lava2.wav" );cgi_S_RegisterSound( "sound/weapons/force/ice.wav" );cgi_S_RegisterSound( "sound/weapons/force/ice2.wav");cgi_S_RegisterSound( "sound/weapons/force/stone.wav" );cgi_S_RegisterSound( "sound/weapons/force/stone2.wav" );cgi_S_RegisterSound( "sound/weapons/force/sonic.wav" );cgi_S_RegisterSound( "sound/weapons/force/sonic2.wav");cgi_S_RegisterSound( "sound/weapons/force/astral.wav" );cgi_S_RegisterSound( "sound/weapons/force/astral2.wav" );cgi_S_RegisterSound( "sound/weapons/force/fireball.wav" );cgi_S_RegisterSound( "sound/weapons/force/fireball2.wav");cgi_S_RegisterSound( "sound/weapons/force/firewhite.wav" );cgi_S_RegisterSound( "sound/weapons/force/firewhite2.wav" );cgi_S_RegisterSound( "sound/weapons/force/hollyfire.wav" );cgi_S_RegisterSound( "sound/weapons/force/hollyfire2.wav");cgi_S_RegisterSound( "sound/weapons/force/holly.wav" );cgi_S_RegisterSound( "sound/weapons/force/holly2.wav" );cgi_S_RegisterSound( "sound/weapons/force/fire.wav" );cgi_S_RegisterSound( "sound/weapons/force/fire2.wav");cgi_S_RegisterSound( "sound/weapons/force/life.wav" );cgi_S_RegisterSound( "sound/weapons/force/life2.wav");cgi_S_RegisterSound( "sound/weapons/force/skull.wav" );cgi_S_RegisterSound( "sound/weapons/force/skull2.wav" );cgi_S_RegisterSound( "sound/weapons/force/acid.wav" );cgi_S_RegisterSound( "sound/weapons/force/acid2.wav");cgi_S_RegisterSound( "sound/weapons/force/time.wav" );cgi_S_RegisterSound( "sound/weapons/force/time2.wav" );cgi_S_RegisterSound( "sound/weapons/force/stun.wav" );cgi_S_RegisterSound( "sound/weapons/force/stun2.wav");cgi_S_RegisterSound( "sound/weapons/force/crystal.wav" );cgi_S_RegisterSound( "sound/weapons/force/crystal2.wav");for ( i = 1; i < 4; i++ ){cgi_S_RegisterSound( va( "sound/weapons/force/lightninghit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/webhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/necrohit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/poisonhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/hellhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/hyldenhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/greenlightninghit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/ghosthit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/darkhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/yellowlightninghit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/bursthit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/firehit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/windhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/waterhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/lavahit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/icehit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/stonehit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/sonichit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/astralhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/fireballhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/firewhitehit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/hollyfirehit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/hollyhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/lifehit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/skullhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/acidhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/timehit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/stunhit%d.wav", i ) );cgi_S_RegisterSound( va( "sound/weapons/force/crystalhit%d.wav", i ) );}cgi_S_RegisterSound( "sound/weapons/force/push.wav" );cgi_S_RegisterSound( "sound/weapons/force/pull.wav" );cgi_S_RegisterSound( "sound/weapons/force/jump.wav" );cgi_S_RegisterSound( "sound/weapons/force/jumpbuild.wav" );cgi_S_RegisterSound( "sound/weapons/force/grip.mp3" );//new Jedi Academy force soundscgi_S_RegisterSound( "sound/weapons/force/absorb.mp3" );cgi_S_RegisterSound( "sound/weapons/force/absorbhit.mp3" );cgi_S_RegisterSound( "sound/weapons/force/absorbloop.mp3" );cgi_S_RegisterSound( "sound/weapons/force/protect.mp3" );cgi_S_RegisterSound( "sound/weapons/force/protecthit.mp3" );cgi_S_RegisterSound( "sound/weapons/force/protectloop.mp3" );cgi_S_RegisterSound( "sound/weapons/force/rage.mp3" );cgi_S_RegisterSound( "sound/weapons/force/ragehit.mp3" );cgi_S_RegisterSound( "sound/weapons/force/rageloop.mp3" );cgi_S_RegisterSound( "sound/weapons/force/see.mp3" );cgi_S_RegisterSound( "sound/weapons/force/seeloop.mp3" );cgi_S_RegisterSound( "sound/weapons/force/drain.mp3" );cgi_S_RegisterSound( "sound/weapons/force/drained.mp3" );//force graphicscgs.media.playerShieldDamage = cgi_R_RegisterShader("gfx/misc/personalshield");//cgs.media.forceSightBubble = cgi_R_RegisterShader("gfx/misc/sightbubble");//cgs.media.forceShell = cgi_R_RegisterShader("powerups/forceshell");cgs.media.forceShell = cgi_R_RegisterShader("gfx/misc/forceprotect");cgs.media.runeShell = cgi_R_RegisterShader("gfx/misc/forcerune");cgs.media.sightShell = cgi_R_RegisterShader("powerups/sightshell");cgi_R_RegisterShader( "gfx/2d/jsense" );//force effects - FIXME: only if someone has these powers?theFxScheduler.RegisterEffect( "force/rage2" );theFxScheduler.RegisterEffect( "force/berserk" );theFxScheduler.RegisterEffect( "force/fear" );theFxScheduler.RegisterEffect( "force/trance" );theFxScheduler.RegisterEffect( "force/tkshield" );theFxScheduler.RegisterEffect( "force/eldershield" );//theFxScheduler.RegisterEffect( "force/heal_joint" );theFxScheduler.RegisterEffect( "force/heal2" );theFxScheduler.RegisterEffect( "force/drain_hand" );//saber graphicscgs.media.saberBlurShader = cgi_R_RegisterShader("gfx/effects/sabers/saberBlur");cgs.media.swordTrailShader = cgi_R_RegisterShader("gfx/effects/sabers/swordTrail");cgs.media.yellowDroppedSaberShader = cgi_R_RegisterShader("gfx/effects/yellow_glow");cgi_R_RegisterShader( "gfx/effects/saberDamageGlow" );cgi_R_RegisterShader( "gfx/effects/solidWhite_cull" );cgi_R_RegisterShader( "gfx/effects/forcePush" );cgi_R_RegisterShader( "gfx/effects/saberFlare" );cgs.media.redSaberGlowShader = cgi_R_RegisterShader( "gfx/effects/sabers/red_glow" );cgs.media.redSaberCoreShader = cgi_R_RegisterShader( "gfx/effects/sabers/red_line" );cgs.media.orangeSaberGlowShader = cgi_R_RegisterShader( "gfx/effects/sabers/orange_glow" );cgs.media.orangeSaberCoreShader = cgi_R_RegisterShader( "gfx/effects/sabers/orange_line" );cgs.media.yellowSaberGlowShader = cgi_R_RegisterShader( "gfx/effects/sabers/yellow_glow" );cgs.media.yellowSaberCoreShader = cgi_R_RegisterShader( "gfx/effects/sabers/yellow_line" );cgs.media.greenSaberGlowShader = cgi_R_RegisterShader( "gfx/effects/sabers/green_glow" );cgs.media.greenSaberCoreShader = cgi_R_RegisterShader( "gfx/effects/sabers/green_line" );cgs.media.blueSaberGlowShader = cgi_R_RegisterShader( "gfx/effects/sabers/blue_glow" );cgs.media.blueSaberCoreShader = cgi_R_RegisterShader( "gfx/effects/sabers/blue_line" );cgs.media.purpleSaberGlowShader = cgi_R_RegisterShader( "gfx/effects/sabers/purple_glow" );cgs.media.purpleSaberCoreShader = cgi_R_RegisterShader( "gfx/effects/sabers/purple_line" );cgs.media.forceCoronaShader = cgi_R_RegisterShaderNoMip( "gfx/hud/force_swirl" );//new Jedi Academy force graphicscgs.media.drainShader = cgi_R_RegisterShader( "gfx/misc/redLine" );//for grip slamming into wallstheFxScheduler.RegisterEffect( "env/impact_dustonly" );cgi_S_RegisterSound( "sound/weapons/melee/punch1.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch2.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch3.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch4.mp3" );//For kicks with saber staff...theFxScheduler.RegisterEffect( "melee/kick_impact" );//Kothos beamcgi_R_RegisterShader( "gfx/misc/dr1" );break;cgs.effects.bryarShotEffect = theFxScheduler.RegisterEffect("bow/shot");theFxScheduler.RegisterEffect("bow/NPCshot");cgs.effects.bryarPowerupShotEffect = theFxScheduler.RegisterEffect("bow/crackleShot");cgs.effects.bryarWallImpactEffect = theFxScheduler.RegisterEffect("bow/wall_impact");cgs.effects.bryarWallImpactEffect2 = theFxScheduler.RegisterEffect("bow/wall_impact2");cgs.effects.bryarWallImpactEffect3 = theFxScheduler.RegisterEffect("bow/wall_impact3");cgs.effects.bryarFleshImpactEffect = theFxScheduler.RegisterEffect("bow/flesh_impact");break;cgs.effects.bryarShotEffect = theFxScheduler.RegisterEffect("bryar/shot");cgs.effects.bryarPowerupShotEffect = theFxScheduler.RegisterEffect("bryar/crackleShot");cgs.effects.bryarWallImpactEffect = theFxScheduler.RegisterEffect("bryar/wall_impact");cgs.effects.bryarWallImpactEffect2 = theFxScheduler.RegisterEffect("bryar/wall_impact2");cgs.effects.bryarWallImpactEffect3 = theFxScheduler.RegisterEffect("bryar/wall_impact3");cgs.effects.bryarFleshImpactEffect = theFxScheduler.RegisterEffect("bryar/flesh_impact");break;cgs.effects.bryarShotEffect = theFxScheduler.RegisterEffect( "howler/shot" );theFxScheduler.RegisterEffect( "howler/NPCshot" );cgs.effects.bryarPowerupShotEffect = theFxScheduler.RegisterEffect( "howler/crackleShot" );cgs.effects.bryarWallImpactEffect = theFxScheduler.RegisterEffect( "howler/wall_impact" );cgs.effects.bryarWallImpactEffect2 = theFxScheduler.RegisterEffect( "howler/wall_impact2" );cgs.effects.bryarWallImpactEffect3 = theFxScheduler.RegisterEffect( "howler/wall_impact3" );cgs.effects.bryarFleshImpactEffect = theFxScheduler.RegisterEffect( "howler/flesh_impact" );// Note....these are temp shared effectstheFxScheduler.RegisterEffect( "blaster/deflect" );theFxScheduler.RegisterEffect( "blaster/smoke_bolton" ); // note: this will be called game sidebreak;case WP_BLASTER:cgs.effects.blasterShotEffect = theFxScheduler.RegisterEffect( "blaster/shot" );theFxScheduler.RegisterEffect( "blaster/NPCshot" );// cgs.effects.blasterOverchargeEffect = theFxScheduler.RegisterEffect( "blaster/overcharge" );cgs.effects.blasterWallImpactEffect = theFxScheduler.RegisterEffect( "blaster/wall_impact" );cgs.effects.blasterFleshImpactEffect = theFxScheduler.RegisterEffect( "blaster/flesh_impact" );theFxScheduler.RegisterEffect( "blaster/deflect" );theFxScheduler.RegisterEffect( "blaster/smoke_bolton" ); // note: this will be called game sidebreak;case WP_DISRUPTOR:theFxScheduler.RegisterEffect( "disruptor/wall_impact" );theFxScheduler.RegisterEffect( "disruptor/flesh_impact" );theFxScheduler.RegisterEffect( "disruptor/alt_miss" );theFxScheduler.RegisterEffect( "disruptor/alt_hit" );theFxScheduler.RegisterEffect( "disruptor/line_cap" );theFxScheduler.RegisterEffect( "disruptor/death_smoke" );cgi_R_RegisterShader( "gfx/effects/redLine" );cgi_R_RegisterShader( "gfx/misc/whiteline2" );cgi_R_RegisterShader( "gfx/effects/smokeTrail" );cgi_R_RegisterShader( "gfx/effects/burn" );cgi_R_RegisterShaderNoMip( "gfx/2d/crop_charge" );// zoom soundscgi_S_RegisterSound( "sound/weapons/disruptor/zoomstart.wav" );cgi_S_RegisterSound( "sound/weapons/disruptor/zoomend.wav" );cgs.media.disruptorZoomLoop = cgi_S_RegisterSound( "sound/weapons/disruptor/zoomloop.wav" );// Disruptor gun zoom interfacecgs.media.disruptorMask = cgi_R_RegisterShader( "gfx/2d/cropCircle2");cgs.media.disruptorInsert = cgi_R_RegisterShader( "gfx/2d/cropCircle");cgs.media.disruptorLight = cgi_R_RegisterShader( "gfx/2d/cropCircleGlow" );cgs.media.disruptorInsertTick = cgi_R_RegisterShader( "gfx/2d/insertTick" );break;case WP_BOWCASTER:cgs.effects.bowcasterShotEffect = theFxScheduler.RegisterEffect( "bowcaster/shot" );cgs.effects.bowcasterBounceEffect = theFxScheduler.RegisterEffect( "bowcaster/bounce_wall" );cgs.effects.bowcasterImpactEffect = theFxScheduler.RegisterEffect( "bowcaster/explosion" );theFxScheduler.RegisterEffect( "bowcaster/deflect" );break;case WP_REPEATER:theFxScheduler.RegisterEffect( "repeater/muzzle_smoke" );theFxScheduler.RegisterEffect( "repeater/projectile" );theFxScheduler.RegisterEffect( "repeater/alt_projectile" );theFxScheduler.RegisterEffect( "repeater/wall_impact" );// theFxScheduler.RegisterEffect( "repeater/alt_wall_impact2" );// theFxScheduler.RegisterEffect( "repeater/flesh_impact" );theFxScheduler.RegisterEffect( "repeater/concussion" );break;case WP_DEMP2:theFxScheduler.RegisterEffect( "demp2/projectile" );theFxScheduler.RegisterEffect( "demp2/wall_impact" );theFxScheduler.RegisterEffect( "demp2/flesh_impact" );theFxScheduler.RegisterEffect( "demp2/altDetonate" );cgi_R_RegisterModel( "models/items/sphere.md3" );cgi_R_RegisterShader( "gfx/effects/demp2shell" );break;case WP_ATST_MAIN:theFxScheduler.RegisterEffect( "atst/shot" );theFxScheduler.RegisterEffect( "atst/wall_impact" );theFxScheduler.RegisterEffect( "atst/flesh_impact" );theFxScheduler.RegisterEffect( "atst/droid_impact" );break;case WP_ATST_SIDE:// For the ALT firetheFxScheduler.RegisterEffect( "atst/side_alt_shot" );theFxScheduler.RegisterEffect( "atst/side_alt_explosion" );// For the regular firetheFxScheduler.RegisterEffect( "atst/side_main_shot" );theFxScheduler.RegisterEffect( "atst/side_main_impact" );break;case WP_FLECHETTE:cgs.effects.flechetteShotEffect = theFxScheduler.RegisterEffect( "flechette/shot" );cgs.effects.flechetteAltShotEffect = theFxScheduler.RegisterEffect( "flechette/alt_shot" );cgs.effects.flechetteShotDeathEffect = theFxScheduler.RegisterEffect( "flechette/wall_impact" ); // shot deathcgs.effects.flechetteFleshImpactEffect = theFxScheduler.RegisterEffect( "flechette/flesh_impact" );cgs.effects.flechetteRicochetEffect = theFxScheduler.RegisterEffect( "flechette/ricochet" );// theFxScheduler.RegisterEffect( "flechette/explosion" );theFxScheduler.RegisterEffect( "flechette/alt_blow" );break;case WP_ROCKET_LAUNCHER:theFxScheduler.RegisterEffect( "rocket/shot" );theFxScheduler.RegisterEffect( "rocket/explosion" );cgi_R_RegisterShaderNoMip( "gfx/2d/wedge" );cgi_R_RegisterShaderNoMip( "gfx/2d/lock" );cgi_S_RegisterSound( "sound/weapons/rocket/lock.wav" );cgi_S_RegisterSound( "sound/weapons/rocket/tick.wav" );break;case WP_CONCUSSION://PrimarytheFxScheduler.RegisterEffect( "concussion/shot" );theFxScheduler.RegisterEffect( "concussion/explosion" );//AlttheFxScheduler.RegisterEffect( "concussion/alt_miss" );theFxScheduler.RegisterEffect( "concussion/alt_hit" );theFxScheduler.RegisterEffect( "concussion/alt_ring" );//not used (eventually)?cgi_R_RegisterShader( "gfx/effects/blueLine" );cgi_R_RegisterShader( "gfx/misc/whiteline2" );break;case WP_THERMAL:cgs.media.grenadeBounce1 = cgi_S_RegisterSound( "sound/weapons/thermal/bounce1.wav" );cgs.media.grenadeBounce2 = cgi_S_RegisterSound( "sound/weapons/thermal/bounce2.wav" );cgi_S_RegisterSound( "sound/weapons/thermal/thermloop.wav" );cgi_S_RegisterSound( "sound/weapons/thermal/warning.wav" );theFxScheduler.RegisterEffect( "thermal/explosion" );theFxScheduler.RegisterEffect( "thermal/shockwave" );break;case WP_TRIP_MINE:theFxScheduler.RegisterEffect( "tripMine/explosion" );theFxScheduler.RegisterEffect( "tripMine/laser" );theFxScheduler.RegisterEffect( "tripMine/laserImpactGlow" );theFxScheduler.RegisterEffect( "tripMine/glowBit" );cgs.media.tripMineStickSound = cgi_S_RegisterSound( "sound/weapons/laser_trap/stick.wav" );cgi_S_RegisterSound( "sound/weapons/laser_trap/warning.wav" );cgi_S_RegisterSound( "sound/weapons/laser_trap/hum_loop.wav" );break;case WP_DET_PACK:theFxScheduler.RegisterEffect( "detpack/explosion.efx" );cgs.media.detPackStickSound = cgi_S_RegisterSound( "sound/weapons/detpack/stick.wav" );cgi_R_RegisterModel( "models/weapons2/detpack/detpack.md3" );cgi_S_RegisterSound( "sound/weapons/detpack/warning.wav" );cgi_S_RegisterSound( "sound/weapons/explosions/explode5.wav" );break;case WP_EMPLACED_GUN:theFxScheduler.RegisterEffect( "emplaced/shot" );theFxScheduler.RegisterEffect( "emplaced/shotNPC" );theFxScheduler.RegisterEffect( "emplaced/wall_impact" );//E-Web, too, can't tell here which one you wanted, so...theFxScheduler.RegisterEffect( "eweb/shot" );theFxScheduler.RegisterEffect( "eweb/shotNPC" );theFxScheduler.RegisterEffect( "eweb/wall_impact" );theFxScheduler.RegisterEffect( "eweb/flesh_impact" );cgi_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_dmg" );cgi_R_RegisterShader( "models/map_objects/imp_mine/turret_chair_on" );cgs.media.emplacedHealthBarShader = cgi_R_RegisterShaderNoMip( "gfx/hud/health_frame" );cgs.media.turretComputerOverlayShader = cgi_R_RegisterShaderNoMip( "gfx/hud/generic_target" );cgs.media.turretCrossHairShader = cgi_R_RegisterShaderNoMip( "gfx/2d/panel_crosshair" );break;case WP_MELEE:case WP_TUSKEN_STAFF://TEMPtheFxScheduler.RegisterEffect( "melee/punch_impact" );theFxScheduler.RegisterEffect( "melee/kick_impact" );cgi_S_RegisterSound( "sound/weapons/melee/punch1.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch2.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch3.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch4.mp3" );break;case WP_STUN_BATON:cgi_R_RegisterShader( "gfx/effects/stunPass" );theFxScheduler.RegisterEffect( "stunBaton/flesh_impact" );//TEMPcgi_S_RegisterSound( "sound/weapons/melee/punch1.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch2.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch3.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch4.mp3" );cgi_S_RegisterSound( "sound/weapons/baton/fire" );break;case WP_TURRET:theFxScheduler.RegisterEffect( "turret/shot" );theFxScheduler.RegisterEffect( "turret/wall_impact" );theFxScheduler.RegisterEffect( "turret/flesh_impact" );break;case WP_TUSKEN_RIFLE://meleetheFxScheduler.RegisterEffect( "melee/punch_impact" );cgi_S_RegisterSound( "sound/weapons/melee/punch1.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch2.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch3.mp3" );cgi_S_RegisterSound( "sound/weapons/melee/punch4.mp3" );//firetheFxScheduler.RegisterEffect( "tusken/shot" );theFxScheduler.RegisterEffect( "tusken/hit" );theFxScheduler.RegisterEffect( "tusken/hitwall" );break;case WP_SCEPTER://???break;case WP_NOGHRI_STICK://firetheFxScheduler.RegisterEffect( "noghri_stick/shot" );theFxScheduler.RegisterEffect( "noghri_stick/flesh_impact" );//explosiontheFxScheduler.RegisterEffect( "noghri_stick/gas_cloud" );//cgi_S_RegisterSound("sound/weapons/noghri/smoke.wav");break;case WP_TIE_FIGHTER:theFxScheduler.RegisterEffect( "ships/imp_blastershot" );break;}}
JediBantha Posted August 25, 2014 Author Posted August 25, 2014 @@Asgarath83I'm still shooting invisible missiles, and the explosion's FX only seems to register when it's under WP_SABER, oddly enough... @@eezstreetI don't suppose I could paste the lines of code from FX_Destruction.cpp into wp_saber.cpp? Because I feel like listing a Force power as a weapon is part of the problem.
Asgarath83 Posted August 25, 2014 Posted August 25, 2014 Mmm @@JediBantha if someone is coded on in file, is better that you add the new implementation editing the file, instead of make a New code file. yes, that's can be your problem. i tryied too other way in my stuff, and i am sure that add custom \ effects sound works only if you work on the command line of the original effect that you want to edit. you need to edit the specific sound \ efx function.:S
eezstreet Posted August 25, 2014 Posted August 25, 2014 Hi, Do you mind showing what you did ? I didn't catch that earlier
JediBantha Posted August 26, 2014 Author Posted August 26, 2014 cg_weapons.cpp: case WP_SABER: theFxScheduler.RegisterEffect( "force/destruction" ); //this doesn't work, even when listed under WP_DESTRUCTION theFxScheduler.RegisterEffect( "force/destructionexplode" ); //this works, for some reason break; case WP_DESTRUCTION: break; g_combat.cpp: case MOD_FORCE_DESTRUCTION: weapon = WP_DESTRUCTION; break; g_weapon.cpp: float weaponSpeed[WP_NUM_WEAPONS][2] = { { 0,0 },//WP_NONE, { 0,0 },//WP_SABER, // NOTE: lots of code assumes this is the first weapon (... which is crap) so be careful -Ste. { BRYAR_PISTOL_VEL,BRYAR_PISTOL_VEL },//WP_BLASTER_PISTOL, { BLASTER_VELOCITY,BLASTER_VELOCITY },//WP_BLASTER, { Q3_INFINITE,Q3_INFINITE },//WP_DISRUPTOR, { BOWCASTER_VELOCITY,BOWCASTER_VELOCITY },//WP_BOWCASTER, { REPEATER_VELOCITY,REPEATER_ALT_VELOCITY },//WP_REPEATER, { DEMP2_VELOCITY,DEMP2_ALT_RANGE },//WP_DEMP2, { FLECHETTE_VEL,FLECHETTE_MINE_VEL },//WP_FLECHETTE, { ROCKET_VELOCITY,ROCKET_ALT_VELOCITY },//WP_ROCKET_LAUNCHER, { TD_VELOCITY,TD_ALT_VELOCITY },//WP_THERMAL, { 0,0 },//WP_TRIP_MINE, { 0,0 },//WP_DET_PACK, { CONC_VELOCITY,Q3_INFINITE },//WP_CONCUSSION, { 2600,Q3_INFINITE },//WP_DESTRUCTION, { 0,0 },//WP_MELEE, // Any ol' melee attack { 0,0 },//WP_STUN_BATON, { BRYAR_PISTOL_VEL,BRYAR_PISTOL_VEL },//WP_BRYAR_PISTOL, { EMPLACED_VEL,EMPLACED_VEL },//WP_EMPLACED_GUN, { BRYAR_PISTOL_VEL,BRYAR_PISTOL_VEL },//WP_BOT_LASER, // Probe droid - Laser blast { 0,0 },//WP_TURRET, // turret guns { ATST_MAIN_VEL,ATST_MAIN_VEL },//WP_ATST_MAIN, { ATST_SIDE_MAIN_VELOCITY,ATST_SIDE_ALT_NPC_VELOCITY },//WP_ATST_SIDE, { EMPLACED_VEL,EMPLACED_VEL },//WP_TIE_FIGHTER, { EMPLACED_VEL,REPEATER_ALT_VELOCITY },//WP_RAPID_FIRE_CONC, { 0,0 },//WP_JAWA, { TUSKEN_RIFLE_VEL,TUSKEN_RIFLE_VEL },//WP_TUSKEN_RIFLE, { 0,0 },//WP_TUSKEN_STAFF, { 0,0 },//WP_SCEPTER, { 0,0 },//WP_NOGHRI_STICK, }; else if ( weapon != WP_NONE ) { switch( weapon ) { case WP_BRYAR_PISTOL: case WP_BLASTER_PISTOL: case WP_BLASTER: case WP_DISRUPTOR: case WP_BOWCASTER: case WP_ROCKET_LAUNCHER: case WP_CONCUSSION: return qtrue; break; //non-alt standard case WP_REPEATER: case WP_DEMP2: case WP_FLECHETTE: if ( !alt_fire ) { return qtrue; } break; //emplaced gun case WP_EMPLACED_GUN: return qtrue; break; //atst case WP_ATST_MAIN: case WP_ATST_SIDE: return qtrue; break; case WP_DESTRUCTION: return qtrue; break; } } return qfalse; case WP_DESTRUCTION: if (ent->count > 0) { ent->count = 0; gi.G2API_GetBoltMatrix( ent->ghoul2, ent->playerModel, ent->handLBolt, &boltMatrix, ent->s.angles, ent->s.origin, (cg.time?cg.time:level.time), NULL, ent->s.modelScale ); } else { ent->count = 1; gi.G2API_GetBoltMatrix( ent->ghoul2, ent->playerModel, ent->handRBolt, &boltMatrix, ent->s.angles, ent->s.origin, (cg.time?cg.time:level.time), NULL, ent->s.modelScale ); } gi.G2API_GiveMeVectorFromMatrix( boltMatrix, ORIGIN, org ); VectorCopy(org,muzzlePoint); break; vec3_t WP_MuzzlePoint[WP_NUM_WEAPONS] = {// Fwd, right, up. {0, 0, 0 }, // WP_NONE, {8 , 16, 0 }, // WP_SABER, {12, 6, -6 }, // WP_BLASTER_PISTOL, {12, 6, -6 }, // WP_BLASTER, {12, 6, -6 }, // WP_DISRUPTOR, {12, 2, -6 }, // WP_BOWCASTER, {12, 4.5, -6 }, // WP_REPEATER, {12, 6, -6 }, // WP_DEMP2, {12, 6, -6 }, // WP_FLECHETTE, {12, 8, -4 }, // WP_ROCKET_LAUNCHER, {12, 0, -4 }, // WP_THERMAL, {12, 0, -10 }, // WP_TRIP_MINE, {12, 0, -4 }, // WP_DET_PACK, {12, 8, -4 }, // WP_CONCUSSION, {0, 0, 0 }, // WP_DESTRUCTION, {0 , 8, 0 }, // WP_MELEE, {0, 0, 0 }, // WP_ATST_MAIN, {0, 0, 0 }, // WP_ATST_SIDE, {0 , 8, 0 }, // WP_STUN_BATON, {12, 6, -6 }, // WP_BRYAR_PISTOL, }; case WP_DESTRUCTION: ForceDestruction( ent ); break; wp_saber.cpp: static void ForceDestructionMissile( gentity_t *self ) {//a fast rocket-like projectile vec3_t start; vec3_t dir; vec3_t forward; gentity_t *traceEnt; int radius = forceDestructionRadius[self->client->ps.forcePowerLevel[FP_DESTRUCTION]]; int damage = forceDestructionDamage[self->client->ps.forcePowerLevel[FP_DESTRUCTION]]; float vel = 2600; if ( self->client->ps.forcePowersActive & (1 << FP_RAGE) ) { damage *= 2; } VectorCopy( self->client->renderInfo.handLPoint, start ); AngleVectors( self->client->ps.viewangles, dir, NULL, NULL ); WP_TraceSetStart( self, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall gentity_t *missile = CreateMissile( start, dir, vel, 10000, self ); WP_MissileTargetHint( self, muzzle, forwardVec ); missile->classname = "destruct_proj"; missile->s.weapon = WP_DESTRUCTION; missile->fxID = G_EffectIndex( "force/destruction" ); missile->mass = 10; // Make it easier to hit things VectorSet( missile->maxs, ROCKET_SIZE, ROCKET_SIZE, ROCKET_SIZE ); VectorScale( missile->maxs, -1, missile->mins ); missile->damage = damage; missile->dflags = DAMAGE_EXTRA_KNOCKBACK|DAMAGE_HEAVY_WEAP_CLASS; missile->methodOfDeath = MOD_FORCE_DESTRUCTION; missile->splashMethodOfDeath = MOD_FORCE_DESTRUCTION; missile->clipmask = MASK_SHOT | CONTENTS_LIGHTSABER; missile->splashDamage = damage; missile->splashRadius = radius; // we don't want it to ever bounce missile->bounceCount = 0; int modPowerLevel = -1; if (missile->damage || missile->splashDamage) { modPowerLevel = WP_AbsorbConversion(traceEnt, traceEnt->client->ps.forcePowerLevel[FP_ABSORB], self, FP_DESTRUCTION, self->client->ps.forcePowerLevel[FP_DESTRUCTION], 1); } if (modPowerLevel != -1) { if ( !modPowerLevel ) { damage = 0; } else if ( modPowerLevel == 1 ) { damage = floor((float)damage/4.0f); } else if ( modPowerLevel == 2 ) { damage = floor((float)damage/2.0f); } else if ( modPowerLevel == 3 ) { damage = floor((float)damage/1.0f); } else if ( modPowerLevel == 4 ) { damage = floor((float)damage/0.5f); } else if ( modPowerLevel == 5 ) { damage = floor((float)damage/0.25f); } else if ( modPowerLevel == 6 ) { damage = floor((float)damage/0.12f); } else if ( modPowerLevel == 7 ) { damage = floor((float)damage/0.06f); } else if ( modPowerLevel == 8 ) { damage = floor((float)damage/0.03f); } else if ( modPowerLevel > 8 ) { damage = floor((float)damage/0.01f); } } } void ForceDestructionShoot( gentity_t *self ) { if ( self->health <= 0 ) { return; } if ( !self->s.number && cg.zoomMode ) {//can't force lightning when zoomed in return; } ForceDestructionMissile( self ); } void ForceDestruction( gentity_t *self ) { if ( self->health <= 0 ) { return; } if ( !self->s.number && (cg.zoomMode || in_camera) ) { return; } if ( self->client->ps.leanofs ) { return; } if (self->client->ps.forcePowersActive & (1 << FP_PROTECT) ) { WP_ForcePowerStop( self, FP_PROTECT ); } if (self->client->ps.forcePowersActive & (1 << FP_ABSORB) ) { WP_ForcePowerStop( self, FP_ABSORB ); } if ( self->client->ps.forcePowerLevel[FP_DESTRUCTION] <= FORCE_LEVEL_2 && self->client->ps.forcePower < 80 || self->client->ps.forcePowerLevel[FP_DESTRUCTION] > FORCE_LEVEL_2 && self->client->ps.forcePower < 40 || !WP_ForcePowerUsable( self, FP_DESTRUCTION, 0 ) ) { return; } if ( self->client->ps.saberLockTime > level.time ) {//FIXME: can this be a way to break out? return; } if ( self->client->ps.forcePowerLevel[FP_DESTRUCTION] <= FORCE_LEVEL_2 ) { WP_ForcePowerStart( self, FP_DESTRUCTION, 80 ); NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEPUSH, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); ForceDestructionShoot( self ); G_SoundOnEnt( self, CHAN_BODY, "sound/weapons/force/forcedestruct01.wav" ); } if ( self->client->ps.forcePowerLevel[FP_DESTRUCTION] > FORCE_LEVEL_2 ) { WP_ForcePowerStart( self, FP_DESTRUCTION, 40 ); NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEPUSH, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); ForceDestructionShoot( self ); G_SoundOnEnt( self, CHAN_BODY, "sound/weapons/force/forcedestruct01.wav" ); } }
JediBantha Posted August 26, 2014 Author Posted August 26, 2014 @@eezstreetAlso, what do you put into the missile code to prevent it from doing damage to the owner?
eezstreet Posted August 26, 2014 Posted August 26, 2014 Hi, I can't check the code at the moment, however I can see that you're missing stuff from cg_weapons in regards to projectile stuff, which would explain why it wouldn't show up. I will go a bit more in depth when I'm home, just remind me as I'm constantly distracted. Asgarath83 likes this
Archangel35757 Posted August 31, 2014 Posted August 31, 2014 For modPowerLevel why not do a switch instead of using all of the "if else" statements?
JediBantha Posted September 1, 2014 Author Posted September 1, 2014 I didn't think to do it; I just copied those from lightning and went with that.
JediBantha Posted September 2, 2014 Author Posted September 2, 2014 @@eezstreetIs there something I need to change/edit in the missile portion of the code?
JediBantha Posted September 7, 2014 Author Posted September 7, 2014 @@eezstreet Is it possible to take the FX_Concussion code bits, and put them into forceDestructionMissile? I changed the weaponmodel parameter from noweap to saber_w, and the weaponmodel actually WAS the missile.
JediBantha Posted September 22, 2014 Author Posted September 22, 2014 *Looks at my last 3 post* Rosh would be so proud... @@eezstreetI went ahead and removed all the lines referencing Destruction to [NUM_WEAPONS], as well as the weapons.dat entry, so I could develop it more into an actual Force power, rather than a mock-power, if you will. Could I edit the lines in the FX_<weapon> files and somehow make them fit into wp_saber.cpp?
eezstreet Posted September 22, 2014 Posted September 22, 2014 I don't actually know how the power effects are handled - I want to say that they're all managed in cg_players.cpp but I could be wrong on that. Attaching the effect you want to a missile is going to be a bit tricky though. Maybe make a new MOD_ (MOD_FORCEDESTRUCT?) and check against it instead of the weapon.
Stoiss Posted September 22, 2014 Posted September 22, 2014 have you also added anything in cg_event.cpp ? there is some effects there is handled there to for saber clash effects and more eezstreet likes this
JediBantha Posted September 25, 2014 Author Posted September 25, 2014 I don't actually know how the power effects are handled - I want to say that they're all managed in cg_players.cpp but I could be wrong on that. Attaching the effect you want to a missile is going to be a bit tricky though. Maybe make a new MOD_ (MOD_FORCEDESTRUCT?) and check against it instead of the weapon. I've had that kind of damage mod at the start of the project if that's what you're asking. have you also added anything in cg_event.cpp ? there is some effects there is handled there to for saber clash effects and more As far as I've read, there's nothing in cg_event.cpp that references the Concussion Rifle's main fire, only it's alt-fire.
Stoiss Posted September 25, 2014 Posted September 25, 2014 but you could make a new (case) for it there if you needed the effect
JediBantha Posted September 25, 2014 Author Posted September 25, 2014 Made the event for it, and noticed no changes for the missile fx... However, when I change "missile->s.weapon" from WP_DESTRUCTION to WP_SABER, the missile itself actually used the weapon model for its visual effect, rather than it's .efx file. (Changed back to weapons)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now