mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-21 11:31:21 +00:00
Added the new sigils and icons from insellium codewise
version upcount
This commit is contained in:
parent
dbfe93232f
commit
d4d94bd63d
8 changed files with 99 additions and 62 deletions
|
@ -534,16 +534,15 @@ void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team )
|
|||
CG_DrawSigilHUD
|
||||
=======================
|
||||
*/
|
||||
|
||||
void CG_DrawSigilHUD( void ) {
|
||||
int i, x=480, y=0;
|
||||
|
||||
int i, x=440, y=0;
|
||||
for (i=0; i<MAX_SIGILS; i++) {
|
||||
switch ( cgs.sigil[i] )
|
||||
|
||||
{
|
||||
|
||||
case SIGIL_ISWHITE:
|
||||
CG_DrawPic( x, y, 18, 18, cgs.media.sigilShader );
|
||||
break;
|
||||
|
||||
case SIGIL_ISRED:
|
||||
CG_DrawPic( x, y, 18, 18, cgs.media.redsigilShader );
|
||||
break;
|
||||
|
@ -559,9 +558,15 @@ void CG_DrawSigilHUD( void ) {
|
|||
case SIGIL_ISYELLOW:
|
||||
CG_DrawPic( x, y, 18, 18, cgs.media.yellowsigilShader );
|
||||
break;
|
||||
|
||||
case SIGIL_ISWHITE:
|
||||
CG_DrawPic( x, y, 18, 18, cgs.media.sigilShader );
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
x+= 19;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3098,8 +3103,8 @@ static void CG_DrawWarmup( void ) {
|
|||
//=======================================
|
||||
//CG_DrawSigilLocationInfo
|
||||
//=======================================
|
||||
void CG_DrawSigilLocationInfo( vec3_t origin, vec3_t target, qhandle_t shader, vec4_t color )
|
||||
{
|
||||
void CG_DrawSigilLocationInfo( vec3_t origin, vec3_t target, qhandle_t shader, vec4_t color ) {
|
||||
|
||||
int x = 320, y = 240;
|
||||
int w = 320, h = 240;
|
||||
float angle, distance;
|
||||
|
@ -3175,16 +3180,16 @@ static void CG_DrawSigilLocations( void ) {
|
|||
VectorCopy(target->lerpOrigin,end);
|
||||
|
||||
if (target->currentState.modelindex == redSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.redFlagShader[0], colorRed);
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.redsigilShader, colorRed);
|
||||
|
||||
else if (target->currentState.modelindex == blueSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.blueFlagShader[0], colorBlue);
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.bluesigilShader, colorBlue);
|
||||
|
||||
else if (target->currentState.modelindex == greenSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.greenFlagShader[0], colorGreen);
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.greensigilShader, colorGreen);
|
||||
|
||||
else if (target->currentState.modelindex == yellowSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.yellowFlagShader[0], colorYellow);
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.yellowsigilShader, colorYellow);
|
||||
|
||||
else if (target->currentState.modelindex == whiteSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.sigilShader, colorWhite);
|
||||
|
|
|
@ -841,13 +841,18 @@ typedef struct {
|
|||
qhandle_t greenFlagModel;
|
||||
qhandle_t yellowFlagModel;
|
||||
qhandle_t neutralFlagModel;
|
||||
qhandle_t redSigilModel;
|
||||
qhandle_t blueSigilModel;
|
||||
qhandle_t greenSigilModel;
|
||||
qhandle_t yellowSigilModel;
|
||||
qhandle_t neutralSigilModel;
|
||||
qhandle_t redFlagShader[3];
|
||||
qhandle_t blueFlagShader[3];
|
||||
qhandle_t greenFlagShader[3];
|
||||
qhandle_t yellowFlagShader[3];
|
||||
qhandle_t flagShader[4];
|
||||
// Q3Rally Code Start
|
||||
qhandle_t sigilShader;
|
||||
qhandle_t sigilShader;
|
||||
qhandle_t redsigilShader;
|
||||
qhandle_t bluesigilShader;
|
||||
qhandle_t greensigilShader;
|
||||
|
|
|
@ -1098,6 +1098,11 @@ static void CG_RegisterGraphics( void ) {
|
|||
cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" );
|
||||
cgs.media.greenFlagModel = trap_R_RegisterModel( "models/flags/g_flag.md3" );
|
||||
cgs.media.yellowFlagModel = trap_R_RegisterModel( "models/flags/y_flag.md3" );
|
||||
cgs.media.redSigilModel = trap_R_RegisterModel( "models/flags/r_sigil.md3" );
|
||||
cgs.media.blueSigilModel = trap_R_RegisterModel( "models/flags/b_sigil.md3" );
|
||||
cgs.media.greenSigilModel = trap_R_RegisterModel( "models/flags/g_sigil.md3" );
|
||||
cgs.media.yellowSigilModel = trap_R_RegisterModel( "models/flags/y_sigil.md3" );
|
||||
cgs.media.neutralSigilModel = trap_R_RegisterModel( "models/flags/n_sigil.md3" );
|
||||
cgs.media.redFlagShader[0] = trap_R_RegisterShaderNoMip( "icons/iconf_red1" );
|
||||
cgs.media.redFlagShader[1] = trap_R_RegisterShaderNoMip( "icons/iconf_red2" );
|
||||
cgs.media.redFlagShader[2] = trap_R_RegisterShaderNoMip( "icons/iconf_red3" );
|
||||
|
@ -1111,11 +1116,11 @@ static void CG_RegisterGraphics( void ) {
|
|||
cgs.media.yellowFlagShader[1] = trap_R_RegisterShaderNoMip( "icons/iconf_yell2" );
|
||||
cgs.media.yellowFlagShader[2] = trap_R_RegisterShaderNoMip( "icons/iconf_yell3" );
|
||||
// Q3Rally Code Start
|
||||
cgs.media.sigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_neutral1" );
|
||||
cgs.media.redsigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_red1" );
|
||||
cgs.media.bluesigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_blu1" );
|
||||
cgs.media.greensigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_green1" );
|
||||
cgs.media.yellowsigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_yell1" );
|
||||
cgs.media.sigilShader = trap_R_RegisterShaderNoMip( "icons/icons_neutral" );
|
||||
cgs.media.redsigilShader = trap_R_RegisterShaderNoMip( "icons/icons_red" );
|
||||
cgs.media.bluesigilShader = trap_R_RegisterShaderNoMip( "icons/icons_blu" );
|
||||
cgs.media.greensigilShader = trap_R_RegisterShaderNoMip( "icons/icons_green" );
|
||||
cgs.media.yellowsigilShader = trap_R_RegisterShaderNoMip( "icons/icons_yellow" );
|
||||
// Q3Rally Code END
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
|
@ -2182,7 +2187,7 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) {
|
|||
cgs.redflag = cgs.blueflag = -1; // For compatibily, default to unset for
|
||||
cgs.flagStatus = -1;
|
||||
// Q3Rally Code Start
|
||||
cgs.sigil[0] = cgs.sigil[1] = cgs.sigil[2] = -1; // Sigil Reset
|
||||
cgs.sigil[0] = cgs.sigil[1] = cgs.sigil[2] = cgs.sigil[3] = cgs.sigil[4] = -1; // Sigil Reset
|
||||
// Q3Rally Code END
|
||||
// old servers
|
||||
|
||||
|
|
|
@ -269,6 +269,8 @@ void CG_SetConfigValues( void ) {
|
|||
cgs.sigil[0] = s[0] - '0';
|
||||
cgs.sigil[1] = s[1] - '0';
|
||||
cgs.sigil[2] = s[2] - '0';
|
||||
cgs.sigil[3] = s[3] - '0';
|
||||
cgs.sigil[4] = s[4] - '0';
|
||||
}
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
|
@ -415,6 +417,8 @@ static void CG_ConfigStringModified( void ) {
|
|||
cgs.sigil[0] = str[0] - '0';
|
||||
cgs.sigil[1] = str[1] - '1';
|
||||
cgs.sigil[2] = str[2] - '2';
|
||||
cgs.sigil[3] = str[3] - '3';
|
||||
cgs.sigil[4] = str[4] - '4';
|
||||
}
|
||||
}
|
||||
else if ( num == CS_SHADERSTATE ) {
|
||||
|
@ -448,7 +452,7 @@ static void CG_AddToTeamChat( const char *str ) {
|
|||
return;
|
||||
}
|
||||
|
||||
len = 0;
|
||||
|
||||
|
||||
p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight];
|
||||
*p = 0;
|
||||
|
|
|
@ -791,7 +791,7 @@ gitem_t bg_itemlist[] =
|
|||
/* pickup */ "Invisibility",
|
||||
30,
|
||||
IT_POWERUP,
|
||||
PW_INVIS,
|
||||
PW_INVIS,
|
||||
/* precache */ "",
|
||||
/* sounds */ ""
|
||||
},
|
||||
|
@ -898,10 +898,10 @@ Only in Domination games
|
|||
{
|
||||
"team_DOMINATION_sigil_red",
|
||||
NULL,
|
||||
{ "models/flags/r_flag.md3",
|
||||
{ "models/flags/r_sigil.md3",
|
||||
0, 0, 0 },
|
||||
/* icon */ "icons/iconf_red1",
|
||||
/* pickup */ "Flag",
|
||||
/* icon */ "icons/icons_red",
|
||||
/* pickup */ "Sigil",
|
||||
0,
|
||||
IT_SIGIL,
|
||||
PW_SIGILRED,
|
||||
|
@ -915,10 +915,10 @@ Only in Domination games
|
|||
{
|
||||
"team_DOMINATION_sigil_blue",
|
||||
NULL,
|
||||
{ "models/flags/b_flag.md3",
|
||||
{ "models/flags/b_sigil.md3",
|
||||
0, 0, 0 },
|
||||
/* icon */ "icons/iconf_blu1",
|
||||
/* pickup */ "Flag",
|
||||
/* icon */ "icons/icons_blu",
|
||||
/* pickup */ "Sigil",
|
||||
0,
|
||||
IT_SIGIL,
|
||||
PW_SIGILBLUE,
|
||||
|
@ -932,10 +932,10 @@ Only in Domination games
|
|||
{
|
||||
"team_DOMINATION_sigil_green",
|
||||
NULL,
|
||||
{ "models/flags/g_flag.md3",
|
||||
{ "models/flags/g_sigil.md3",
|
||||
0, 0, 0 },
|
||||
/* icon */ "icons/iconf_green1",
|
||||
/* pickup */ "Flag",
|
||||
/* icon */ "icons/icons_green",
|
||||
/* pickup */ "Sigil",
|
||||
0,
|
||||
IT_SIGIL,
|
||||
PW_SIGILGREEN,
|
||||
|
@ -949,10 +949,10 @@ Only in Domination games
|
|||
{
|
||||
"team_DOMINATION_sigil_yellow",
|
||||
NULL,
|
||||
{ "models/flags/y_flag.md3",
|
||||
{ "models/flags/y_sigil.md3",
|
||||
0, 0, 0 },
|
||||
/* icon */ "icons/iconf_yell1",
|
||||
/* pickup */ "Flag",
|
||||
/* icon */ "icons/icons_yellow",
|
||||
/* pickup */ "Sigil",
|
||||
0,
|
||||
IT_SIGIL,
|
||||
PW_SIGILYELLOW,
|
||||
|
@ -966,10 +966,10 @@ Only in Domination games
|
|||
{
|
||||
"team_DOMINATION_sigil",
|
||||
NULL,
|
||||
{ "models/flags/n_flag.md3",
|
||||
{ "models/flags/n_sigil.md3",
|
||||
0, 0, 0 },
|
||||
/* icon */ "icons/iconf_neutral1",
|
||||
/* pickup */ "Flag",
|
||||
/* icon */ "icons/icons_neutral",
|
||||
/* pickup */ "Sigil",
|
||||
0,
|
||||
IT_SIGIL,
|
||||
PW_SIGILWHITE,
|
||||
|
@ -1530,12 +1530,18 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play
|
|||
|
||||
// Q3Rally Code Start
|
||||
case IT_SIGIL:
|
||||
// red team cannot touch a red sigil
|
||||
if (ps->persistant[PERS_TEAM] == TEAM_RED && ent->powerups == PW_SIGILRED)
|
||||
return qfalse;
|
||||
// blue team cannot touch a blue sigil
|
||||
else if (ps->persistant[PERS_TEAM] == TEAM_BLUE && ent->powerups == PW_SIGILBLUE)
|
||||
return qfalse;
|
||||
// red team cannot touch a red sigil
|
||||
if (ps->persistant[PERS_TEAM] == TEAM_RED && ent->powerups == PW_SIGILRED)
|
||||
return qfalse;
|
||||
// blue team cannot touch a blue sigil
|
||||
else if (ps->persistant[PERS_TEAM] == TEAM_BLUE && ent->powerups == PW_SIGILBLUE)
|
||||
return qfalse;
|
||||
// green team cannot touch a green sigil
|
||||
else if (ps->persistant[PERS_TEAM] == TEAM_GREEN && ent->powerups == PW_SIGILGREEN)
|
||||
return qfalse;
|
||||
// yellow team cannot touch a yellow sigil
|
||||
else if (ps->persistant[PERS_TEAM] == TEAM_YELLOW && ent->powerups == PW_SIGILYELLOW)
|
||||
return qfalse;
|
||||
else
|
||||
return qtrue;
|
||||
// Q3Rally Code END
|
||||
|
|
|
@ -80,6 +80,10 @@ void Team_InitGame( void ) {
|
|||
Team_SetSigilStatus( 1, SIGIL_ISWHITE );
|
||||
teamgame.sigil[2].status = -1; // Invalid to force update
|
||||
Team_SetSigilStatus( 2, SIGIL_ISWHITE );
|
||||
teamgame.sigil[3].status = -1; // Invalid to force update
|
||||
Team_SetSigilStatus( 3, SIGIL_ISWHITE );
|
||||
teamgame.sigil[4].status = -1; // Invalid to force update
|
||||
Team_SetSigilStatus( 4, SIGIL_ISWHITE );
|
||||
break;
|
||||
|
||||
// Q3Rally Code END
|
||||
|
@ -111,6 +115,12 @@ void Team_EndGame( void ) {
|
|||
if( teamgame.sigil[2].entity ) {
|
||||
teamgame.sigil[2].entity->nextthink = 0;
|
||||
}
|
||||
if( teamgame.sigil[3].entity ) {
|
||||
teamgame.sigil[3].entity->nextthink = 0;
|
||||
}
|
||||
if( teamgame.sigil[4].entity ) {
|
||||
teamgame.sigil[4].entity->nextthink = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Q3Rally Code END
|
||||
|
@ -300,13 +310,15 @@ void Team_SetSigilStatus( int sigilNum, sigilStatus_t status ) {
|
|||
|
||||
|
||||
if( modified ) {
|
||||
char st[4];
|
||||
char st[6];
|
||||
|
||||
//send all 3 sigils' status to the configstring
|
||||
//send all 5 sigils' status to the configstring
|
||||
st[0] = dominationSigilStatusRemap[teamgame.sigil[0].status];
|
||||
st[1] = dominationSigilStatusRemap[teamgame.sigil[1].status];
|
||||
st[2] = dominationSigilStatusRemap[teamgame.sigil[2].status];
|
||||
st[3] = 0;
|
||||
st[3] = dominationSigilStatusRemap[teamgame.sigil[3].status];
|
||||
st[4] = dominationSigilStatusRemap[teamgame.sigil[4].status];
|
||||
st[5] = 0;
|
||||
|
||||
trap_SetConfigstring( CS_SIGILSTATUS, st );
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define BASETA "missionpack"
|
||||
|
||||
#ifndef PRODUCT_VERSION
|
||||
#define PRODUCT_VERSION "v0.3c_r415"
|
||||
#define PRODUCT_VERSION "v0.3c_r420"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1794,7 +1794,7 @@ typedef enum _flag_status {
|
|||
|
||||
// Q3Rally Code Start
|
||||
|
||||
#define MAX_SIGILS 3
|
||||
#define MAX_SIGILS 5
|
||||
|
||||
typedef enum _sigil_status {
|
||||
SIGIL_ISWHITE = 0,
|
||||
|
|
|
@ -122,7 +122,7 @@ q3rallycode
|
|||
engine\code\botlib\l_utils.h
|
||||
engine\code\botlib\lcc.mak
|
||||
engine\code\botlib\linux-i386.mak
|
||||
-cgame
|
||||
+cgame
|
||||
engine\code\cgame\cg_atmospheric.c
|
||||
engine\code\cgame\cg_consolecmds.c
|
||||
engine\code\cgame\cg_draw.c
|
||||
|
@ -192,7 +192,7 @@ q3rallycode
|
|||
engine\code\client\snd_openal.c
|
||||
engine\code\client\snd_public.h
|
||||
engine\code\client\snd_wavelet.c
|
||||
+game
|
||||
-game
|
||||
engine\code\game\ai_chat.c
|
||||
engine\code\game\ai_chat.h
|
||||
engine\code\game\ai_cmd.c
|
||||
|
@ -886,21 +886,21 @@ q3rallycode
|
|||
engine\cross-make-mingw64.sh
|
||||
[Open project files]
|
||||
0=engine\code\qcommon\q_shared.h
|
||||
1=engine\code\game\g_client.c
|
||||
2=engine\code\game\g_missile.c
|
||||
3=engine\code\game\g_weapon.c
|
||||
1=engine\code\q3_ui\ui_playersettings.c
|
||||
2=engine\code\cgame\cg_draw.c
|
||||
3=engine\code\cgame\cg_local.h
|
||||
[Selected Project Files]
|
||||
Main=
|
||||
Selected=engine\code\qcommon\q_shared.h
|
||||
[engine\code\qcommon\q_shared.h]
|
||||
TopLine=55
|
||||
TopLine=51
|
||||
Caret=36,70
|
||||
[engine\code\game\g_client.c]
|
||||
TopLine=1651
|
||||
Caret=9,1672
|
||||
[engine\code\game\g_missile.c]
|
||||
TopLine=15
|
||||
Caret=27,34
|
||||
[engine\code\game\g_weapon.c]
|
||||
TopLine=734
|
||||
Caret=27,742
|
||||
[engine\code\q3_ui\ui_playersettings.c]
|
||||
TopLine=303
|
||||
Caret=1,311
|
||||
[engine\code\cgame\cg_draw.c]
|
||||
TopLine=547
|
||||
Caret=2,570
|
||||
[engine\code\cgame\cg_local.h]
|
||||
TopLine=1352
|
||||
Caret=1,1368
|
||||
|
|
Loading…
Reference in a new issue