new health box fits now into the hud

tweaked the fpsmax in rearview mirror
version upcount
This commit is contained in:
q3rally 2021-09-26 20:53:21 +00:00
parent 08d3297b72
commit 24b46797a3
7 changed files with 79 additions and 103 deletions

View file

@ -259,10 +259,9 @@ static void CG_DrawField (int x, int y, int width, int value) {
#endif // MISSIONPACK #endif // MISSIONPACK
/* /*
================ ==============
CG_Draw3DModel CG_Draw3DModel
==============
================
*/ */
void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) { void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) {
refdef_t refdef; refdef_t refdef;
@ -415,10 +414,9 @@ void CG_DrawFlagModel( float x, float y, float w, float h, int team, qboolean fo
} }
/* /*
================ ====================
CG_DrawStatusBarHead CG_DrawStatusBarHead
====================
================
*/ */
#ifndef MISSIONPACK #ifndef MISSIONPACK
#if 0 // ZTM: Not used by Q3Rally #if 0 // ZTM: Not used by Q3Rally
@ -478,10 +476,9 @@ static void CG_DrawStatusBarHead( float x ) {
#endif // MISSIONPACK #endif // MISSIONPACK
/* /*
================ ====================
CG_DrawStatusBarFlag CG_DrawStatusBarFlag
====================
================
*/ */
#ifndef MISSIONPACK #ifndef MISSIONPACK
static void CG_DrawStatusBarFlag( float x, int team ) { static void CG_DrawStatusBarFlag( float x, int team ) {
@ -490,10 +487,9 @@ static void CG_DrawStatusBarFlag( float x, int team ) {
#endif // MISSIONPACK #endif // MISSIONPACK
/* /*
================ =====================
CG_DrawTeamBackground CG_DrawTeamBackground
=====================
================
*/ */
void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team ) void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team )
{ {
@ -800,7 +796,7 @@ static void CG_DrawRallyStatusBar( void ) {
origin[0] = 70; origin[0] = 70;
origin[1] = 0; origin[1] = 0;
origin[2] = 0; origin[2] = 0;
angles[YAW] = 90 + 20 * sin( cg.time / 1000.0 ); angles[YAW] = 270 * sin( cg.time / 1000.0 );
CG_Draw3DModel( 10, 476 - 28, 26, 26, CG_Draw3DModel( 10, 476 - 28, 26, 26,
cg_weapons[ cent->currentState.weapon ].ammoModel, 0, origin, angles ); cg_weapons[ cent->currentState.weapon ].ammoModel, 0, origin, angles );
} }
@ -816,10 +812,10 @@ static void CG_DrawRallyStatusBar( void ) {
healthModel = trap_R_RegisterModel( "models/powerups/health/small_cross.md3" ); healthModel = trap_R_RegisterModel( "models/powerups/health/small_cross.md3" );
if ( healthModel ) { if ( healthModel ) {
origin[0] = 35; origin[0] = 68;
origin[1] = 0; origin[1] = 0;
origin[2] = -5; origin[2] = 0;
angles[YAW] = 180 * sin( cg.time / 1000.0 ); angles[YAW] = 270 * sin( cg.time / 1000.0 );
CG_Draw3DModel( 136, 476 - 28, 26, 26, CG_Draw3DModel( 136, 476 - 28, 26, 26,
healthModel, 0, origin, angles ); healthModel, 0, origin, angles );
} }
@ -838,7 +834,7 @@ static void CG_DrawRallyStatusBar( void ) {
origin[0] = 45; origin[0] = 45;
origin[1] = 0; origin[1] = 0;
origin[2] = -10; origin[2] = -10;
angles[YAW] = ( cg.time & 2047 ) * 360 / 2048.0; angles[YAW] = 270 * sin( cg.time / 1000.0 );
// CG_Draw3DModel( 196, 476 - 64, 26, 26, // CG_Draw3DModel( 196, 476 - 64, 26, 26,
CG_Draw3DModel( 262, 476 - 28, 26, 26, CG_Draw3DModel( 262, 476 - 28, 26, 26,
cgs.media.armorModel, 0, origin, angles ); cgs.media.armorModel, 0, origin, angles );
@ -891,7 +887,7 @@ static void CG_DrawRallyStatusBar( void ) {
origin[0] = 70; origin[0] = 70;
origin[1] = 0; origin[1] = 0;
origin[2] = 0; origin[2] = 0;
angles[YAW] = 20 * sin( cg.time / 1000.0 ); angles[YAW] = 270 * sin( cg.time / 1000.0 );
CG_Draw3DModel( 10, 476 - 64, 26, 26, CG_Draw3DModel( 10, 476 - 64, 26, 26,
cg_weapons[ weapon ].weaponModel, 0, origin, angles ); cg_weapons[ weapon ].weaponModel, 0, origin, angles );
} }

View file

@ -1547,7 +1547,7 @@ extern vmCvar_t cg_checkpointArrowMode;
extern vmCvar_t cg_atmosphericLevel; extern vmCvar_t cg_atmosphericLevel;
extern vmCvar_t cg_developer; extern vmCvar_t cg_developer;
// extern vmCvar_t cg_fpsLimit; extern vmCvar_t cg_fpsLimit;
extern vmCvar_t cg_autodrop; extern vmCvar_t cg_autodrop;
extern vmCvar_t cg_drawPositionSprites; extern vmCvar_t cg_drawPositionSprites;
extern vmCvar_t cg_tightCamTracking; extern vmCvar_t cg_tightCamTracking;

View file

@ -253,7 +253,7 @@ vmCvar_t cg_developer;
// cutom variable used in modified atmospheric effects from q3f // cutom variable used in modified atmospheric effects from q3f
vmCvar_t cg_atmosphericLevel; vmCvar_t cg_atmosphericLevel;
// vmCvar_t cg_fpsLimit; vmCvar_t cg_fpsLimit;
vmCvar_t cg_autodrop; vmCvar_t cg_autodrop;
vmCvar_t cg_drawPositionSprites; vmCvar_t cg_drawPositionSprites;
vmCvar_t cg_tightCamTracking; vmCvar_t cg_tightCamTracking;
@ -361,7 +361,7 @@ static cvarTable_t cvarTable[] = {
{ &cg_rearViewRenderLevel, "cg_rearViewRenderLevel", "3", CVAR_ARCHIVE }, { &cg_rearViewRenderLevel, "cg_rearViewRenderLevel", "3", CVAR_ARCHIVE },
{ &cg_mainViewRenderLevel, "cg_mainViewRenderLevel", "31", CVAR_ARCHIVE }, { &cg_mainViewRenderLevel, "cg_mainViewRenderLevel", "31", CVAR_ARCHIVE },
// { &cg_fpsLimit, "cg_fpsLimit", "30", CVAR_ARCHIVE }, { &cg_fpsLimit, "cg_fpsLimit", "60", CVAR_ARCHIVE },
{ &cg_autodrop, "cg_autodrop", "0", CVAR_ARCHIVE | CVAR_USERINFO }, { &cg_autodrop, "cg_autodrop", "0", CVAR_ARCHIVE | CVAR_USERINFO },
{ &cg_drawPositionSprites, "cg_drawPositionSprites", "1", CVAR_ARCHIVE }, { &cg_drawPositionSprites, "cg_drawPositionSprites", "1", CVAR_ARCHIVE },

View file

@ -13,23 +13,22 @@
float colors[4][4] = { float colors[4][4] = {
// { 0.2, 1.0, 0.2, 1.0 } , { 1.0, 0.2, 0.2, 1.0 }, {0.5, 0.5, 0.5, 1} }; // { 0.2, 1.0, 0.2, 1.0 } , { 1.0, 0.2, 0.2, 1.0 }, {0.5, 0.5, 0.5, 1} };
{ 1.0f, 0.69f, 0.0f, 1.0f } , // normal { 1.0f, 0.69f, 0.0f, 1.0f } , // normal
{ 1.0f, 0.2f, 0.2f, 1.0f }, // low health { 1.0f, 0.2f, 0.2f, 1.0f }, // low health
{ 0.5f, 0.5f, 0.5f, 1.0f }, // weapon firing { 0.5f, 0.5f, 0.5f, 1.0f }, // weapon firing
{ 1.0f, 1.0f, 1.0f, 1.0f } // health > 100 { 1.0f, 1.0f, 1.0f, 1.0f } // health > 100
}; };
/* /*
================ =====================
CG_DrawRearviewMirror CG_DrawRearviewMirror
=====================
================
*/ */
void CG_DrawRearviewMirror( float x, float y, float w, float h) { void CG_DrawRearviewMirror( float x, float y, float w, float h) {
//static int lastLowFPSTime; static int lastLowFPSTime;
int i; int i;
//int fps; int fps;
float mx, my, mw, mh; float mx, my, mw, mh;
int tmp; int tmp;
@ -42,7 +41,6 @@ void CG_DrawRearviewMirror( float x, float y, float w, float h) {
if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR)
return; return;
/*
if (cg_fpsLimit.integer >= 100) if (cg_fpsLimit.integer >= 100)
return; return;
@ -61,7 +59,7 @@ void CG_DrawRearviewMirror( float x, float y, float w, float h) {
return; return;
} }
} }
*/
mx = x - 8; mx = x - 8;
my = y - 7; my = y - 7;
mw = w * 1.0534F; mw = w * 1.0534F;
@ -81,14 +79,14 @@ void CG_DrawRearviewMirror( float x, float y, float w, float h) {
cg.mirrorRefdef.time = cg.time; cg.mirrorRefdef.time = cg.time;
cg.mirrorRefdef.rdflags = 0; cg.mirrorRefdef.rdflags = 0;
/*
AnglesToAxis( cg.predictedPlayerState.viewangles, mirrorRefdef.viewaxis );
VectorInverse( mirrorRefdef.viewaxis[0] );
VectorInverse( mirrorRefdef.viewaxis[1] );
// AnglesToAxis( cg.predictedPlayerState.viewangles, mirrorRefdef.viewaxis ); VectorCopy( cg.predictedPlayerState.origin, mirrorRefdef.vieworg );
// VectorInverse( mirrorRefdef.viewaxis[0] ); VectorMA( mirrorRefdef.vieworg, 16, mirrorRefdef.viewaxis[2], mirrorRefdef.vieworg );
// VectorInverse( mirrorRefdef.viewaxis[1] ); */
// VectorCopy( cg.predictedPlayerState.origin, mirrorRefdef.vieworg );
// VectorMA( mirrorRefdef.vieworg, 16, mirrorRefdef.viewaxis[2], mirrorRefdef.vieworg );
// add entities and graphics to rearview scene // add entities and graphics to rearview scene
if (cg_rearViewRenderLevel.integer & RL_MARKS){ if (cg_rearViewRenderLevel.integer & RL_MARKS){
CG_AddMarks(); CG_AddMarks();
@ -120,17 +118,9 @@ void CG_DrawRearviewMirror( float x, float y, float w, float h) {
} }
/* /*
================ ===========
CG_DrawMMap CG_DrawMMap
===========
TBB - minimap EXPERIMENTAL -
modified rearview but only render stuff from +8192(Z) from
center of bsp, pitched downward, and render only players (flags for ctf).
this will probably drop fps, hopefully not too much and ,
might have to make a cvar for displaying it plus opacity
trying to get this to work like the minimap from UrT
from scratch. must try to make it 2d bitmap
================
*/ */
void CG_DrawMMap( float x, float y, float w, float h ) { void CG_DrawMMap( float x, float y, float w, float h ) {
@ -147,12 +137,15 @@ void CG_DrawMMap( float x, float y, float w, float h ) {
if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR)
return; return;
/* TBB - minimap to show for only racing and team racing no weapons (for now) /* minimap to show for only racing and team racing no weapons (for now)
if ( cgs.gametype != GT_RACING ) if ( cgs.gametype != GT_RACING )
return; return;
if ( (cgs.gametype != GT_RACING) || (cgs.gametype != GT_TEAM_RACING) ) if ( (cgs.gametype != GT_RACING) || (cgs.gametype != GT_TEAM_RACING) )
return; */ return;
*/
mx = x ; mx = x ;
my = y ; my = y ;
@ -181,7 +174,6 @@ void CG_DrawMMap( float x, float y, float w, float h ) {
// VectorCopy( cg.predictedPlayerState.origin, mirrorRefdef.vieworg ); // VectorCopy( cg.predictedPlayerState.origin, mirrorRefdef.vieworg );
// VectorMA( mirrorRefdef.vieworg, 16, mirrorRefdef.viewaxis[2], mirrorRefdef.vieworg ); // VectorMA( mirrorRefdef.vieworg, 16, mirrorRefdef.viewaxis[2], mirrorRefdef.vieworg );
//TBB
/*only add players to minimap scene /*only add players to minimap scene
add ctf flag entities later*/ add ctf flag entities later*/
if (cg_rearViewRenderLevel.integer & RL_MARKS){ if (cg_rearViewRenderLevel.integer & RL_MARKS){
@ -213,15 +205,11 @@ void CG_DrawMMap( float x, float y, float w, float h ) {
trap_R_RenderScene( &cg.mmapRefdef ); trap_R_RenderScene( &cg.mmapRefdef );
CG_DrawPic( mx, my, mw, mh, cgs.media.MMapShader ); CG_DrawPic( mx, my, mw, mh, cgs.media.MMapShader );
} }
//TBB FIN
/* /*
================ ========================
CG_DrawArrowToCheckpoint CG_DrawArrowToCheckpoint
========================
================
*/ */
static float CG_DrawArrowToCheckpoint( float y ) { static float CG_DrawArrowToCheckpoint( float y ) {
centity_t *cent; centity_t *cent;
@ -525,10 +513,9 @@ static float CG_DrawLaps( float y ) {
/* /*
================ ======================
CG_DrawCurrentPosition CG_DrawCurrentPosition
======================
================
*/ */
static float CG_DrawCurrentPosition( float y ) { static float CG_DrawCurrentPosition( float y ) {
centity_t *cent; centity_t *cent;
@ -567,10 +554,9 @@ static float CG_DrawCurrentPosition( float y ) {
/* /*
================ ========================
CG_DrawCarAheadAndBehind CG_DrawCarAheadAndBehind
========================
================
*/ */
static float CG_DrawCarAheadAndBehind( float y ) { static float CG_DrawCarAheadAndBehind( float y ) {
centity_t *cent, *other; centity_t *cent, *other;
@ -625,9 +611,9 @@ static float CG_DrawCarAheadAndBehind( float y ) {
#if 0 #if 0
/* /*
================= ====================
CG_DrawHUD_DerbyList CG_DrawHUD_DerbyList
================= ====================
void CG_DrawHUD_DerbyList(float x, float y){ void CG_DrawHUD_DerbyList(float x, float y){
int i; int i;
@ -702,10 +688,9 @@ void CG_DrawHUD_DerbyList(float x, float y){
#endif #endif
/* /*
================ ============
CG_DrawSpeed CG_DrawSpeed
============
================
*/ */
static float CG_DrawSpeed( float y ) { static float CG_DrawSpeed( float y ) {
playerState_t *ps; playerState_t *ps;
@ -868,10 +853,9 @@ static float CG_DrawSDKMessage( float y ) {
#if 0 #if 0
/* /*
================ ===========
CG_DrawGear CG_DrawGear
===========
================
*/ */
static float CG_DrawGear( float y ) { static float CG_DrawGear( float y ) {
CG_DrawSmallDigitalStringColor( 560, y, va("Gear: %d", cg.predictedPlayerState.stats[STAT_GEAR]), colors[0]); CG_DrawSmallDigitalStringColor( 560, y, va("Gear: %d", cg.predictedPlayerState.stats[STAT_GEAR]), colors[0]);

View file

@ -610,7 +610,7 @@ void weapon_railgun_fire (gentity_t *ent) {
int passent; int passent;
gentity_t *unlinkedEntities[MAX_RAIL_HITS]; gentity_t *unlinkedEntities[MAX_RAIL_HITS];
damage = 50 * s_quadFactor; damage = 17 * s_quadFactor;
VectorMA (muzzle, 8192, forward, end); VectorMA (muzzle, 8192, forward, end);

View file

@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define BASETA "missionpack" #define BASETA "missionpack"
#ifndef PRODUCT_VERSION #ifndef PRODUCT_VERSION
#define PRODUCT_VERSION "v0.3c_r439" #define PRODUCT_VERSION "v0.3c_r443"
#endif #endif

View file

@ -886,37 +886,33 @@ q3rallycode
engine\cross-make-mingw64.sh engine\cross-make-mingw64.sh
[Open project files] [Open project files]
0=engine\code\qcommon\q_shared.h 0=engine\code\qcommon\q_shared.h
1=engine\code\game\g_local.h 1=engine\code\cgame\cg_rally_hud.c
2=engine\code\game\g_weapon.c 2=engine\code\cgame\cg_rally_hud2.c
3=engine\code\cgame\cg_playerstate.c 3=engine\code\cgame\cg_local.h
4=engine\code\game\bg_public.h 4=engine\code\cgame\cg_main.c
5=engine\code\game\g_arenas.c 5=engine\code\cgame\cg_draw.c
6=engine\code\game\g_cmds.c 6=engine\code\cgame\cg_newdraw.c
7=engine\code\q3_ui\ui_sppostgame.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\cgame\cg_draw.c
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=57 TopLine=57
Caret=36,70 Caret=36,70
[engine\code\game\g_local.h] [engine\code\cgame\cg_rally_hud.c]
TopLine=346 TopLine=929
Caret=1,362 Caret=1,755
[engine\code\game\g_weapon.c] [engine\code\cgame\cg_rally_hud2.c]
TopLine=808 TopLine=1
Caret=35,826 Caret=1,1
[engine\code\cgame\cg_playerstate.c] [engine\code\cgame\cg_local.h]
TopLine=355 TopLine=1661
Caret=1,371 Caret=1,1677
[engine\code\game\bg_public.h] [engine\code\cgame\cg_main.c]
TopLine=335 TopLine=348
Caret=1,351 Caret=35,364
[engine\code\game\g_arenas.c] [engine\code\cgame\cg_draw.c]
TopLine=98 TopLine=798
Caret=1,114 Caret=17,815
[engine\code\game\g_cmds.c] [engine\code\cgame\cg_newdraw.c]
TopLine=358 TopLine=524
Caret=1,370 Caret=1,540
[engine\code\q3_ui\ui_sppostgame.c]
TopLine=73
Caret=28,92