mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-21 19:41:36 +00:00
removed the odd domination gametype. will add a better one.
This commit is contained in:
parent
d95bb06399
commit
a6c8d82748
11 changed files with 38 additions and 175 deletions
|
@ -738,10 +738,6 @@ static void CG_DrawRallyStatusBar( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
// draw the dtf sigils
|
||||
|
||||
// if ( cgs.gametype == GT_DOMINATION )
|
||||
// CG_DrawSigilHUD();
|
||||
|
||||
cent = &cg_entities[cg.snap->ps.clientNum];
|
||||
ps = &cg.snap->ps;
|
||||
|
@ -3154,93 +3150,6 @@ static void CG_DrawWarmup( void ) {
|
|||
// Q3Rally Code END
|
||||
|
||||
|
||||
//=======================================
|
||||
//CG_DrawSigilLocationInfo
|
||||
//=======================================
|
||||
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;
|
||||
vec3_t temp, angles;
|
||||
VectorSubtract(origin, target, temp);
|
||||
distance=VectorLength(temp);
|
||||
VectorNormalize(temp);
|
||||
vectoangles(temp,angles);
|
||||
|
||||
angles[YAW]=AngleSubtract(cg.snap->ps.viewangles[YAW],angles[YAW]);
|
||||
angle=(angles[YAW] + 180.0f)/360.0f;
|
||||
angle -=0.25;
|
||||
angle *= (2*M_PI);
|
||||
w=sqrt((w*w)+(h*h));
|
||||
x +=cos(angle)*w;
|
||||
y +=sin(angle)*w;
|
||||
|
||||
if (x<15)
|
||||
x=15;
|
||||
else {
|
||||
|
||||
if (x>605)
|
||||
x=605;
|
||||
}
|
||||
if (y<20)
|
||||
y=20;
|
||||
else
|
||||
{
|
||||
if (y>440)
|
||||
y=440;
|
||||
}
|
||||
CG_DrawPic( x, y, 20, 20, shader );
|
||||
CG_DrawStringExt( x-50, y+20, va("%10.2f",distance/100.0), color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 );
|
||||
}
|
||||
|
||||
//=======================================
|
||||
//CG_DrawSigilLocations
|
||||
//=======================================
|
||||
static void CG_DrawSigilLocations( void ) {
|
||||
snapshot_t *snap;
|
||||
int i;
|
||||
vec3_t origin, end;
|
||||
int redSigil, blueSigil, whiteSigil;
|
||||
|
||||
if ( cgs.gametype != GT_DOMINATION)
|
||||
return;
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR )
|
||||
return;
|
||||
|
||||
if ( cg.nextSnap && (!cg.nextFrameTeleport && !cg.thisFrameTeleport))
|
||||
|
||||
snap = cg.nextSnap;
|
||||
else
|
||||
snap = cg.snap;
|
||||
|
||||
VectorCopy(cg.snap->ps.origin,origin);
|
||||
redSigil = ITEM_INDEX( BG_FindItemForPowerup( PW_SIGILRED ) );
|
||||
blueSigil = ITEM_INDEX( BG_FindItemForPowerup( PW_SIGILBLUE ) );
|
||||
whiteSigil = ITEM_INDEX( BG_FindItemForPowerup( PW_SIGILWHITE ) );
|
||||
|
||||
for ( i = 0; i < snap->numEntities; i++ )
|
||||
{
|
||||
|
||||
centity_t *target = &cg_entities[snap->entities[i].number];
|
||||
if (target->currentState.eType != ET_ITEM)
|
||||
continue;
|
||||
|
||||
if ( target->currentState.modelindex != redSigil && target->currentState.modelindex != blueSigil && target->currentState.modelindex != whiteSigil )
|
||||
continue;
|
||||
|
||||
VectorCopy(target->lerpOrigin,end);
|
||||
|
||||
if (target->currentState.modelindex == redSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.redFlagShader[0], colorRed);
|
||||
|
||||
else if (target->currentState.modelindex == blueSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.blueFlagShader[0], colorBlue);
|
||||
|
||||
else if (target->currentState.modelindex == whiteSigil)
|
||||
CG_DrawSigilLocationInfo(origin, end, cgs.media.sigilShader, colorWhite);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//==================================================================================
|
||||
|
|
|
@ -731,7 +731,7 @@ static void CG_RegisterSounds( void ) {
|
|||
cgs.media.takenYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_yourteam.wav", qtrue );
|
||||
cgs.media.takenOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_opponent.wav", qtrue );
|
||||
|
||||
if ( cgs.gametype == GT_CTF || cgs.gametype == GT_DOMINATION || cg_buildScript.integer ) {
|
||||
if ( cgs.gametype == GT_CTF || cg_buildScript.integer ) {
|
||||
cgs.media.redFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/voc_red_returned.wav", qtrue );
|
||||
cgs.media.blueFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/voc_blue_returned.wav", qtrue );
|
||||
cgs.media.enemyTookYourFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_flag.wav", qtrue );
|
||||
|
@ -1099,7 +1099,7 @@ static void CG_RegisterGraphics( void ) {
|
|||
#ifdef MISSIONPACK
|
||||
if ( cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF || cgs.gametype == GT_HARVESTER || cg_buildScript.integer ) {
|
||||
#else
|
||||
if ( cgs.gametype == GT_CTF || cgs.gametype == GT_DOMINATION || cg_buildScript.integer ) {
|
||||
if ( cgs.gametype == GT_CTF || cg_buildScript.integer ) {
|
||||
#endif
|
||||
cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/r_flag.md3" );
|
||||
cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/b_flag.md3" );
|
||||
|
|
|
@ -1222,7 +1222,6 @@ const char *CG_GameTypeString() {
|
|||
return "Team Deathmatch";
|
||||
} else if ( cgs.gametype == GT_CTF ) {
|
||||
return "Capture the Flag";
|
||||
} else if ( cgs.gametype == GT_DOMINATION ) {
|
||||
} else if ( cgs.gametype == GT_1FCTF ) {
|
||||
return "One Flag CTF";
|
||||
} else if ( cgs.gametype == GT_OBELISK ) {
|
||||
|
|
|
@ -467,7 +467,6 @@ qboolean CG_DrawHUD( void ) {
|
|||
case GT_DEATHMATCH:
|
||||
case GT_TEAM:
|
||||
case GT_CTF:
|
||||
case GT_DOMINATION:
|
||||
CG_DrawHUD_Scores(264, 130);
|
||||
|
||||
break;
|
||||
|
|
|
@ -1375,7 +1375,7 @@ void ClientSpawn(gentity_t *ent) {
|
|||
// END
|
||||
spawnPoint = SelectSpectatorSpawnPoint (
|
||||
spawn_origin, spawn_angles);
|
||||
} else if ( (g_gametype.integer == GT_DOMINATION && g_dominationSpawnStyle.integer == 1) || (g_gametype.integer >= GT_CTF && g_gametype.integer != GT_DOMINATION ) ) {
|
||||
} else if ( (g_gametype.integer >= GT_CTF) ) {
|
||||
// all base oriented team games use the CTF spawn points
|
||||
spawnPoint = SelectCTFSpawnPoint (
|
||||
client->sess.sessionTeam,
|
||||
|
|
|
@ -344,8 +344,6 @@ starts "10"
|
|||
Com_sprintf( string, sizeof(string), "{\nmap \"%s\"\nlongname \"%s\"\nfraglimit %i\ntype \"q3r_derby\"\nstarts \"%i\"\nobserverspots \"%i\"\nweapons \"%i\"\npowerups \"%i\"\n}\n", Info_ValueForKey( serverinfo, "mapname" ), longname, g_fraglimit.integer, numSpawnPoints, numObserverSpots, numWeapons, numPowerups);
|
||||
else if ( g_gametype.integer == GT_CTF )
|
||||
Com_sprintf( string, sizeof(string), "{\nmap \"%s\"\nlongname \"%s\"\nfraglimit %i\ntype \"q3r_ctf\"\nstarts \"%i\"\nobserverspots \"%i\"\nweapons \"%i\"\npowerups \"%i\"\n}\n", Info_ValueForKey( serverinfo, "mapname" ), longname, g_fraglimit.integer, numSpawnPoints, numObserverSpots, numWeapons, numPowerups);
|
||||
else if ( g_gametype.integer == GT_DOMINATION )
|
||||
Com_sprintf( string, sizeof(string), "{\nmap \"%s\"\nlongname \"%s\"\nfraglimit %i\ntype \"q3r_dom\"\nstarts \"%i\"\nobserverspots \"%i\"\nweapons \"%i\"\npowerups \"%i\"\n}\n", Info_ValueForKey( serverinfo, "mapname" ), longname, g_fraglimit.integer, numSpawnPoints, numObserverSpots, numWeapons, numPowerups);
|
||||
else if ( g_gametype.integer == GT_DEATHMATCH || g_gametype.integer == GT_TEAM )
|
||||
Com_sprintf( string, sizeof(string), "{\nmap \"%s\"\nlongname \"%s\"\nfraglimit %i\ntype \"q3r_dm q3r_team\"\nstarts \"%i\"\nobserverspots \"%i\"\nweapons \"%i\"\npowerups \"%i\"\n}\n", Info_ValueForKey( serverinfo, "mapname" ), longname, g_fraglimit.integer, numSpawnPoints, numObserverSpots, numWeapons, numPowerups);
|
||||
else
|
||||
|
|
|
@ -340,14 +340,6 @@ qboolean G_CallSpawn( gentity_t *ent ) {
|
|||
return qfalse;
|
||||
}
|
||||
|
||||
// Q3Rally Code Start
|
||||
if (g_gametype.integer == GT_DOMINATION)
|
||||
{
|
||||
RegisterItem(BG_FindItemForPowerup(PW_SIGILWHITE));
|
||||
RegisterItem(BG_FindItemForPowerup(PW_SIGILRED));
|
||||
RegisterItem(BG_FindItemForPowerup(PW_SIGILBLUE));
|
||||
}
|
||||
// Q3Rally Code END
|
||||
|
||||
// check item spawn functions
|
||||
for ( item=bg_itemlist+1 ; item->classname ; item++ ) {
|
||||
|
@ -362,11 +354,6 @@ qboolean G_CallSpawn( gentity_t *ent ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( item->giType == IT_TEAM && g_gametype.integer == GT_DOMINATION ) {
|
||||
item = BG_FindItemForPowerup(PW_SIGILWHITE);
|
||||
ent->classname = item->classname;
|
||||
ent->r.svFlags = SVF_BROADCAST;
|
||||
}
|
||||
|
||||
G_SpawnItem( ent, item );
|
||||
return qtrue;
|
||||
|
|
|
@ -693,11 +693,6 @@ static void ArenaServers_UpdateMenu( void ) {
|
|||
}
|
||||
break;
|
||||
|
||||
case GAMES_DOMINATION:
|
||||
if( servernodeptr->gametype != GT_DOMINATION ) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -149,8 +149,8 @@ static const char *gametype_items[] = {
|
|||
|
||||
// STONELANCE
|
||||
// gametype_items[gametype_remap2[s_serveroptions.gametype]]
|
||||
static int gametype_remap[] = {GT_RACING, GT_RACING_DM, GT_DERBY, GT_DEATHMATCH, GT_TEAM, GT_TEAM_RACING, GT_TEAM_RACING_DM, GT_CTF, GT_DOMINATION};
|
||||
static int gametype_remap2[] = {0, 1, 0, 2, 3, 4, 5, 6, 7, 8};
|
||||
static int gametype_remap[] = {GT_RACING, GT_RACING_DM, GT_DERBY, GT_DEATHMATCH, GT_TEAM, GT_TEAM_RACING, GT_TEAM_RACING_DM, GT_CTF};
|
||||
static int gametype_remap2[] = {0, 1, 0, 2, 3, 4, 5, 6, 7};
|
||||
|
||||
int allowLength[3];
|
||||
int reversable;
|
||||
|
@ -422,11 +422,7 @@ static int GametypeBits( char *string ) {
|
|||
bits |= 1 << GT_CTF;
|
||||
continue;
|
||||
}
|
||||
|
||||
if( Q_stricmp( token, "q3r_dom" ) == 0 ) {
|
||||
bits |= 1 << GT_DOMINATION;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return bits;
|
||||
|
@ -1456,13 +1452,6 @@ static void ServerOptions_Start( void ) {
|
|||
trap_Cvar_SetValue( "ui_ctf_friendlt", friendlyfire );
|
||||
break;
|
||||
|
||||
case GT_DOMINATION:
|
||||
trap_Cvar_SetValue ("g_dominationSpawnStyle", Com_Clamp( 0, dominationSpawnStyle, dominationSpawnStyle ) );
|
||||
trap_Cvar_SetValue ("cg_sigilLocator", Com_Clamp( 1, sigillocator, sigillocator) );
|
||||
trap_Cvar_SetValue( "fraglimit", fraglimit );
|
||||
trap_Cvar_SetValue( "timelimit", timelimit );
|
||||
trap_Cvar_SetValue( "friendlt", friendlyfire );
|
||||
break;
|
||||
}
|
||||
|
||||
trap_Cvar_SetValue( "sv_maxclients", Com_Clamp( 0, 12, maxclients ) );
|
||||
|
@ -2243,9 +2232,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
|||
s_serveroptions.fraglimit.field.widthInChars = 3;
|
||||
s_serveroptions.fraglimit.field.maxchars = 3;
|
||||
}
|
||||
else if( s_serveroptions.gametype != GT_CTF && s_serveroptions.gametype != GT_DOMINATION ) {
|
||||
// if( s_serveroptions.gametype != GT_CTF ) {
|
||||
// END
|
||||
if( s_serveroptions.gametype != GT_CTF ) {
|
||||
s_serveroptions.fraglimit.generic.type = MTYPE_FIELD;
|
||||
s_serveroptions.fraglimit.generic.name = "Frag Limit:";
|
||||
s_serveroptions.fraglimit.generic.flags = QMF_NUMBERSONLY|QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
||||
|
@ -2356,23 +2343,6 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
|||
s_serveroptions.hostname.field.maxchars = 64;
|
||||
}
|
||||
|
||||
if (s_serveroptions.gametype == GT_DOMINATION) {
|
||||
y += BIGCHAR_HEIGHT+2;
|
||||
s_serveroptions.dominationSpawnStyle.generic.type = MTYPE_SPINCONTROL;
|
||||
s_serveroptions.dominationSpawnStyle.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
||||
s_serveroptions.dominationSpawnStyle.generic.x = OPTIONS_X;
|
||||
s_serveroptions.dominationSpawnStyle.generic.y = y;
|
||||
s_serveroptions.dominationSpawnStyle.generic.name = "Spawn Style:";
|
||||
s_serveroptions.dominationSpawnStyle.itemnames = dtfspawn_list;
|
||||
|
||||
y += BIGCHAR_HEIGHT+2;
|
||||
s_serveroptions.sigillocator.generic.type = MTYPE_RADIOBUTTON;
|
||||
s_serveroptions.sigillocator.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
||||
s_serveroptions.sigillocator.generic.x = OPTIONS_X;
|
||||
s_serveroptions.sigillocator.generic.y = y;
|
||||
s_serveroptions.sigillocator.generic.name = "Flag Locator:";
|
||||
}
|
||||
|
||||
y = 80;
|
||||
s_serveroptions.botSkill.generic.type = MTYPE_SPINCONTROL;
|
||||
s_serveroptions.botSkill.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
||||
|
@ -2502,7 +2472,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
|||
// STONELANCE
|
||||
if( s_serveroptions.gametype != GT_DERBY ) {
|
||||
// END
|
||||
if( s_serveroptions.gametype != GT_CTF && s_serveroptions.gametype != GT_DOMINATION ) {
|
||||
if( s_serveroptions.gametype != GT_CTF ) {
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.fraglimit );
|
||||
}
|
||||
else {
|
||||
|
@ -2579,11 +2549,6 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
|||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.hostname );
|
||||
}
|
||||
|
||||
if (s_serveroptions.gametype == GT_DOMINATION) {
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.dominationSpawnStyle );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.sigillocator );
|
||||
}
|
||||
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.back );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.go );
|
||||
|
||||
|
|
|
@ -614,11 +614,6 @@ static void ArenaServers_UpdateMenu( void ) {
|
|||
}
|
||||
break;
|
||||
|
||||
case GAMES_DOMINATION:
|
||||
if( servernodeptr->gametype != GT_DOMINATION ) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if( servernodeptr->pingtime < servernodeptr->minPing ) {
|
||||
|
|
|
@ -866,18 +866,22 @@ q3rallycode
|
|||
10=engine\code\q3_ui\ui_rally_servers.c
|
||||
11=engine\code\q3_ui\ui_rally_startserver.c
|
||||
12=engine\code\q3_ui\ui_servers2.c
|
||||
13=engine\code\cgame\cg_newdraw.c
|
||||
14=engine\code\cgame\cg_rally_hud2.c
|
||||
15=engine\code\game\g_client.c
|
||||
16=engine\code\game\g_rally_tools.c
|
||||
[Selected Project Files]
|
||||
Main=
|
||||
Selected=engine\code\q3_ui\ui_servers2.c
|
||||
Selected=engine\code\q3_ui\ui_rally_startserver.c
|
||||
[engine\code\cgame\cg_draw.c]
|
||||
TopLine=535
|
||||
Caret=1,537
|
||||
TopLine=3133
|
||||
Caret=1,3153
|
||||
[engine\code\cgame\cg_local.h]
|
||||
TopLine=1264
|
||||
Caret=20,1277
|
||||
[engine\code\cgame\cg_main.c]
|
||||
TopLine=2131
|
||||
Caret=22,2143
|
||||
TopLine=1088
|
||||
Caret=30,1102
|
||||
[engine\code\cgame\cg_servercmds.c]
|
||||
TopLine=396
|
||||
Caret=1,407
|
||||
|
@ -888,10 +892,10 @@ Caret=1,892
|
|||
TopLine=797
|
||||
Caret=1,806
|
||||
[engine\code\game\g_spawn.c]
|
||||
TopLine=482
|
||||
Caret=128,496
|
||||
TopLine=345
|
||||
Caret=1,356
|
||||
[engine\code\game\g_team.c]
|
||||
TopLine=727
|
||||
TopLine=899
|
||||
Caret=1,939
|
||||
[engine\code\cgame\cg_info.c]
|
||||
TopLine=254
|
||||
|
@ -900,11 +904,23 @@ Caret=1,266
|
|||
TopLine=140
|
||||
Caret=60,153
|
||||
[engine\code\q3_ui\ui_rally_servers.c]
|
||||
TopLine=1280
|
||||
Caret=25,1290
|
||||
TopLine=683
|
||||
Caret=17,695
|
||||
[engine\code\q3_ui\ui_rally_startserver.c]
|
||||
TopLine=133
|
||||
Caret=21,146
|
||||
TopLine=2538
|
||||
Caret=3,2550
|
||||
[engine\code\q3_ui\ui_servers2.c]
|
||||
TopLine=1191
|
||||
Caret=4,1203
|
||||
TopLine=604
|
||||
Caret=3,616
|
||||
[engine\code\cgame\cg_newdraw.c]
|
||||
TopLine=1211
|
||||
Caret=33,1218
|
||||
[engine\code\cgame\cg_rally_hud2.c]
|
||||
TopLine=456
|
||||
Caret=14,469
|
||||
[engine\code\game\g_client.c]
|
||||
TopLine=1364
|
||||
Caret=43,1378
|
||||
[engine\code\game\g_rally_tools.c]
|
||||
TopLine=333
|
||||
Caret=314,346
|
||||
|
|
Loading…
Reference in a new issue