Esempio n. 1
0
/*
================
CG_DrawSaberStyle

If the weapon is a light saber (which needs no ammo) then draw a graphic showing
the saber style (fast, medium, strong)
================
*/
static void CG_DrawSaberStyle( centity_t *cent, menuDef_t *menuHUD)
{

	const weaponInfo_t *weaponInfo;
	itemDef_t		*focusItem;
	const char		*text;
	float			width;


	if (!cent->currentState.weapon ) // We don't have a weapon right now
	{
		return;
	}

	if ( cent->currentState.weapon != WP_SABER )
	{
		return;
	}

	// Can we find the menu?
	if (!menuHUD)
	{
		return;
	}

    weaponInfo = CG_WeaponInfo (WP_SABER, 0);

	// draw the current saber style in this window
	// TODO: cvar plz
	if(jkg_simpleHUD.integer)
	{
		text = va( "Style: %s", SaberStances[cg.predictedPlayerState.fd.saberDrawAnimLevel].saberName_simple );
	}
	else
	{
		text = va( "Stance: %s", SaberStances[cg.predictedPlayerState.fd.saberDrawAnimLevel].saberName_technical );
	}
	/*switch ( cg.predictedPlayerState.fd.saberDrawAnimLevel )
	{

	case 1: //FORCE_LEVEL_1: Fast
		text = "Style: Fast";
		break;
	case 2: //FORCE_LEVEL_2: Medium
		text = "Style: Medium";
		break;
	case 3: //FORCE_LEVEL_3: Strong
		text = "Style: Strong";
		break;
	case 4: //FORCE_LEVEL_4://Desann
		text = "Style: Desann";
		break;
	case 5: //FORCE_LEVEL_5://Tavion
		text = "Style: Tavion";
		break;
	case 6: //SS_DUAL
		text = "Style: Dual";
		break;
	case 7: //SS_STAFF
		text = "Style: Staff";
		break;
	default:	// ??? Should never happen
		text = "Style: Unknown";
		break;
	}*/

	// Now then, lets render this text ^_^

	width = (float)trap_R_Font_StrLenPixels(text, cgDC.Assets.qhSmall3Font, 1) * 0.6f;
				
	focusItem = Menu_FindItemByName(menuHUD, "infobar");
	if (focusItem)
	{
		trap_R_Font_DrawString(focusItem->window.rect.x + ((focusItem->window.rect.w/2) - (width/2)), focusItem->window.rect.y, text, colorWhite, cgDC.Assets.qhSmall3Font, -1, 0.6f);
	}

	focusItem = Menu_FindItemByName(menuHUD, "weapicon");
	if (focusItem)
	{
		trap_R_SetColor( NULL );	
		CG_DrawPic( 
			focusItem->window.rect.x, 
			focusItem->window.rect.y, 
			focusItem->window.rect.w, 
			focusItem->window.rect.h, 
			weaponInfo->hudIcon
			);			
	}
}
Esempio n. 2
0
/*
================
CG_DrawAmmo
================
*/
static void CG_DrawAmmo( centity_t	*cent,menuDef_t *menuHUD)
{
	playerState_t	*ps;
	int				ammo;
	itemDef_t		*focusItem;
	float			width;
	const char		*text;
	vec4_t			opacity;
	const weaponInfo_t *weaponInfo;

	if( cg.jkg_WHUDOpacity  < 1.0f )
	{
		MAKERGBA(opacity, 1,1,1, cg.jkg_WHUDOpacity);
	}
	else
	{
		MAKERGBA(opacity, 1,1,1, cg.jkg_HUDOpacity);
	}

	ps = &cg.snap->ps;

	// Can we find the menu?
	if (!menuHUD)
	{
		return;
	}

	if (!cent->currentState.weapon ) // We don't have a weapon right now
	{
		return;
	}

#ifndef NO_SP_STYLE_AMMO
	// Figure out whether or not we want to do the thing where we highlight the text whenever we consume ammo or change firing mode (or, change weapon)
	if (cg.lastAmmo != cg.predictedPlayerState.stats[STAT_AMMO] || cg.lastAmmoGun != cg.predictedPlayerState.weaponId)
	{
		cg.lastAmmo = cg.predictedPlayerState.stats[STAT_AMMO];
		cg.lastAmmoTime = cg.time + 200; // matches SP 1:1
		cg.lastAmmoGun = cg.predictedPlayerState.weaponId;
	}

	if(cg.lastAmmoTime > cg.time)
	{
		vec4_t colorCopy = { 0.2, 0.72, 0.86, 1 };
		Q_RGBCopy(&opacity, colorCopy);
	}
#endif
	
	weaponInfo = CG_WeaponInfo (cent->currentState.weapon, cent->currentState.weaponVariation);

	if ( GetWeaponData( cent->currentState.weapon, cent->currentState.weaponVariation )->firemodes[0].cost == 0 && GetWeaponData( cent->currentState.weapon, cent->currentState.weaponVariation )->firemodes[1].cost == 0)
	{ //just draw "infinite"
		text = "Ammo: Infinite";
	}
	else
	{
		if ( GetWeaponAmmoClip( cent->currentState.weapon, cent->currentState.weaponVariation ))
		{
			ammo = ps->stats[STAT_AMMO];
		}
		else
		{
			ammo = ps->ammo;
		}

		if ( GetWeaponAmmoClip( cent->currentState.weapon, cent->currentState.weaponVariation ))
		{
			// Display the amount of clips too
			float temp;
			temp = ceil(( float ) ps->ammo / ( float ) GetWeaponAmmoClip( cent->currentState.weapon, cent->currentState.weaponVariation ));
			text = va( "Ammo: %i (%i)", ammo, ( int ) temp );
		}
		else
		{
			text = va( "Ammo: %i", ammo );
		}	
	}

	// Now then, lets render this text ^_^

	width = (float)trap_R_Font_StrLenPixels(text, cgDC.Assets.qhSmallFont, 1) * 0.6f;
				
	focusItem = Menu_FindItemByName(menuHUD, "infobar");
	if (focusItem)
	{
		trap_R_Font_DrawString(focusItem->window.rect.x + ((focusItem->window.rect.w/2) - (width/2)), focusItem->window.rect.y, text, opacity, cgDC.Assets.qhSmall3Font, -1, 0.5f);
	}

	focusItem = Menu_FindItemByName(menuHUD, "weapicon");
	if (focusItem)
	{
		trap_R_SetColor( opacity );	
		CG_DrawPic( 
			focusItem->window.rect.x, 
			focusItem->window.rect.y, 
			focusItem->window.rect.w, 
			focusItem->window.rect.h, 
			weaponInfo->hudIcon
			);			
	}
}
void TurretClientRun(centity_t *ent)
{
	if (!ent->ghoul2)
	{
		weaponInfo_t	*weaponInfo;

		trap->G2API_InitGhoul2Model(&ent->ghoul2, CG_ConfigString( CS_MODELS+ent->currentState.modelindex ), 0, 0, 0, 0, 0);

		if (!ent->ghoul2)
		{ //bad
			return;
		}

		ent->torsoBolt = trap->G2API_AddBolt( ent->ghoul2, 0, "*flash02" );

		trap->G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); 
		trap->G2API_SetBoneAngles( ent->ghoul2, 0, "bone_gback", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); 
		trap->G2API_SetBoneAngles( ent->ghoul2, 0, "bone_barrel", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL, 100, cg.time ); 

		trap->G2API_SetBoneAnim( ent->ghoul2, 0, "model_root", 0, 11, BONE_ANIM_OVERRIDE_FREEZE, 0.8f, cg.time, 0, 0 );

		ent->turAngles[ROLL] = 0;
		ent->turAngles[PITCH] = 90;
		ent->turAngles[YAW] = 0;

		weaponInfo = CG_WeaponInfo (WP_TURRET, 0);
	}

	if (ent->currentState.fireflag == 2)
	{ //I'm about to blow
		if (ent->turAngles)
		{
			trap->G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); 
		}
		return;
	}
	else if (ent->currentState.fireflag && ent->bolt4 != ent->currentState.fireflag)
	{
		vec3_t muzzleOrg, muzzleDir;
		mdxaBone_t boltMatrix;

		trap->G2API_GetBoltMatrix(ent->ghoul2, 0, ent->torsoBolt, &boltMatrix, /*ent->lerpAngles*/vec3_origin, ent->lerpOrigin, cg.time, cgs.gameModels, ent->modelScale);
		BG_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, muzzleOrg);
		BG_GiveMeVectorFromMatrix(&boltMatrix, NEGATIVE_X, muzzleDir);

		trap->FX_PlayEffectID(cgs.effects.mTurretMuzzleFlash, muzzleOrg, muzzleDir, -1, -1, false);

		ent->bolt4 = ent->currentState.fireflag;
	}
	else if (!ent->currentState.fireflag)
	{
		ent->bolt4 = 0;
	}

	if (ent->currentState.bolt2 != ENTITYNUM_NONE)
	{ //turn toward the enemy
		centity_t *enemy = &cg_entities[ent->currentState.bolt2];

		if (enemy)
		{
			vec3_t enAng;
			vec3_t enPos;

			VectorCopy(enemy->currentState.pos.trBase, enPos);

			VectorSubtract(enPos, ent->lerpOrigin, enAng);
			VectorNormalize(enAng);
			vectoangles(enAng, enAng);
			enAng[ROLL] = 0;
			enAng[PITCH] += 90;

			CreepToPosition(enAng, ent->turAngles);
		}
	}
	else
	{
		vec3_t idleAng;
		float turnAmount;

		if (ent->turAngles[YAW] > 360)
		{
			ent->turAngles[YAW] -= 361;
		}

		if (!ent->dustTrailTime)
		{
			ent->dustTrailTime = cg.time;
		}

		turnAmount = (cg.time-ent->dustTrailTime)*0.03;

		if (turnAmount > 360)
		{
			turnAmount = 360;
		}

		idleAng[PITCH] = 90;
		idleAng[ROLL] = 0;
		idleAng[YAW] = ent->turAngles[YAW] + turnAmount;
		ent->dustTrailTime = cg.time;

		CreepToPosition(idleAng, ent->turAngles);
	}

	if (cg.time < ent->frame_minus1_refreshed)
	{
		ent->frame_minus1_refreshed = cg.time;
		return;
	}

	ent->frame_minus1_refreshed = cg.time;
	trap->G2API_SetBoneAngles( ent->ghoul2, 0, "bone_hinge", ent->turAngles, BONE_ANGLES_REPLACE, NEGATIVE_Y, NEGATIVE_Z, NEGATIVE_X, NULL, 100, cg.time ); 
}
Esempio n. 4
0
static void CG_DrawHotkeyBar ( menuDef_t *menuHUD, vec4_t opacity )
{
    itemDef_t *focusItem;
	int i;

    if (!menuHUD)
	{
	    return;
	}

	focusItem = Menu_FindItemByName(menuHUD, "frame");
	if (focusItem)
	{
		trap_R_SetColor(opacity);
		CG_DrawPic( 
			focusItem->window.rect.x, 
			focusItem->window.rect.y, 
			focusItem->window.rect.w, 
			focusItem->window.rect.h, 
			focusItem->window.background 
			);			
	}

	// Print background of the bars
	for (i=0; i<11; i++) {
		focusItem = Menu_FindItemByName(menuHUD, va("slot%i", i));
		if (focusItem)
		{
			vec4_t col = {0.11f, 0.11f, 0.11f, 1.0f};
			qhandle_t shader = cgs.media.whiteShader;	//dummy
			col[3] *= cg.jkg_HUDOpacity;
			if ( i < MAX_ACI_SLOTS && cg.playerACI[i] >= 0 && cg.playerInventory[cg.playerACI[i]].id && cg.playerInventory[cg.playerACI[i]].id->itemID )
			{
			    int weapon, variation;
				if(cg.playerInventory[cg.playerACI[i]].id->itemType == ITEM_WEAPON)
				{
					if ( BG_GetWeaponByIndex (cg.playerInventory[cg.playerACI[i]].id->varID, &weapon, &variation) )
					{
						const weaponInfo_t *weaponInfo = CG_WeaponInfo (weapon, variation);
						shader = weaponInfo->hudIcon;
						col[0] = 1.0f;
						col[1] = 1.0f;
						col[2] = 1.0f;
				        
						/*trap_R_SetColor (colorTable[CT_MDGREY]);
						trap_R_DrawStretchPic(focusItem->window.rect.x, focusItem->window.rect.y, focusItem->window.rect.w, focusItem->window.rect.h, 0, 0, 1, 1, cgs.media.whiteShader);*/
						if(i == cg.weaponSelect)
						{
							trap_R_SetColor (opacity);
							//TODO: precache me!
							trap_R_DrawStretchPic(focusItem->window.rect.x, focusItem->window.rect.y, focusItem->window.rect.w, focusItem->window.rect.h, 0, 0, 1, 1, trap_R_RegisterShaderNoMip("gfx/jkghud/aciselect"));
						}
					}
				}
				else
				{
					col[0] = 1.0f;
					col[1] = 1.0f;
					col[2] = 1.0f;
					shader = trap_R_RegisterShaderNoMip(cg.playerInventory[cg.playerACI[i]].id->itemIcon);
				}
			}
			if(shader != cgs.media.whiteShader)
			{
				trap_R_SetColor( col );
				trap_R_DrawStretchPic(focusItem->window.rect.x, focusItem->window.rect.y, focusItem->window.rect.w, focusItem->window.rect.h, 0, 0, 1, 1, shader);
			}
			//CG_DrawRect(focusItem->window.rect.x, focusItem->window.rect.y, focusItem->window.rect.w, focusItem->window.rect.h, 1, colorWhite);
		}

		focusItem = Menu_FindItemByName(menuHUD, va("slotl%i", i));
		if (focusItem)
		{
			trap_R_Font_DrawString(focusItem->window.rect.x, focusItem->window.rect.y, va("%i", i), opacity, cgDC.Assets.qhSmallFont, -1, 0.4f);
		}
	}

	focusItem = Menu_FindItemByName(menuHUD, "frame_overlay");
	if(focusItem)
	{
		trap_R_SetColor(opacity);
		CG_DrawPic( 
			focusItem->window.rect.x, 
			focusItem->window.rect.y, 
			focusItem->window.rect.w, 
			focusItem->window.rect.h, 
			focusItem->window.background 
			);	
	}
}
void JKG_DrawWeaponHolsters( centity_t *cent, refEntity_t legs, float shadowPlane )
{
    if (cent->currentState.weapon > 0  // UQ1: Issues with weapon 0???
            && !(cent->currentState.number == cg.predictedPlayerState.clientNum && !cg.renderingThirdPerson)
            && cent->currentState.number == cg.clientNum // UQ1: Enemy ones??? Best data transfer method???
            && (cent && cent->ghoul2 && cent->currentState.eType != ET_NPC))
    {
        int				HOLSTER_POINT = 0;
        int				NUM_HOLSTERS = 5; // UQ1: Extra 2 look stupid...
        int				i = 0;
        cgItemData_t	*LIGHT_ITEMS_LIST[5];
        cgItemData_t	*HEAVY_ITEMS_LIST[5];
        int				NUM_LIGHT_ITEMS = 0;
        int				NUM_HEAVY_ITEMS = 0;

#ifdef _DEBUG
        //CG_Printf("Adding holster items...\n");
#endif //_DEBUG

        for (i = 0; i < 3; i++) LIGHT_ITEMS_LIST[i] = NULL;
        for (i = 0; i < 2; i++) HEAVY_ITEMS_LIST[i] = NULL;

        // Create Light Items List...
        for (i = 0; i < MAX_ACI_SLOTS; i++)
        {
            unsigned int weap, var;

            // FIXME: How to get enemy player ACI list????
            //        Events? Even the data for just 4 holsters would be crazy...
            if (cg.playerACI[i] < 0) continue;

            if (cg.playerInventory[cg.playerACI[i]].id->weapon == cg.predictedPlayerState.weapon) continue;
            if (cg.playerInventory[cg.playerACI[i]].equipped) continue;
            if (!cg.playerInventory[cg.playerACI[i]].id) continue;

            weap = cg.playerInventory[cg.playerACI[i]].id->weapon;
            var = cg.playerInventory[cg.playerACI[i]].id->variation;

            // How did this get through equipped above???
            if (weap == cent->currentState.weapon) continue;

            // Quick and dirty choice of where to put guns based on weight...
            if (cg.playerInventory[cg.playerACI[i]].id->weight > 1) continue; // Too heavy for waist...

            // FIXME: Sort by new WEAPON_TYPE value...
            LIGHT_ITEMS_LIST[NUM_LIGHT_ITEMS] = cg.playerInventory[cg.playerACI[i]].id;
            NUM_LIGHT_ITEMS++;

            if (NUM_LIGHT_ITEMS >= 3) break; // Full...
        }

        // Create Heavy Items List...
        for (i = 0; i < MAX_ACI_SLOTS; i++)
        {
            unsigned int weap, var;

            // FIXME: How to get enemy player ACI list????
            //        Events? Even the data for just 4 holsters would be crazy...
            if (cg.playerACI[i] < 0) continue;

            if (cg.playerInventory[cg.playerACI[i]].equipped) continue;
            if (!cg.playerInventory[cg.playerACI[i]].id) continue;

            weap = cg.playerInventory[cg.playerACI[i]].id->weapon;
            var = cg.playerInventory[cg.playerACI[i]].id->variation;

            // How did this get through equipped above???
            if (weap == cent->currentState.weapon) continue;

            // Quick and dirty choice of where to put guns based on weight...
            if (cg.playerInventory[cg.playerACI[i]].id->weight <= 1) continue; // Too light for back...

            // FIXME: Sort by new WEAPON_TYPE value...
            HEAVY_ITEMS_LIST[NUM_HEAVY_ITEMS] = cg.playerInventory[cg.playerACI[i]].id;
            NUM_HEAVY_ITEMS++;

            if (NUM_HEAVY_ITEMS >= 2) break; // Full...
        }

        for(HOLSTER_POINT = 0; HOLSTER_POINT < NUM_HOLSTERS; HOLSTER_POINT++)
        {
            void			*weaponGhoul2 = NULL;
            refEntity_t		holsterRefEnt;
            int				WEAPON_NUM = 0;
            weaponInfo_t	*weapon = NULL;

            if (HOLSTER_POINT == 0 && NUM_LIGHT_ITEMS < 1) continue; // No more light items to draw...
            if (HOLSTER_POINT == 1 && NUM_LIGHT_ITEMS < 2) continue; // No more light items to draw...
            //if (HOLSTER_POINT == 2 && NUM_LIGHT_ITEMS < 3) continue; // No more light items to draw...
            if (HOLSTER_POINT == 2) continue; // Disabled...
            if (HOLSTER_POINT == 3 && NUM_HEAVY_ITEMS < 1) continue; // No more heavy items to draw...
            if (HOLSTER_POINT == 4 && NUM_HEAVY_ITEMS < 2) continue; // No more heavy items to draw...


            if (HOLSTER_POINT < 3)
            {
                if (LIGHT_ITEMS_LIST[HOLSTER_POINT])
                {   // Light Items (waist)...
                    WEAPON_NUM = LIGHT_ITEMS_LIST[HOLSTER_POINT]->weapon;

                    if (WEAPON_NUM <= 0) continue;

                    weapon = CG_WeaponInfo (WEAPON_NUM, LIGHT_ITEMS_LIST[HOLSTER_POINT]->variation);
                }
                else
                {
                    continue;
                }
            }
            else
            {
                if (HEAVY_ITEMS_LIST[HOLSTER_POINT-3])
                {   // Heavy Items (back)...
                    WEAPON_NUM = HEAVY_ITEMS_LIST[HOLSTER_POINT-3]->weapon;

                    if (WEAPON_NUM <= 0) continue;

                    weapon = CG_WeaponInfo (WEAPON_NUM, HEAVY_ITEMS_LIST[HOLSTER_POINT-3]->variation);
                }
                else
                {
                    continue;
                }
            }

            if (!weapon) continue;

            memset( &holsterRefEnt, 0, sizeof( holsterRefEnt ) );

            weaponGhoul2 = weapon->g2WorldModel;

            if (trap_G2_HaveWeGhoul2Models(weaponGhoul2))
            {
                char bone_name[MAX_QPATH];
                vec3_t	holsterAngles, end, fwd, rt, originalOrigin;

                // UQ1: Which bone are we using?
                if (HOLSTER_POINT == 0) Q_strncpyz( bone_name , "pelvis", sizeof( bone_name ) );
                if (HOLSTER_POINT == 1) Q_strncpyz( bone_name , "pelvis", sizeof( bone_name ) );
                if (HOLSTER_POINT == 2) Q_strncpyz( bone_name , "thoracic", sizeof( bone_name ) );
                if (HOLSTER_POINT == 3) Q_strncpyz( bone_name , "thoracic", sizeof( bone_name ) );
                if (HOLSTER_POINT == 4) Q_strncpyz( bone_name , "thoracic", sizeof( bone_name ) );
                //if (HOLSTER_POINT == 4) Q_strncpyz( bone_name , "ltibia", sizeof( bone_name ) ); // UQ1: These look really dumb....
                //if (HOLSTER_POINT == 5) Q_strncpyz( bone_name , "rtibia", sizeof( bone_name ) ); // UQ1: These look really dumb....

                // UQ1: Set exact org/angles for this bone...
                if (!CG_SnapRefEntToBone(cent, &holsterRefEnt, bone_name))
                {
#ifdef _DEBUG
                    CG_Printf("Holster point %i NOT drawn (snap to bone issue)...\n", HOLSTER_POINT);
                    assert(0);
#endif //

                    continue;
                }

                VectorCopy( legs.modelScale, holsterRefEnt.modelScale);
                holsterRefEnt.radius = legs.radius;

                VectorCopy(holsterRefEnt.origin, originalOrigin);
                VectorCopy(cent->lerpAngles, holsterAngles);
                holsterAngles[PITCH] = 0;
                holsterAngles[ROLL] = 0;

                AngleVectors( holsterAngles, fwd, rt, NULL );

                // UQ1: Now modify the org/angles...
                switch (HOLSTER_POINT)
                {
                case 0:
                    // "pelvis" left
                    VectorMA( originalOrigin, -2, fwd, end );
                    VectorMA( end, -6, rt, end );
                    VectorCopy(end, holsterRefEnt.origin);

                    holsterRefEnt.origin[2] += 8; // because the bones suck for placement...

                    //AxisToAngles(holsterRefEnt.axis, holsterAngles);

                    holsterAngles[PITCH] += 90;
                    //holsterAngles[YAW] -= 90;
                    holsterAngles[ROLL] += 90;

                    holsterAngles[PITCH] += 30;
                    holsterAngles[YAW] -= 50;
                    holsterAngles[ROLL] -= 50;

                    break;
                case 1:
                    // "pelvis" right
                    VectorMA( originalOrigin, -2, fwd, end );
                    VectorMA( end, 6, rt, end );
                    VectorCopy(end, holsterRefEnt.origin);

                    holsterRefEnt.origin[2] += 8; // because the bones suck for placement...

                    //AxisToAngles(holsterRefEnt.axis, holsterAngles);

                    holsterAngles[PITCH] += 90;
                    holsterAngles[YAW] += 180;
                    holsterAngles[ROLL] += 90;

                    holsterAngles[PITCH] -= 30;
                    holsterAngles[YAW] += 50;
                    holsterAngles[ROLL] += 50;

                    break;
                case 2:
                    // "thoracic" left - used for center pistol - where on the back is this meant to fit???
                    VectorMA( originalOrigin, -4, fwd, end );
                    VectorMA( end, -2, rt, end );
                    VectorCopy(end, holsterRefEnt.origin);

                    holsterRefEnt.origin[2] += 8; // because the bones suck for placement...

                    //AxisToAngles(holsterRefEnt.axis, holsterAngles);

                    holsterAngles[PITCH] += 90;
                    //holsterAngles[YAW] -= 90;
                    holsterAngles[ROLL] += 90;

                    holsterAngles[PITCH] += 10;//d_poff.value;
                    holsterAngles[YAW] += 0;//d_yoff.value;
                    holsterAngles[ROLL] += 0;//d_roff.value;

                    break;
                case 3:
                    // "thoracic" left
                    VectorMA( originalOrigin, -4, fwd, end );
                    VectorMA( end, -6, rt, end );
                    VectorCopy(end, holsterRefEnt.origin);

                    holsterRefEnt.origin[2] += 6; // because the bones suck for placement...

                    //AxisToAngles(holsterRefEnt.axis, holsterAngles);

                    holsterAngles[PITCH] += 90;
                    //holsterAngles[YAW] -= 90;
                    holsterAngles[ROLL] += 90;

                    holsterAngles[PITCH] += 10 + 25;
                    holsterAngles[YAW] += 50 + 15;
                    holsterAngles[ROLL] += 50;

                    break;
                case 4:
                    // "thoracic" right
                    VectorMA( originalOrigin, -4, fwd, end );
                    VectorMA( end, 6, rt, end );
                    VectorCopy(end, holsterRefEnt.origin);

                    holsterRefEnt.origin[2] += 6; // because the bones suck for placement...

                    //AxisToAngles(holsterRefEnt.axis, holsterAngles);

                    holsterAngles[PITCH] += 90;
                    holsterAngles[YAW] += 180;
                    holsterAngles[ROLL] += 90;

                    holsterAngles[PITCH] -= 10 + 25;
                    holsterAngles[YAW] -= 50 + 15;
                    holsterAngles[ROLL] -= 50;

                    break;
                /*case 5: // UQ1: These look really dumb....
                	// "ltibia"
                	VectorMA( originalOrigin, -4, fwd, end );
                	VectorMA( end, -4, rt, end );
                	VectorCopy(end, holsterRefEnt.origin);

                	holsterRefEnt.origin[2] += 8; // because the bones suck for placement...

                	holsterAngles[PITCH] += 90;
                	//holsterAngles[YAW] -= 90;
                	holsterAngles[ROLL] += 90;

                	holsterAngles[PITCH] -= d_poff.value;
                	holsterAngles[YAW] -= d_yoff.value;
                	holsterAngles[ROLL] -= d_roff.value;
                	break;
                case 6:  // UQ1: These look really dumb....
                	// "rtibia"
                	VectorMA( originalOrigin, -4, fwd, end );
                	VectorMA( end, 4, rt, end );
                	VectorCopy(end, holsterRefEnt.origin);

                	holsterRefEnt.origin[2] += 8; // because the bones suck for placement...

                	holsterAngles[PITCH] += 90;
                	holsterAngles[YAW] += 180;
                	holsterAngles[ROLL] += 90;

                	holsterAngles[PITCH] += d_poff.value;
                	holsterAngles[YAW] += d_yoff.value;
                	holsterAngles[ROLL] += d_roff.value;
                	break;*/
                default:
                    continue; // should never see this...
                    break;
                }

                holsterRefEnt.reType = RT_MODEL;
                holsterRefEnt.hModel = 0;
                holsterRefEnt.ghoul2 = weaponGhoul2;
                AnglesToAxis(holsterAngles, holsterRefEnt.axis);

                holsterRefEnt.shadowPlane = shadowPlane;

                CG_AddWeaponWithPowerups( &holsterRefEnt, cent->currentState.powerups );
#ifdef _DEBUG
                //CG_Printf("Holster point %i drawn at %f %f %f (P.ORG %f %f %f)...\n", HOLSTER_POINT, holsterRefEnt.origin[0], holsterRefEnt.origin[1], holsterRefEnt.origin[2], cent->lerpOrigin[0], cent->lerpOrigin[1], cent->lerpOrigin[2]);
#endif //_DEBUG
            }
#ifdef _DEBUG
            else
            {
                //CG_Printf("Holster point %i NOT drawn...\n", HOLSTER_POINT);
                //assert(0);
            }
#endif //_DEBUG
        }
    }
}