void UI_SaberDrawBlade( itemDef_t *item, char *saberName, int saberModel, saberType_t saberType, vec3_t origin, vec3_t angles, int bladeNum ) { char bladeColorString[MAX_QPATH]; saber_colors_t bladeColor; float bladeLength,bladeRadius; vec3_t bladeOrigin={0}; vec3_t axis[3]={0}; // vec3_t angles={0}; mdxaBone_t boltMatrix; qboolean tagHack = qfalse; char *tagName; int bolt; float scale; //[RGBSabers] int snum; //[/RGBSabers] if ( (item->flags&ITF_ISSABER) && saberModel < 2 ) { //[RGBSabers] snum = 0; trap_Cvar_VariableStringBuffer("ui_saber_color", bladeColorString, sizeof(bladeColorString) ); } else//if ( item->flags&ITF_ISSABER2 ) - presumed { snum = 1; //[/RGBSabers] trap_Cvar_VariableStringBuffer("ui_saber2_color", bladeColorString, sizeof(bladeColorString) ); } if ( !trap_G2API_HasGhoul2ModelOnIndex(&(item->ghoul2),saberModel) ) {//invalid index! return; } bladeColor = TranslateSaberColor( bladeColorString ); bladeLength = UI_SaberBladeLengthForSaber( saberName, bladeNum ); bladeRadius = UI_SaberBladeRadiusForSaber( saberName, bladeNum ); tagName = va( "*blade%d", bladeNum+1 ); bolt = trap_G2API_AddBolt( item->ghoul2,saberModel, tagName ); if ( bolt == -1 ) { tagHack = qtrue; //hmm, just fall back to the most basic tag (this will also make it work with pre-JKA saber models bolt = trap_G2API_AddBolt( item->ghoul2,saberModel, "*flash" ); if ( bolt == -1 ) {//no tag_flash either?!! bolt = 0; } } // angles[PITCH] = curYaw; // angles[ROLL] = 0; trap_G2API_GetBoltMatrix( item->ghoul2, saberModel, bolt, &boltMatrix, angles, origin, uiInfo.uiDC.realTime, NULL, vec3_origin );//NULL was cgs.model_draw // work the matrix axis stuff into the original axis and origins used. BG_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, bladeOrigin); BG_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_Y, axis[0]);//front (was NEGATIVE_Y, but the md3->glm exporter screws up this tag somethin' awful) // ...changed this back to NEGATIVE_Y BG_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_X, axis[1]);//right ... and changed this to NEGATIVE_X BG_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_Z, axis[2]);//up // Where do I get scale from? // scale = DC->xscale; scale = 1.0f; if ( tagHack ) { switch ( saberType ) { case SABER_SINGLE: VectorMA( bladeOrigin, scale, axis[0], bladeOrigin ); break; case SABER_DAGGER: case SABER_LANCE: break; case SABER_STAFF: if ( bladeNum == 0 ) { VectorMA( bladeOrigin, 12*scale, axis[0], bladeOrigin ); } if ( bladeNum == 1 ) { VectorScale( axis[0], -1, axis[0] ); VectorMA( bladeOrigin, 12*scale, axis[0], bladeOrigin ); } break; case SABER_BROAD: if ( bladeNum == 0 ) { VectorMA( bladeOrigin, -1*scale, axis[1], bladeOrigin ); } else if ( bladeNum == 1 ) { VectorMA( bladeOrigin, 1*scale, axis[1], bladeOrigin ); } break; case SABER_PRONG: if ( bladeNum == 0 ) { VectorMA( bladeOrigin, -3*scale, axis[1], bladeOrigin ); } else if ( bladeNum == 1 ) { VectorMA( bladeOrigin, 3*scale, axis[1], bladeOrigin ); } break; case SABER_ARC: VectorSubtract( axis[1], axis[2], axis[1] ); VectorNormalize( axis[1] ); switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); VectorScale( axis[0], 0.75f, axis[0] ); VectorScale( axis[1], 0.25f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; case 1: VectorScale( axis[0], 0.25f, axis[0] ); VectorScale( axis[1], 0.75f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; case 2: VectorMA( bladeOrigin, -8*scale, axis[0], bladeOrigin ); VectorScale( axis[0], -0.25f, axis[0] ); VectorScale( axis[1], 0.75f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; case 3: VectorMA( bladeOrigin, -16*scale, axis[0], bladeOrigin ); VectorScale( axis[0], -0.75f, axis[0] ); VectorScale( axis[1], 0.25f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; } break; case SABER_SAI: if ( bladeNum == 1 ) { VectorMA( bladeOrigin, -3*scale, axis[1], bladeOrigin ); } else if ( bladeNum == 2 ) { VectorMA( bladeOrigin, 3*scale, axis[1], bladeOrigin ); } break; case SABER_CLAW: switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 2*scale, axis[0], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[2], bladeOrigin ); break; case 1: VectorMA( bladeOrigin, 2*scale, axis[0], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[2], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[1], bladeOrigin ); break; case 2: VectorMA( bladeOrigin, 2*scale, axis[0], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[2], bladeOrigin ); VectorMA( bladeOrigin, -2*scale, axis[1], bladeOrigin ); break; } break; case SABER_STAR: switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 1: VectorScale( axis[0], 0.33f, axis[0] ); VectorScale( axis[2], 0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 2: VectorScale( axis[0], -0.33f, axis[0] ); VectorScale( axis[2], 0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 3: VectorScale( axis[0], -1, axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 4: VectorScale( axis[0], -0.33f, axis[0] ); VectorScale( axis[2], -0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 5: VectorScale( axis[0], 0.33f, axis[0] ); VectorScale( axis[2], -0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; } break; case SABER_TRIDENT: switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 24*scale, axis[0], bladeOrigin ); break; case 1: VectorMA( bladeOrigin, -6*scale, axis[1], bladeOrigin ); VectorMA( bladeOrigin, 24*scale, axis[0], bladeOrigin ); break; case 2: VectorMA( bladeOrigin, 6*scale, axis[1], bladeOrigin ); VectorMA( bladeOrigin, 24*scale, axis[0], bladeOrigin ); break; case 3: VectorMA( bladeOrigin, -32*scale, axis[0], bladeOrigin ); VectorScale( axis[0], -1, axis[0] ); break; } break; case SABER_SITH_SWORD: //no blade break; } } if ( saberType == SABER_SITH_SWORD ) {//draw no blade return; } //[RGBSabers] UI_DoSaber( bladeOrigin, axis[0], bladeLength, bladeLength, bladeRadius, bladeColor, snum ); //[/RGBSabers] }
void UI_SaberDrawBlade( itemDef_t *item, char *saberName, int saberModel, saberType_t saberType, vec3_t origin, float curYaw, int bladeNum ) { char bladeColorString[MAX_QPATH]; vec3_t angles={0}; if ( item->flags&(ITF_ISANYSABER) && item->flags&(ITF_ISCHARACTER) ) { //it's bolted to a dude! angles[YAW] = curYaw; } else { angles[PITCH] = curYaw; angles[ROLL] = 90; } if ( saberModel >= item->ghoul2.size() ) {//uhh... invalid index! return; } if ( (item->flags&ITF_ISSABER) && saberModel < 2 ) { DC->getCVarString( "ui_saber_color", bladeColorString, sizeof(bladeColorString) ); } else//if ( item->flags&ITF_ISSABER2 ) - presumed { DC->getCVarString( "ui_saber2_color", bladeColorString, sizeof(bladeColorString) ); } saber_colors_t bladeColor = TranslateSaberColor( bladeColorString ); float bladeLength = UI_SaberBladeLengthForSaber( saberName, bladeNum ); float bladeRadius = UI_SaberBladeRadiusForSaber( saberName, bladeNum ); vec3_t bladeOrigin={0}; vec3_t axis[3]={0}; mdxaBone_t boltMatrix; qboolean tagHack = qfalse; char *tagName = va( "*blade%d", bladeNum+1 ); int bolt = DC->g2_AddBolt( &item->ghoul2[saberModel], tagName ); if ( bolt == -1 ) { tagHack = qtrue; //hmm, just fall back to the most basic tag (this will also make it work with pre-JKA saber models bolt = DC->g2_AddBolt( &item->ghoul2[saberModel], "*flash" ); if ( bolt == -1 ) {//no tag_flash either?!! bolt = 0; } } DC->g2_GetBoltMatrix( item->ghoul2, saberModel, bolt, &boltMatrix, angles, origin, uiInfo.uiDC.realTime, NULL, vec3_origin );//NULL was cgs.model_draw // work the matrix axis stuff into the original axis and origins used. DC->g2_GiveMeVectorFromMatrix(boltMatrix, ORIGIN, bladeOrigin); DC->g2_GiveMeVectorFromMatrix(boltMatrix, NEGATIVE_X, axis[0]);//front (was NEGATIVE_Y, but the md3->glm exporter screws up this tag somethin' awful) DC->g2_GiveMeVectorFromMatrix(boltMatrix, NEGATIVE_Y, axis[1]);//right DC->g2_GiveMeVectorFromMatrix(boltMatrix, POSITIVE_Z, axis[2]);//up float scale = DC->xscale; if ( tagHack ) { switch ( saberType ) { case SABER_SINGLE: case SABER_DAGGER: case SABER_LANCE: break; case SABER_STAFF: if ( bladeNum == 1 ) { VectorScale( axis[0], -1, axis[0] ); VectorMA( bladeOrigin, 16*scale, axis[0], bladeOrigin ); } break; case SABER_BROAD: if ( bladeNum == 0 ) { VectorMA( bladeOrigin, -1*scale, axis[1], bladeOrigin ); } else if ( bladeNum == 1 ) { VectorMA( bladeOrigin, 1*scale, axis[1], bladeOrigin ); } break; case SABER_PRONG: if ( bladeNum == 0 ) { VectorMA( bladeOrigin, -3*scale, axis[1], bladeOrigin ); } else if ( bladeNum == 1 ) { VectorMA( bladeOrigin, 3*scale, axis[1], bladeOrigin ); } break; case SABER_ARC: VectorSubtract( axis[1], axis[2], axis[1] ); VectorNormalize( axis[1] ); switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); VectorScale( axis[0], 0.75f, axis[0] ); VectorScale( axis[1], 0.25f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; case 1: VectorScale( axis[0], 0.25f, axis[0] ); VectorScale( axis[1], 0.75f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; case 2: VectorMA( bladeOrigin, -8*scale, axis[0], bladeOrigin ); VectorScale( axis[0], -0.25f, axis[0] ); VectorScale( axis[1], 0.75f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; case 3: VectorMA( bladeOrigin, -16*scale, axis[0], bladeOrigin ); VectorScale( axis[0], -0.75f, axis[0] ); VectorScale( axis[1], 0.25f, axis[1] ); VectorAdd( axis[0], axis[1], axis[0] ); break; } break; case SABER_SAI: if ( bladeNum == 1 ) { VectorMA( bladeOrigin, -3*scale, axis[1], bladeOrigin ); } else if ( bladeNum == 2 ) { VectorMA( bladeOrigin, 3*scale, axis[1], bladeOrigin ); } break; case SABER_CLAW: switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 2*scale, axis[0], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[2], bladeOrigin ); break; case 1: VectorMA( bladeOrigin, 2*scale, axis[0], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[2], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[1], bladeOrigin ); break; case 2: VectorMA( bladeOrigin, 2*scale, axis[0], bladeOrigin ); VectorMA( bladeOrigin, 2*scale, axis[2], bladeOrigin ); VectorMA( bladeOrigin, -2*scale, axis[1], bladeOrigin ); break; } break; case SABER_STAR: switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 1: VectorScale( axis[0], 0.33f, axis[0] ); VectorScale( axis[2], 0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 2: VectorScale( axis[0], -0.33f, axis[0] ); VectorScale( axis[2], 0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 3: VectorScale( axis[0], -1, axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 4: VectorScale( axis[0], -0.33f, axis[0] ); VectorScale( axis[2], -0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; case 5: VectorScale( axis[0], 0.33f, axis[0] ); VectorScale( axis[2], -0.67f, axis[2] ); VectorAdd( axis[0], axis[2], axis[0] ); VectorMA( bladeOrigin, 8*scale, axis[0], bladeOrigin ); break; } break; case SABER_TRIDENT: switch ( bladeNum ) { case 0: VectorMA( bladeOrigin, 24*scale, axis[0], bladeOrigin ); break; case 1: VectorMA( bladeOrigin, -6*scale, axis[1], bladeOrigin ); VectorMA( bladeOrigin, 24*scale, axis[0], bladeOrigin ); break; case 2: VectorMA( bladeOrigin, 6*scale, axis[1], bladeOrigin ); VectorMA( bladeOrigin, 24*scale, axis[0], bladeOrigin ); break; case 3: VectorMA( bladeOrigin, -32*scale, axis[0], bladeOrigin ); VectorScale( axis[0], -1, axis[0] ); break; } break; case SABER_SITH_SWORD: //no blade break; } } if ( saberType == SABER_SITH_SWORD ) {//draw no blade return; } UI_DoSaber( bladeOrigin, axis[0], bladeLength, bladeLength, bladeRadius, bladeColor ); }
void UI_SaberDrawBlade( itemDef_t *item, char *saberName, int saberModel, saberType_t saberType, vector3 *origin, vector3 *angles, int bladeNum ) { vector3 org_, end, axis_[3] = { { 0.0f } }; // shut the compiler up mdxaBone_t boltMatrix; effectTrailArgStruct_t fx; saber_colors_t bladeColor; float bladeLength, bladeRadius; char bladeColorString[MAX_QPATH]; int snum; const char *tagName; int bolt; qboolean tagHack = qfalse; int styleToUse = atoi( UI_Cvar_VariableString( "cg_saberBladeStyle" ) ); if ( (item->flags&ITF_ISSABER) && saberModel < 2 ) { snum = 0; trap->Cvar_VariableStringBuffer( "ui_saber_color", bladeColorString, sizeof(bladeColorString) ); } else//if ( item->flags&ITF_ISSABER2 ) - presumed { snum = 1; trap->Cvar_VariableStringBuffer( "ui_saber2_color", bladeColorString, sizeof(bladeColorString) ); } if ( !trap->G2API_HasGhoul2ModelOnIndex( &(item->ghoul2), saberModel ) ) {//invalid index! return; } bladeColor = TranslateSaberColor( bladeColorString ); bladeLength = UI_SaberBladeLengthForSaber( saberName, bladeNum ); bladeRadius = UI_SaberBladeRadiusForSaber( saberName, bladeNum ); tagName = va( "*blade%d", bladeNum + 1 ); bolt = trap->G2API_AddBolt( item->ghoul2, saberModel, tagName ); if ( bolt == -1 ) { tagHack = qtrue; //hmm, just fall back to the most basic tag (this will also make it work with pre-JKA saber models bolt = trap->G2API_AddBolt( item->ghoul2, saberModel, "*flash" ); if ( bolt == -1 ) {//no tag_flash either?!! bolt = 0; } } // angles.pitch = curYaw; // angles.roll = 0; trap->G2API_GetBoltMatrix( item->ghoul2, saberModel, bolt, &boltMatrix, angles, origin, uiInfo.uiDC.realTime, NULL, &vec3_origin );//NULL was cgs.model_draw // work the matrix axis stuff into the original axis and origins used. BG_GiveMeVectorFromMatrix( &boltMatrix, ORIGIN, &org_ ); BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_Y, &axis_[0] );//front (was NEGATIVE_Y, but the md3->glm exporter screws up this tag somethin' awful) // ...changed this back to NEGATIVE_Y BG_GiveMeVectorFromMatrix( &boltMatrix, NEGATIVE_X, &axis_[1] );//right ... and changed this to NEGATIVE_X BG_GiveMeVectorFromMatrix( &boltMatrix, POSITIVE_Z, &axis_[2] );//up VectorMA( &org_, bladeLength, &axis_[0], &end ); VectorAdd( &end, &axis_[0], &end ); if ( tagHack ) { switch ( saberType ) { default: case SABER_SINGLE: VectorMA( &org_, 1.0f, &axis_[0], &org_ ); break; case SABER_DAGGER: case SABER_LANCE: break; case SABER_STAFF: if ( bladeNum == 0 ) VectorMA( &org_, 12 * 1.0f, &axis_[0], &org_ ); if ( bladeNum == 1 ) { VectorScale( &axis_[0], -1, &axis_[0] ); VectorMA( &org_, 12 * 1.0f, &axis_[0], &org_ ); } break; case SABER_BROAD: if ( bladeNum == 0 ) VectorMA( &org_, -1 * 1.0f, &axis_[1], &org_ ); else if ( bladeNum == 1 ) VectorMA( &org_, 1 * 1.0f, &axis_[1], &org_ ); break; case SABER_PRONG: if ( bladeNum == 0 ) VectorMA( &org_, -3 * 1.0f, &axis_[1], &org_ ); else if ( bladeNum == 1 ) VectorMA( &org_, 3 * 1.0f, &axis_[1], &org_ ); break; case SABER_ARC: VectorSubtract( &axis_[1], &axis_[2], &axis_[1] ); VectorNormalize( &axis_[1] ); switch ( bladeNum ) { case 0: VectorMA( &org_, 8 * 1.0f, &axis_[0], &org_ ); VectorScale( &axis_[0], 0.75f, &axis_[0] ); VectorScale( &axis_[1], 0.25f, &axis_[1] ); VectorAdd( &axis_[0], &axis_[1], &axis_[0] ); break; case 1: VectorScale( &axis_[0], 0.25f, &axis_[0] ); VectorScale( &axis_[1], 0.75f, &axis_[1] ); VectorAdd( &axis_[0], &axis_[1], &axis_[0] ); break; case 2: VectorMA( &org_, -8 * 1.0f, &axis_[0], &org_ ); VectorScale( &axis_[0], -0.25f, &axis_[0] ); VectorScale( &axis_[1], 0.75f, &axis_[1] ); VectorAdd( &axis_[0], &axis_[1], &axis_[0] ); break; case 3: VectorMA( &org_, -16 * 1.0f, &axis_[0], &org_ ); VectorScale( &axis_[0], -0.75f, &axis_[0] ); VectorScale( &axis_[1], 0.25f, &axis_[1] ); VectorAdd( &axis_[0], &axis_[1], &axis_[0] ); break; default: break; } break; case SABER_SAI: if ( bladeNum == 1 ) VectorMA( &org_, -3 * 1.0f, &axis_[1], &org_ ); else if ( bladeNum == 2 ) VectorMA( &org_, 3 * 1.0f, &axis_[1], &org_ ); break; case SABER_CLAW: switch ( bladeNum ) { case 0: VectorMA( &org_, 2 * 1.0f, &axis_[0], &org_ ); VectorMA( &org_, 2 * 1.0f, &axis_[2], &org_ ); break; case 1: VectorMA( &org_, 2 * 1.0f, &axis_[0], &org_ ); VectorMA( &org_, 2 * 1.0f, &axis_[2], &org_ ); VectorMA( &org_, 2 * 1.0f, &axis_[1], &org_ ); break; case 2: VectorMA( &org_, 2 * 1.0f, &axis_[0], &org_ ); VectorMA( &org_, 2 * 1.0f, &axis_[2], &org_ ); VectorMA( &org_, -2 * 1.0f, &axis_[1], &org_ ); break; default: break; } break; case SABER_STAR: switch ( bladeNum ) { case 0: VectorMA( &org_, 8 * 1.0f, &axis_[0], &org_ ); break; case 1: VectorScale( &axis_[0], 0.33f, &axis_[0] ); VectorScale( &axis_[2], 0.67f, &axis_[2] ); VectorAdd( &axis_[0], &axis_[2], &axis_[0] ); VectorMA( &org_, 8 * 1.0f, &axis_[0], &org_ ); break; case 2: VectorScale( &axis_[0], -0.33f, &axis_[0] ); VectorScale( &axis_[2], 0.67f, &axis_[2] ); VectorAdd( &axis_[0], &axis_[2], &axis_[0] ); VectorMA( &org_, 8 * 1.0f, &axis_[0], &org_ ); break; case 3: VectorScale( &axis_[0], -1, &axis_[0] ); VectorMA( &org_, 8 * 1.0f, &axis_[0], &org_ ); break; case 4: VectorScale( &axis_[0], -0.33f, &axis_[0] ); VectorScale( &axis_[2], -0.67f, &axis_[2] ); VectorAdd( &axis_[0], &axis_[2], &axis_[0] ); VectorMA( &org_, 8 * 1.0f, &axis_[0], &org_ ); break; case 5: VectorScale( &axis_[0], 0.33f, &axis_[0] ); VectorScale( &axis_[2], -0.67f, &axis_[2] ); VectorAdd( &axis_[0], &axis_[2], &axis_[0] ); VectorMA( &org_, 8 * 1.0f, &axis_[0], &org_ ); break; default: break; } break; case SABER_TRIDENT: switch ( bladeNum ) { case 0: VectorMA( &org_, 24 * 1.0f, &axis_[0], &org_ ); break; case 1: VectorMA( &org_, -6 * 1.0f, &axis_[1], &org_ ); VectorMA( &org_, 24 * 1.0f, &axis_[0], &org_ ); break; case 2: VectorMA( &org_, 6 * 1.0f, &axis_[1], &org_ ); VectorMA( &org_, 24 * 1.0f, &axis_[0], &org_ ); break; case 3: VectorMA( &org_, -32 * 1.0f, &axis_[0], &org_ ); VectorScale( &axis_[0], -1, &axis_[0] ); break; default: break; } break; case SABER_SITH_SWORD: //no blade break; } } VectorCopy( &org_, &fx.mVerts[0].origin ); VectorMA( &end, 3.0f, &axis_[0], &fx.mVerts[1].origin ); VectorCopy( &end, &fx.mVerts[2].origin ); VectorMA( &org_, 3.0f, &axis_[0], &fx.mVerts[3].origin ); //Raz: Temporarily switch to basejka sabers for flame and electric users if ( bladeColor == SABER_FLAME1 || bladeColor == SABER_ELEC1 || bladeColor == SABER_FLAME2 || bladeColor == SABER_ELEC2 || bladeColor == SABER_BLACK ) styleToUse = 0; // Pass in the renderfx flags attached to the saber weapon model...this is done so that saber glows // will get rendered properly in a mirror...not sure if this is necessary?? //CG_DoSaber( org_, axis_[0], saberLen, client->saber[saberNum].blade[bladeNum].lengthMax, client->saber[saberNum].blade[bladeNum].radius, // scolor, renderfx, (qboolean)(saberNum==0&&bladeNum==0) ); switch ( styleToUse ) { case 0: UI_DoSaber( &org_, &axis_[0], bladeLength, bladeLength, bladeRadius, bladeColor, 0, qfalse, 0, snum ); break; /* case 1: UI_DoEp1Saber( fx.mVerts[0].origin, fx.mVerts[1].origin, fx.mVerts[2].origin, fx.mVerts[3].origin, bladeLength, bladeRadius, bladeColor, 0, false, false, 0, snum ); break; case 2: UI_DoEp2Saber( fx.mVerts[0].origin, fx.mVerts[1].origin, fx.mVerts[2].origin, fx.mVerts[3].origin, bladeLength, bladeRadius, bladeColor, 0, false, false, 0, snum ); break; case 3: UI_DoEp3Saber( fx.mVerts[0].origin, fx.mVerts[1].origin, fx.mVerts[2].origin, fx.mVerts[3].origin, bladeLength, bladeRadius, bladeColor, 0, false, false, 0, snum ); break; */ default: case 1: UI_DoSFXSaber( &fx.mVerts[0].origin, &fx.mVerts[1].origin, &fx.mVerts[2].origin, &fx.mVerts[3].origin, bladeLength, bladeRadius, bladeColor, 0, qfalse, qfalse, 0, snum ); break; /* case 5: UI_DoOTSaber( fx.mVerts[0].origin, fx.mVerts[1].origin, fx.mVerts[2].origin, fx.mVerts[3].origin, bladeLength, bladeRadius, bladeColor, 0, false, false, 0, snum ); break; */ } }