Skip to content

Commit

Permalink
trueview saber mp
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveEyes committed Jun 21, 2024
1 parent fe61181 commit bb449d8
Show file tree
Hide file tree
Showing 5 changed files with 540 additions and 12 deletions.
16 changes: 8 additions & 8 deletions code/cgame/cg_players.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6801,7 +6801,7 @@ static void CG_AddSaberBlades( centity_t *cent, int renderfx, vec3_t origin, vec
================
*/
//Get the point in the leg animation and return a percentage of the current point in the anim between 0 and the total anim length (0.0f - 1.0f)
float GetSelfLegAnimPoint(void)
/* float GetSelfLegAnimPoint(void)
{
float current = 0.0f;
int end = 0;
Expand All @@ -6824,7 +6824,7 @@ float GetSelfLegAnimPoint(void)
return 0.0f;
}
} */

/*
================
Expand All @@ -6833,7 +6833,7 @@ float GetSelfLegAnimPoint(void)
================
*/
//Get the point in the torso animation and return a percentage of the current point in the anim between 0 and the total anim length (0.0f - 1.0f)
float GetSelfTorsoAnimPoint(void)
/* float GetSelfTorsoAnimPoint(void)
{
float current = 0.0f;
int end = 0;
Expand All @@ -6855,7 +6855,7 @@ float GetSelfTorsoAnimPoint(void)
}
return 0.0f;
}
} */

/*
===============
Expand All @@ -6872,8 +6872,8 @@ float GetSelfTorsoAnimPoint(void)

void SmoothTrueView(vec3_t eyeAngles)
{
float LegAnimPoint = GetSelfLegAnimPoint();
float TorsoAnimPoint = GetSelfTorsoAnimPoint();
// float LegAnimPoint = GetSelfLegAnimPoint();
// float TorsoAnimPoint = GetSelfTorsoAnimPoint();

//counter
int i;
Expand Down Expand Up @@ -7778,7 +7778,7 @@ Ghoul2 Insert Start
VectorCopy( cg.refdef.vieworg, OldeyeOrigin);

//set the player's view origin
gi.G2API_GiveMeVectorFromMatrix(eyeMatrix, ORIGIN, cg.refdef.vieworg);
gi.G2API_GiveMeVectorFromMatrix( eyeMatrix, ORIGIN, cg.refdef.vieworg );

//Find the orientation of the eye tag surface
//I based this on coordsys.h that I found at http://www.xs4all.nl/~hkuiper/cwmtx/html/coordsys_8h-source.html
Expand Down Expand Up @@ -7832,7 +7832,7 @@ Ghoul2 Insert Start
eyeAngles[YAW] -= 90;

//Do all the Eye "movement" and simplified moves here.
SmoothTrueView(eyeAngles);
SmoothTrueView( eyeAngles );

//set the player view angles
VectorCopy( eyeAngles, cg.refdefViewAngles );
Expand Down
2 changes: 1 addition & 1 deletion codemp/cgame/cg_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ static void CG_DrawAmmo( centity_t *cent,menuDef_t *menuHUD, float hudRatio )
trap->R_SetColor( colorTable[CT_YELLOW] );
if (focusItem)
{
CG_DrawProportionalString(focusItem->window.rect.x, focusItem->window.rect.y, "--", NUM_FONT_SMALL, focusItem->window.foreColor);
CG_DrawProportionalString(SCREEN_WIDTH - (SCREEN_WIDTH - focusItem->window.rect.x) * hudRatio, focusItem->window.rect.y, "--", NUM_FONT_SMALL, focusItem->window.foreColor);
}
}
else
Expand Down
Loading

0 comments on commit bb449d8

Please sign in to comment.