Pushing local edits

This commit is contained in:
eukos 2015-07-24 20:59:47 +02:00
parent c29849f137
commit dd26acb610
3 changed files with 77 additions and 50 deletions

View file

@ -153,18 +153,18 @@ void BotInit (void)
for (i=0, client=svs.clients; i<svs.maxclients; i++, client++) // Keep looping as long as there are clients
{
globot.MaxClients++; // Increase MaxClients with 1
globot.MaxClients++; // Increase MaxClients with 1
client->edict->bot.ClientNo = -1; // We dont want anyone to have a client number until they have connected
client->edict->bot.menudone = false; // Of course we have not gone past the Team Fortress menu yet
client->edict->bot.Active = false; // Of course noone is active... the game havent started yet :)
client->edict->bot.isbot = false; // And noone is a bot either... or human...
client->edict->bot.ClientNo = -1; // We dont want anyone to have a client number until they have connected
client->edict->bot.menudone = false;// Of course we have not gone past the Team Fortress menu yet
client->edict->bot.Active = false;// Of course noone is active... the game havent started yet :)
client->edict->bot.isbot = false;// And noone is a bot either... or human...
}
for (i=1; i<16; i++)
globot.botactive[i] = false;
if (globot.MaxClients > 16) // We dont allow more then 16 players right now
if (globot.MaxClients > 16) // We dont allow more then 16 players right now
globot.MaxClients = 16;
}
@ -231,11 +231,11 @@ void BotConnect (client_t *client, int ClientNo, int color, char *name)
edict_t *bot = client->edict;
int randombot;
bot->bot.isbot = true; // And yes this is a bot
bot->bot.Active = true; // and hes active
bot->bot.enemy = bot; // Now why is he chasing himself?
bot->bot.isbot = true; // And yes this is a bot
bot->bot.Active = true; // and hes active
bot->bot.enemy = bot; // Now why is he chasing himself?
bot->bot.connecttime = sv.time;
bot->bot.ClientNo = ClientNo; // Now we get a clientnumber
bot->bot.ClientNo = ClientNo; // Now we get a clientnumber
randombot = ceil (RandomRange (0, 15));
@ -251,29 +251,29 @@ void BotConnect (client_t *client, int ClientNo, int color, char *name)
if (color != 666)
{
client->colors = color * 14 + color; // The bot must have a color
bot->v.team = color + 1; // And to be in a team
client->colors = color * 14 + color; // The bot must have a color
bot->v.team = color + 1; // And to be in a team
}
else
{
client->colors = randombot * 14 + randombot; // The bot must have a color
bot->v.team = randombot + 1; // And to be in a team
client->colors = randombot * 14 + randombot; // The bot must have a color
bot->v.team = randombot + 1; // And to be in a team
}
client->old_frags = 0; // And since he just joined he cant have got any frags yet
client->old_frags = 0; // And since he just joined he cant have got any frags yet
bot->v.colormap = ClientNo; // Without this he wont be using any colored clothes
bot->v.colormap = ClientNo; // Without this he wont be using any colored clothes
bot->v.netname = client->name - pr_strings; // Everyone wants a name
UpdateClient (client, ClientNo); // Update the scoreboard
UpdateClient (client, ClientNo); // Update the scoreboard
pr_global_struct->self = EDICT_TO_PROG(bot); // Update the QC self to be the bot
pr_global_struct->self = EDICT_TO_PROG(bot); // Update the QC self to be the bot
PR_ExecuteProgram (pr_global_struct->SetNewParms); // Now call some QC functions
PR_ExecuteProgram (pr_global_struct->SetNewParms); // Now call some QC functions
PR_ExecuteProgram (pr_global_struct->ClientConnect); // Now call some more QC functions
PR_ExecuteProgram (pr_global_struct->PutClientInServer); // Now call yet some more QC functions
pr_global_struct->self = EDICT_TO_PROG (self); // Get back to the backup
pr_global_struct->self = EDICT_TO_PROG (self); // Get back to the backup
}
@ -292,11 +292,11 @@ void LoserConnect (client_t *client, int ClientNo, int color, char *name)
edict_t *bot = client->edict;
int randombot;
splitmeup = 2;
bot->bot.isbot = 35; // And yes this is a human who ignores some builtins
bot->bot.Active = true; // and hes active
bot->bot.enemy = bot; // Now why is he chasing himself?
bot->bot.isbot = 35; // And yes this is a human who ignores some builtins
bot->bot.Active = true; // and hes active
bot->bot.enemy = bot; // Now why is he chasing himself?
bot->bot.connecttime = sv.time;
bot->bot.ClientNo = ClientNo; // Now we get a clientnumber
bot->bot.ClientNo = ClientNo;// Now we get a clientnumber
randombot = ceil (RandomRange (0, 15));
@ -312,28 +312,28 @@ void LoserConnect (client_t *client, int ClientNo, int color, char *name)
if (color != 666)
{
client->colors = color * 16 + color; // The bot must have a color
bot->v.team = color + 1; // And to be in a team
client->colors = color * 16 + color; // The bot must have a color
bot->v.team = color + 1; // And to be in a team
}
else
{
client->colors = randombot * 16 + randombot; // The bot must have a color
bot->v.team = randombot + 1; // And to be in a team
client->colors = randombot * 16 + randombot; // The bot must have a color
bot->v.team = randombot + 1; // And to be in a team
}
client->old_frags = 0; // And since he just joined he cant have got any frags yet
client->old_frags = 0; // And since he just joined he cant have got any frags yet
bot->v.colormap = ClientNo; // Without this he wont be using any colored clothes
bot->v.netname = client->name - pr_strings; // Everyone wants a name
bot->v.colormap = ClientNo; // Without this he wont be using any colored clothes
bot->v.netname = client->name - pr_strings; // Everyone wants a name
UpdateClient (client, ClientNo); // Update the scoreboard
UpdateClient (client, ClientNo);// Update the scoreboard
pr_global_struct->self = EDICT_TO_PROG(bot); // Update the QC self to be the bot
pr_global_struct->self = EDICT_TO_PROG(bot); // Update the QC self to be the bot
PR_ExecuteProgram (pr_global_struct->SetNewParms); // Now call some QC functions
PR_ExecuteProgram (pr_global_struct->SetNewParms); // Now call some QC functions
PR_ExecuteProgram (pr_global_struct->ClientConnect); // Now call some more QC functions
PR_ExecuteProgram (pr_global_struct->PutClientInServer); // Now call yet some more QC functions
pr_global_struct->self = EDICT_TO_PROG (self); // Get back to the backup
pr_global_struct->self = EDICT_TO_PROG (self); // Get back to the backup
splitplayer = client;
}
/*
@ -737,4 +737,4 @@ void Bot_Init (void)
Cmd_AddCommand ("addbot", NextFreeClient);
Cmd_AddCommand ("addburp", NextFreeLoser);
}
#endif
#endif

View file

@ -1208,7 +1208,7 @@ void D_PolysetDrawSpans8_C (spanpackage_t *pspanpackage)
int dodith, doshine;
int s, t;
int s2, t2;
#ifdef linux
#ifdef linux // for now
if (coloredmethod == 1){
D_PolysetDrawSpans8_Low_C (pspanpackage);
return;
@ -1525,10 +1525,10 @@ void D_PolysetDrawSpans8_Low_C (spanpackage_t *pspanpackage)
float bhad = 1;
int ta, te, tv;
int dith, det; // leilei - shading dither
int dodith;
int dodith, doshine;
int s, t;
dodith = r_shadedither->value;
doshine = r_shinygrays->value;
if (currententity->effects & EF_NODRAW || currententity->leifect)
return; // haha don't do it
det = 0;
@ -1624,10 +1624,17 @@ void D_PolysetDrawSpans8_Low_C (spanpackage_t *pspanpackage)
llightrgb[0] = smoothtable[llightrgbd[0]][det];
llightrgb[1] = smoothtable[llightrgbd[1]][det];
llightrgb[2] = smoothtable[llightrgbd[2]][det];
}
// metal shine...
// Shine crap
if ((doshine == 2)&& *lptex < 16){
int ti;
llightrgb[0] &= 0xAF00;
llightrgb[1] &= 0xAF00;
llightrgb[2] &= 0xAF00;
llight &= 0xAF00;
}
/*
// *lpdest = palmap2[trans[0]][trans[1]][trans[2]];
*lpdest = *(lptex + idiths + iditht);
@ -1657,9 +1664,9 @@ void D_PolysetDrawSpans8_Low_C (spanpackage_t *pspanpackage)
// TODO FIXME: colored light vectors similar to dp105/q3
{
trans[0] = (pix24[0] * (16384 - shad - llightrgb[0])) >> 15;
trans[1] = (pix24[1] * (16384 - shad - llightrgb[1])) >> 15;
trans[2] = (pix24[2] * (16384 - shad - llightrgb[2])) >> 15; if (trans[0] & ~63) trans[0] = 63; if (trans[1] & ~63) trans[1] = 63; if (trans[2] & ~63) trans[2] = 63;
// 18-Bit lighting - Alpha Blending
if (currententity->alpha){
if (currententity->alpha < 0.33)
@ -1720,7 +1727,8 @@ void D_PolysetDrawSpans8_Low_C (spanpackage_t *pspanpackage)
*lpz = lzi >> 16;
}
if (doshine == 1 && *lptex < 16 )
*lpdest= ((byte *)acolormap)[*lpdest + (llight & 0xAF00)];
}
// -------------------------------------------------
// Big FAT BLENDING ROUTINES End
@ -1785,8 +1793,6 @@ void D_PolysetDrawSpans8_Low_C (spanpackage_t *pspanpackage)
} while (pspanpackage->count != -999999);
}
void D_PolysetDrawSpans8_C_Dither (spanpackage_t *pspanpackage)
{
int lcount;

View file

@ -110,8 +110,29 @@ void Sys_Printf (char *fmt, ...)
static char end1[] =
"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE: The Doomed Dimension \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ---------------------------------------------------------------------------- \x1b[3;1H CALL 1-800-IDGAMES TO ORDER OR FOR TECHNICAL SUPPORT \x1b[4;1H PRICE: $45.00 (PRICES MAY VARY OUTSIDE THE US.) \x1b[5;1H \x1b[6;1H \x1b[37mYes! You only have one fourth of this incredible epic. That is because most \x1b[7;1H of you have paid us nothing or at most, very little. You could steal the \x1b[8;1H game from a friend. But we both know you'll be punished by God if you do. \x1b[9;1H \x1b[33mWHY RISK ETERNAL DAMNATION? CALL 1-800-IDGAMES AND BUY NOW! \x1b[10;1H \x1b[37mRemember, we love you almost as much as He does. \x1b[11;1H \x1b[12;1H \x1b[33mProgramming: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[13;1H \x1b[33mDesign: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[14;1H \x1b[33mArt: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[15;1H \x1b[33mBiz: \x1b[37mJay Wilbur, Mike Wilson, Donna Jackson \x1b[16;1H \x1b[33mProjects: \x1b[37mShawn Green \x1b[33mSupport: \x1b[37mBarrett Alexander \x1b[17;1H \x1b[33mSound Effects: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[18;1H For other information or details on ordering outside the US, check out the \x1b[19;1H files accompanying QUAKE or our website at http://www.idsoftware.com. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. NIN logo is a registered trademark licensed to \x1b[22;1H Nothing Interactive, Inc. All rights reserved. \x1b[40m\x1b[23;1H\x1b[0m";
static char end2[] =
"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ----------------------------------------------------------------------------- \x1b[3;1H \x1b[37mWhy did you quit from the registered version of QUAKE? Did the \x1b[4;1H scary monsters frighten you? Or did Mr. Sandman tug at your \x1b[5;1H little lids? No matter! What is important is you love our \x1b[6;1H game, and gave us your money. Congratulations, you are probably \x1b[7;1H not a thief. \x1b[8;1H Thank You. \x1b[9;1H \x1b[33;44mid\x1b[41m Software is: \x1b[10;1H PROGRAMMING: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[11;1H \x1b[33mDESIGN: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[12;1H \x1b[33mART: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[13;1H \x1b[33mBIZ: \x1b[37mJay Wilbur, Mike Wilson \x1b[33mPROJECTS MAN: \x1b[37mShawn Green \x1b[14;1H \x1b[33mBIZ ASSIST: \x1b[37mDonna Jackson \x1b[33mSUPPORT: \x1b[37mBarrett Alexander \x1b[15;1H \x1b[33mSOUND EFFECTS AND MUSIC: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[16;1H \x1b[17;1H If you need help running QUAKE refer to the text files in the \x1b[18;1H QUAKE directory, or our website at http://www.idsoftware.com. \x1b[19;1H If all else fails, call our technical support at 1-800-IDGAMES. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. NIN logo is a registered trademark licensed \x1b[22;1H to Nothing Interactive, Inc. All rights reserved. \x1b[23;1H\x1b[40m\x1b[0m";
static char end2[] = "\x1b[0;1;46m\x1b[1;1H\
ENGOO \x1b[37mversion 2.78 \n\
\x1b[33m================================================================================\n\
\n\
\x1b[37mBased on QIP Engine by Maddes \n\
\n\
\n\
\x1b[33mProgramming by Linux port by \n\
\x1b[37mleilei eukara \n\
\n\
\x1b[33mLOTS of HELP from \n\
\x1b[37mLordHavoc - Lighting \n\
Spike - Memory \n\
Fitz - Fog \n\
Qbism - Optimizations \n\
Mankrip - Optimizations \n\
Andrewj - Dithering \n\
Tomaz - Snow/Rain and Bots \n\
MH - Vid code /interpolation \n\
Siggi - 2D Scaling \n\
Taniwha - Aspect \n\
\x1b[33m This engine is licensed under the \n\
GNU GPL v2. Read COPYING for more. \n\e[0m";
void Sys_Quit (void)