vec3_t origin, entmins, entmaxs;
matrix4x4_t entmatrix, entinversematrix;
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
// don't hit network players, if we are a nonsolid player
if(cl.scores[cl.playerentity-1].frags == -666 || cl.scores[cl.playerentity-1].frags == -616)
if (!cl.scores[i-1].name[0])
continue;
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
// don't hit spectators or nonsolid players
if(cl.scores[i-1].frags == -666 || cl.scores[i-1].frags == -616)
vec3_t origin, entmins, entmaxs;
matrix4x4_t entmatrix, entinversematrix;
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
// don't hit network players, if we are a nonsolid player
if(cl.scores[cl.playerentity-1].frags == -666 || cl.scores[cl.playerentity-1].frags == -616)
if (!cl.scores[i-1].name[0])
continue;
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
// don't hit spectators or nonsolid players
if(cl.scores[i-1].frags == -666 || cl.scores[i-1].frags == -616)
vec3_t origin, entmins, entmaxs;
matrix4x4_t entmatrix, entinversematrix;
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
// don't hit network players, if we are a nonsolid player
if(cl.scores[cl.playerentity-1].frags == -666 || cl.scores[cl.playerentity-1].frags == -616)
if (!cl.scores[i-1].name[0])
continue;
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
// don't hit spectators or nonsolid players
if(cl.scores[i-1].frags == -666 || cl.scores[i-1].frags == -616)
s->velocity[2] = 80;
else
{
- if (gamemode == GAME_NEXUIZ)
+ if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
s->velocity[2] = 200;
else
s->velocity[2] = 100;
break;
case PROTOCOL_DARKPLACES6:
case PROTOCOL_DARKPLACES7:
- // FIXME: cl.cmd.buttons & 16 is +button5, Nexuiz specific
+ // FIXME: cl.cmd.buttons & 16 is +button5, Nexuiz/Xonotic specific
cl.cmd.crouch = (cl.cmd.buttons & 16) != 0;
break;
case PROTOCOL_UNKNOWN:
cl.entities[i].state_current = defaultstate;
}
- if (gamemode == GAME_NEXUIZ)
+ if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
VectorSet(cl.playerstandmins, -16, -16, -24);
VectorSet(cl.playerstandmaxs, 16, 16, 45);
{
if (e->render.effects & EF_BRIGHTFIELD)
{
- if (gamemode == GAME_NEXUIZ)
+ if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
trailtype = EFFECT_TR_NEXUIZPLASMA;
else
CL_EntityParticles(e);
{
if (e->render.effects & EF_BRIGHTFIELD)
{
- if (gamemode == GAME_NEXUIZ)
+ if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
trailtype = EFFECT_TR_NEXUIZPLASMA;
}
if (e->render.effects & EF_DIMLIGHT)
// finished loading sounds
}
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
Cvar_SetValueQuick(&cl_serverextension_download, false);
- // in Nexuiz, the built in download protocol is kinda broken (misses lots
+ // in Nexuiz/Xonotic, the built in download protocol is kinda broken (misses lots
// of dependencies) anyway, and can mess around with the game directory;
// until this is fixed, only support pk3 downloads via curl, and turn off
// individual file downloads other than for CSQC
- // on the other end of the download protocol, GAME_NEXUIZ enforces writing
+ // on the other end of the download protocol, GAME_NEXUIZ/GAME_XONOTIC enforces writing
// to dlcache only
// idea: support download of pk3 files using this protocol later
// save to disk only if we don't already have it
// (this is mainly for playing back demos)
existingcrc = FS_CRCFile(cls.qw_downloadname, &existingsize);
- if (existingsize || gamemode == GAME_NEXUIZ || !strcmp(cls.qw_downloadname, csqc_progname.string))
- // let csprogs ALWAYS go to dlcache, to prevent "viral csprogs"; also, never put files outside dlcache for Nexuiz
+ if (existingsize || gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC || !strcmp(cls.qw_downloadname, csqc_progname.string))
+ // let csprogs ALWAYS go to dlcache, to prevent "viral csprogs"; also, never put files outside dlcache for Nexuiz/Xonotic
{
if ((int)existingsize != size || existingcrc != crc)
{
if (!scr_initialized || !con_initialized || !scr_refresh.integer)
return; // not initialized yet
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
// play a bit with the palette (experimental)
palette_rgb_pantscolormap[15][0] = (unsigned char) (128 + 127 * sin(cl.time / exp(1.0f) + 0.0f*M_PI/3.0f));
// GAME_NEXUIZ
// COMMANDLINEOPTION: Game: -nexuiz runs the multiplayer game Nexuiz
{ "nexuiz", "-nexuiz", "Nexuiz", "data", NULL, "nexuiz", "nexuiz" },
+// GAME_XONOTIC
+// COMMANDLINEOPTION: Game: -xonotic runs the multiplayer game Xonotic
+{ "xonotic", "-xonotic", "Xonotic", "data", NULL, "xonotic", "xonotic" },
// GAME_TRANSFUSION
// COMMANDLINEOPTION: Game: -transfusion runs Transfusion (the recreation of Blood in Quake)
{ "transfusion", "-transfusion", "Transfusion", "basetf", NULL, "transfusion", "transfusion" },
GAME_BLOODOMNICIDE,
GAME_STEELSTORM, // added by motorsep
GAME_STRAPBOMB, // added by motorsep for Urre
+ GAME_XONOTIC,
GAME_COUNT
}
gamemode_t;
{
if (con_chatsound.value)
{
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
{
if(msg[1] == '\r' && cl.foundtalk2wav)
S_LocalSound ("sound/misc/talk2.wav");
else
{
// default players in some games, singleplayer in most
- if (gamemode != GAME_GOODVSBAD2 && gamemode != GAME_NEXUIZ && gamemode != GAME_BATTLEMECH)
+ if (gamemode != GAME_GOODVSBAD2 && gamemode != GAME_NEXUIZ && gamemode != GAME_XONOTIC && gamemode != GAME_BATTLEMECH)
svs.maxclients = 1;
}
}
Host_Playermodel_f
======================
*/
-cvar_t cl_playermodel = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playermodel", "", "internal storage cvar for current player model in Nexuiz (changed by playermodel command)"};
+cvar_t cl_playermodel = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playermodel", "", "internal storage cvar for current player model in Nexuiz/Xonotic (changed by playermodel command)"};
// the old cl_playermodel in cl_main has been renamed to __cl_playermodel
void Host_Playermodel_f (void)
{
Host_Playerskin_f
======================
*/
-cvar_t cl_playerskin = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playerskin", "", "internal storage cvar for current player skin in Nexuiz (changed by playerskin command)"};
+cvar_t cl_playerskin = {CVAR_SAVE | CVAR_NQUSERINFOHACK, "_cl_playerskin", "", "internal storage cvar for current player skin in Nexuiz/Xonotic (changed by playerskin command)"};
void Host_Playerskin_f (void)
{
int i, j;
#endif
//quality_guess = (100 * jpegsize - 41000) / (width*height) + 2; // fits random data
- quality_guess = (256 * jpegsize - 81920) / (width*height) - 8; // fits Nexuiz's map pictures
+ quality_guess = (256 * jpegsize - 81920) / (width*height) - 8; // fits Nexuiz's/Xonotic's map pictures
quality_guess = bound(0, quality_guess, 100);
quality = bound(0, quality_guess + sv_writepicture_quality.integer, 100); // assume it can do 10 failed attempts
}
}
- if ((gamemode == GAME_NEXUIZ) && (teamplay.integer > 0))
+ if ((gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC) && (teamplay.integer > 0))
{
if(cl->frags == -666) // spectator
strlcpy(teambuf, " 0", sizeof(teambuf));
{
default:
case 1:
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
*unit = "in/s";
else
*unit = "qu/s";
case 2:
*unit = "m/s";
*conversion_factor = 0.0254;
- if(gamemode != GAME_NEXUIZ) *conversion_factor *= 1.5;
- // 1qu=1.5in is for non-Nexuiz only - Nexuiz players are overly large, but 1qu=1in fixes that
+ if(gamemode != GAME_NEXUIZ && gamemode != GAME_XONOTIC) *conversion_factor *= 1.5;
+ // 1qu=1.5in is for non-Nexuiz/Xonotic only - Nexuiz/Xonotic players are overly large, but 1qu=1in fixes that
break;
case 3:
*unit = "km/h";
*conversion_factor = 0.0254 * 3.6;
- if(gamemode != GAME_NEXUIZ) *conversion_factor *= 1.5;
+ if(gamemode != GAME_NEXUIZ && gamemode != GAME_XONOTIC) *conversion_factor *= 1.5;
break;
case 4:
*unit = "mph";
*conversion_factor = 0.0254 * 3.6 * 0.6213711922;
- if(gamemode != GAME_NEXUIZ) *conversion_factor *= 1.5;
+ if(gamemode != GAME_NEXUIZ && gamemode != GAME_XONOTIC) *conversion_factor *= 1.5;
break;
case 5:
*unit = "knots";
*conversion_factor = 0.0254 * 1.943844492; // 1 m/s = 1.943844492 knots, because 1 knot = 1.852 km/h
- if(gamemode != GAME_NEXUIZ) *conversion_factor *= 1.5;
+ if(gamemode != GAME_NEXUIZ && gamemode != GAME_XONOTIC) *conversion_factor *= 1.5;
break;
}
}
// frags
host_client->frags = (int)host_client->edict->fields.server->frags;
- if(gamemode == GAME_NEXUIZ)
+ if(gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
if(!host_client->spawned && host_client->netconnection)
host_client->frags = -666;
if (host_client->old_frags != host_client->frags)