Added the new sigils and icons from insellium codewise

version upcount
This commit is contained in:
q3rally 2021-07-08 09:31:01 +00:00
parent dbfe93232f
commit d4d94bd63d
8 changed files with 99 additions and 62 deletions

View file

@ -534,16 +534,15 @@ void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team )
CG_DrawSigilHUD CG_DrawSigilHUD
======================= =======================
*/ */
void CG_DrawSigilHUD( void ) { void CG_DrawSigilHUD( void ) {
int i, x=480, y=0;
int i, x=440, y=0;
for (i=0; i<MAX_SIGILS; i++) { for (i=0; i<MAX_SIGILS; i++) {
switch ( cgs.sigil[i] ) switch ( cgs.sigil[i] )
{ {
case SIGIL_ISWHITE:
CG_DrawPic( x, y, 18, 18, cgs.media.sigilShader );
break;
case SIGIL_ISRED: case SIGIL_ISRED:
CG_DrawPic( x, y, 18, 18, cgs.media.redsigilShader ); CG_DrawPic( x, y, 18, 18, cgs.media.redsigilShader );
break; break;
@ -559,9 +558,15 @@ void CG_DrawSigilHUD( void ) {
case SIGIL_ISYELLOW: case SIGIL_ISYELLOW:
CG_DrawPic( x, y, 18, 18, cgs.media.yellowsigilShader ); CG_DrawPic( x, y, 18, 18, cgs.media.yellowsigilShader );
break; break;
case SIGIL_ISWHITE:
CG_DrawPic( x, y, 18, 18, cgs.media.sigilShader );
break;
} }
x+= 19; x+= 19;
} }
} }
/* /*
@ -3098,8 +3103,8 @@ static void CG_DrawWarmup( void ) {
//======================================= //=======================================
//CG_DrawSigilLocationInfo //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 x = 320, y = 240;
int w = 320, h = 240; int w = 320, h = 240;
float angle, distance; float angle, distance;
@ -3175,16 +3180,16 @@ static void CG_DrawSigilLocations( void ) {
VectorCopy(target->lerpOrigin,end); VectorCopy(target->lerpOrigin,end);
if (target->currentState.modelindex == redSigil) 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) 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) 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) 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) else if (target->currentState.modelindex == whiteSigil)
CG_DrawSigilLocationInfo(origin, end, cgs.media.sigilShader, colorWhite); CG_DrawSigilLocationInfo(origin, end, cgs.media.sigilShader, colorWhite);

View file

@ -841,13 +841,18 @@ typedef struct {
qhandle_t greenFlagModel; qhandle_t greenFlagModel;
qhandle_t yellowFlagModel; qhandle_t yellowFlagModel;
qhandle_t neutralFlagModel; qhandle_t neutralFlagModel;
qhandle_t redSigilModel;
qhandle_t blueSigilModel;
qhandle_t greenSigilModel;
qhandle_t yellowSigilModel;
qhandle_t neutralSigilModel;
qhandle_t redFlagShader[3]; qhandle_t redFlagShader[3];
qhandle_t blueFlagShader[3]; qhandle_t blueFlagShader[3];
qhandle_t greenFlagShader[3]; qhandle_t greenFlagShader[3];
qhandle_t yellowFlagShader[3]; qhandle_t yellowFlagShader[3];
qhandle_t flagShader[4]; qhandle_t flagShader[4];
// Q3Rally Code Start // Q3Rally Code Start
qhandle_t sigilShader; qhandle_t sigilShader;
qhandle_t redsigilShader; qhandle_t redsigilShader;
qhandle_t bluesigilShader; qhandle_t bluesigilShader;
qhandle_t greensigilShader; qhandle_t greensigilShader;

View file

@ -1098,6 +1098,11 @@ static void CG_RegisterGraphics( void ) {
cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" ); cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" );
cgs.media.greenFlagModel = trap_R_RegisterModel( "models/flags/g_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.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[0] = trap_R_RegisterShaderNoMip( "icons/iconf_red1" );
cgs.media.redFlagShader[1] = trap_R_RegisterShaderNoMip( "icons/iconf_red2" ); cgs.media.redFlagShader[1] = trap_R_RegisterShaderNoMip( "icons/iconf_red2" );
cgs.media.redFlagShader[2] = trap_R_RegisterShaderNoMip( "icons/iconf_red3" ); 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[1] = trap_R_RegisterShaderNoMip( "icons/iconf_yell2" );
cgs.media.yellowFlagShader[2] = trap_R_RegisterShaderNoMip( "icons/iconf_yell3" ); cgs.media.yellowFlagShader[2] = trap_R_RegisterShaderNoMip( "icons/iconf_yell3" );
// Q3Rally Code Start // Q3Rally Code Start
cgs.media.sigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_neutral1" ); cgs.media.sigilShader = trap_R_RegisterShaderNoMip( "icons/icons_neutral" );
cgs.media.redsigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_red1" ); cgs.media.redsigilShader = trap_R_RegisterShaderNoMip( "icons/icons_red" );
cgs.media.bluesigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_blu1" ); cgs.media.bluesigilShader = trap_R_RegisterShaderNoMip( "icons/icons_blu" );
cgs.media.greensigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_green1" ); cgs.media.greensigilShader = trap_R_RegisterShaderNoMip( "icons/icons_green" );
cgs.media.yellowsigilShader = trap_R_RegisterShaderNoMip( "icons/iconf_yell1" ); cgs.media.yellowsigilShader = trap_R_RegisterShaderNoMip( "icons/icons_yellow" );
// Q3Rally Code END // Q3Rally Code END
#ifdef MISSIONPACK #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.redflag = cgs.blueflag = -1; // For compatibily, default to unset for
cgs.flagStatus = -1; cgs.flagStatus = -1;
// Q3Rally Code Start // 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 // Q3Rally Code END
// old servers // old servers

View file

@ -269,6 +269,8 @@ void CG_SetConfigValues( void ) {
cgs.sigil[0] = s[0] - '0'; cgs.sigil[0] = s[0] - '0';
cgs.sigil[1] = s[1] - '0'; cgs.sigil[1] = s[1] - '0';
cgs.sigil[2] = s[2] - '0'; cgs.sigil[2] = s[2] - '0';
cgs.sigil[3] = s[3] - '0';
cgs.sigil[4] = s[4] - '0';
} }
#ifdef MISSIONPACK #ifdef MISSIONPACK
@ -415,6 +417,8 @@ static void CG_ConfigStringModified( void ) {
cgs.sigil[0] = str[0] - '0'; cgs.sigil[0] = str[0] - '0';
cgs.sigil[1] = str[1] - '1'; cgs.sigil[1] = str[1] - '1';
cgs.sigil[2] = str[2] - '2'; cgs.sigil[2] = str[2] - '2';
cgs.sigil[3] = str[3] - '3';
cgs.sigil[4] = str[4] - '4';
} }
} }
else if ( num == CS_SHADERSTATE ) { else if ( num == CS_SHADERSTATE ) {
@ -448,7 +452,7 @@ static void CG_AddToTeamChat( const char *str ) {
return; return;
} }
len = 0;
p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight]; p = cgs.teamChatMsgs[cgs.teamChatPos % chatHeight];
*p = 0; *p = 0;

View file

@ -791,7 +791,7 @@ gitem_t bg_itemlist[] =
/* pickup */ "Invisibility", /* pickup */ "Invisibility",
30, 30,
IT_POWERUP, IT_POWERUP,
PW_INVIS, PW_INVIS,
/* precache */ "", /* precache */ "",
/* sounds */ "" /* sounds */ ""
}, },
@ -898,10 +898,10 @@ Only in Domination games
{ {
"team_DOMINATION_sigil_red", "team_DOMINATION_sigil_red",
NULL, NULL,
{ "models/flags/r_flag.md3", { "models/flags/r_sigil.md3",
0, 0, 0 }, 0, 0, 0 },
/* icon */ "icons/iconf_red1", /* icon */ "icons/icons_red",
/* pickup */ "Flag", /* pickup */ "Sigil",
0, 0,
IT_SIGIL, IT_SIGIL,
PW_SIGILRED, PW_SIGILRED,
@ -915,10 +915,10 @@ Only in Domination games
{ {
"team_DOMINATION_sigil_blue", "team_DOMINATION_sigil_blue",
NULL, NULL,
{ "models/flags/b_flag.md3", { "models/flags/b_sigil.md3",
0, 0, 0 }, 0, 0, 0 },
/* icon */ "icons/iconf_blu1", /* icon */ "icons/icons_blu",
/* pickup */ "Flag", /* pickup */ "Sigil",
0, 0,
IT_SIGIL, IT_SIGIL,
PW_SIGILBLUE, PW_SIGILBLUE,
@ -932,10 +932,10 @@ Only in Domination games
{ {
"team_DOMINATION_sigil_green", "team_DOMINATION_sigil_green",
NULL, NULL,
{ "models/flags/g_flag.md3", { "models/flags/g_sigil.md3",
0, 0, 0 }, 0, 0, 0 },
/* icon */ "icons/iconf_green1", /* icon */ "icons/icons_green",
/* pickup */ "Flag", /* pickup */ "Sigil",
0, 0,
IT_SIGIL, IT_SIGIL,
PW_SIGILGREEN, PW_SIGILGREEN,
@ -949,10 +949,10 @@ Only in Domination games
{ {
"team_DOMINATION_sigil_yellow", "team_DOMINATION_sigil_yellow",
NULL, NULL,
{ "models/flags/y_flag.md3", { "models/flags/y_sigil.md3",
0, 0, 0 }, 0, 0, 0 },
/* icon */ "icons/iconf_yell1", /* icon */ "icons/icons_yellow",
/* pickup */ "Flag", /* pickup */ "Sigil",
0, 0,
IT_SIGIL, IT_SIGIL,
PW_SIGILYELLOW, PW_SIGILYELLOW,
@ -966,10 +966,10 @@ Only in Domination games
{ {
"team_DOMINATION_sigil", "team_DOMINATION_sigil",
NULL, NULL,
{ "models/flags/n_flag.md3", { "models/flags/n_sigil.md3",
0, 0, 0 }, 0, 0, 0 },
/* icon */ "icons/iconf_neutral1", /* icon */ "icons/icons_neutral",
/* pickup */ "Flag", /* pickup */ "Sigil",
0, 0,
IT_SIGIL, IT_SIGIL,
PW_SIGILWHITE, PW_SIGILWHITE,
@ -1530,12 +1530,18 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play
// Q3Rally Code Start // Q3Rally Code Start
case IT_SIGIL: case IT_SIGIL:
// red team cannot touch a red sigil // red team cannot touch a red sigil
if (ps->persistant[PERS_TEAM] == TEAM_RED && ent->powerups == PW_SIGILRED) if (ps->persistant[PERS_TEAM] == TEAM_RED && ent->powerups == PW_SIGILRED)
return qfalse; return qfalse;
// blue team cannot touch a blue sigil // blue team cannot touch a blue sigil
else if (ps->persistant[PERS_TEAM] == TEAM_BLUE && ent->powerups == PW_SIGILBLUE) else if (ps->persistant[PERS_TEAM] == TEAM_BLUE && ent->powerups == PW_SIGILBLUE)
return qfalse; 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 else
return qtrue; return qtrue;
// Q3Rally Code END // Q3Rally Code END

View file

@ -80,6 +80,10 @@ void Team_InitGame( void ) {
Team_SetSigilStatus( 1, SIGIL_ISWHITE ); Team_SetSigilStatus( 1, SIGIL_ISWHITE );
teamgame.sigil[2].status = -1; // Invalid to force update teamgame.sigil[2].status = -1; // Invalid to force update
Team_SetSigilStatus( 2, SIGIL_ISWHITE ); 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; break;
// Q3Rally Code END // Q3Rally Code END
@ -111,6 +115,12 @@ void Team_EndGame( void ) {
if( teamgame.sigil[2].entity ) { if( teamgame.sigil[2].entity ) {
teamgame.sigil[2].entity->nextthink = 0; 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 // Q3Rally Code END
@ -300,13 +310,15 @@ void Team_SetSigilStatus( int sigilNum, sigilStatus_t status ) {
if( modified ) { 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[0] = dominationSigilStatusRemap[teamgame.sigil[0].status];
st[1] = dominationSigilStatusRemap[teamgame.sigil[1].status]; st[1] = dominationSigilStatusRemap[teamgame.sigil[1].status];
st[2] = dominationSigilStatusRemap[teamgame.sigil[2].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 ); trap_SetConfigstring( CS_SIGILSTATUS, st );

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_r415" #define PRODUCT_VERSION "v0.3c_r420"
#endif #endif
@ -1794,7 +1794,7 @@ typedef enum _flag_status {
// Q3Rally Code Start // Q3Rally Code Start
#define MAX_SIGILS 3 #define MAX_SIGILS 5
typedef enum _sigil_status { typedef enum _sigil_status {
SIGIL_ISWHITE = 0, SIGIL_ISWHITE = 0,

View file

@ -122,7 +122,7 @@ q3rallycode
engine\code\botlib\l_utils.h engine\code\botlib\l_utils.h
engine\code\botlib\lcc.mak engine\code\botlib\lcc.mak
engine\code\botlib\linux-i386.mak engine\code\botlib\linux-i386.mak
-cgame +cgame
engine\code\cgame\cg_atmospheric.c engine\code\cgame\cg_atmospheric.c
engine\code\cgame\cg_consolecmds.c engine\code\cgame\cg_consolecmds.c
engine\code\cgame\cg_draw.c engine\code\cgame\cg_draw.c
@ -192,7 +192,7 @@ q3rallycode
engine\code\client\snd_openal.c engine\code\client\snd_openal.c
engine\code\client\snd_public.h engine\code\client\snd_public.h
engine\code\client\snd_wavelet.c engine\code\client\snd_wavelet.c
+game -game
engine\code\game\ai_chat.c engine\code\game\ai_chat.c
engine\code\game\ai_chat.h engine\code\game\ai_chat.h
engine\code\game\ai_cmd.c engine\code\game\ai_cmd.c
@ -886,21 +886,21 @@ 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_client.c 1=engine\code\q3_ui\ui_playersettings.c
2=engine\code\game\g_missile.c 2=engine\code\cgame\cg_draw.c
3=engine\code\game\g_weapon.c 3=engine\code\cgame\cg_local.h
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\qcommon\q_shared.h
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=55 TopLine=51
Caret=36,70 Caret=36,70
[engine\code\game\g_client.c] [engine\code\q3_ui\ui_playersettings.c]
TopLine=1651 TopLine=303
Caret=9,1672 Caret=1,311
[engine\code\game\g_missile.c] [engine\code\cgame\cg_draw.c]
TopLine=15 TopLine=547
Caret=27,34 Caret=2,570
[engine\code\game\g_weapon.c] [engine\code\cgame\cg_local.h]
TopLine=734 TopLine=1352
Caret=27,742 Caret=1,1368