mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1245 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f982323443
commit
fb8ccf22af
8 changed files with 139 additions and 80 deletions
|
@ -15,6 +15,8 @@
|
|||
#include "kplib.h"
|
||||
#include "md4.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
voxmodel_t *voxmodels[MAXVOXELS];
|
||||
int32_t curextra=MAXTILES;
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ void mmulti_initmultiplayers(int32_t argc, char **argv)
|
|||
|
||||
if (!argc)
|
||||
{
|
||||
// initprintf("mmulti_unstable: No configuration file specified!\n");
|
||||
// initprintf("network: No configuration file specified!\n");
|
||||
numplayers = 1; myconnectindex = 0;
|
||||
connecthead = 0; connectpoint2[0] = -1;
|
||||
return;
|
||||
|
@ -954,13 +954,13 @@ static int32_t open_udp_socket(int32_t ip, int32_t port)
|
|||
if (natfree)
|
||||
{
|
||||
//initprintf("Stun is currently %s\n", (natfree) ? "Enabled":"Disabled");
|
||||
initprintf("mmulti_unstable: Stun enabled\n");
|
||||
initprintf("network: Stun enabled\n");
|
||||
}
|
||||
|
||||
udpsocket = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if ((signed)udpsocket == -1)
|
||||
{
|
||||
initprintf("mmulti_unstable: socket creation failed: %s\n", netstrerror());
|
||||
initprintf("network: socket creation failed: %s\n", netstrerror());
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -981,7 +981,7 @@ static int32_t open_udp_socket(int32_t ip, int32_t port)
|
|||
addr.sin_port = htons((uint16_t)port);
|
||||
if (bind(udpsocket, (struct sockaddr *) &addr, sizeof(addr)) == -1)
|
||||
{
|
||||
initprintf("mmulti_unstable: socket binding failed: %s\n", netstrerror());
|
||||
initprintf("network: socket binding failed: %s\n", netstrerror());
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1049,12 +1049,12 @@ static int32_t wait_for_other_players(gcomtype *gcom, int32_t myip)
|
|||
|
||||
if (rc != sizeof(packet))
|
||||
{
|
||||
initprintf("mmulti_unstable: Missized packet or fragment from %s:%i ?!\n", ipstr, port);
|
||||
initprintf("network: Missized packet or fragment from %s:%i ?!\n", ipstr, port);
|
||||
continue;
|
||||
}
|
||||
else if (packet.header != HEADER_PEER_GREETING)
|
||||
{
|
||||
initprintf("mmulti_unstable: Unexpected packet type from %s:%i ?!\n", ipstr, port);
|
||||
initprintf("network: Unexpected packet type from %s:%i ?!\n", ipstr, port);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ static int32_t wait_for_other_players(gcomtype *gcom, int32_t myip)
|
|||
}
|
||||
|
||||
if (i == max)
|
||||
initprintf("mmulti_unstable: Disallowed player %s:%d ?!\n", ipstr, port);
|
||||
initprintf("network: Disallowed player %s:%d ?!\n", ipstr, port);
|
||||
else if (heard_from[i] == 0)
|
||||
{
|
||||
packet.id = B_SWAP16(packet.id);
|
||||
|
@ -1090,7 +1090,7 @@ static int32_t wait_for_other_players(gcomtype *gcom, int32_t myip)
|
|||
|
||||
if (quitevent)
|
||||
{
|
||||
initprintf("Connection attempt aborted.\n");
|
||||
initprintf("network: Connection attempt aborted.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1129,8 +1129,8 @@ static int32_t wait_for_other_players(gcomtype *gcom, int32_t myip)
|
|||
{
|
||||
if (heard_from[i] == heard_from[i+1]) /* blah. */
|
||||
{
|
||||
initprintf("mmulti_unstable: ERROR: Two players have the same random ID!\n");
|
||||
initprintf("mmulti_unstable: ERROR: Please restart the game to generate new IDs.\n");
|
||||
initprintf("network: ERROR: Two players have the same random ID!\n");
|
||||
initprintf("network: ERROR: Please restart the game to generate new IDs.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1179,11 +1179,11 @@ static int32_t wait_for_other_players(gcomtype *gcom, int32_t myip)
|
|||
gcom->myconnectindex = i;
|
||||
}
|
||||
|
||||
initprintf("mmulti_unstable: player #%i at %s:%i\n", i,static_ipstring(ip),allowed_addresses[i].port);
|
||||
initprintf("network: player #%i at %s:%i\n", i,static_ipstring(ip),allowed_addresses[i].port);
|
||||
}
|
||||
// assert(gcom->myconnectindex);
|
||||
|
||||
initprintf("mmulti_unstable: We are player #%i\n", gcom->myconnectindex);
|
||||
initprintf("network: We are player #%i\n", gcom->myconnectindex);
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
@ -1215,12 +1215,12 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
my_id = (uint16_t) rand();
|
||||
}
|
||||
|
||||
initprintf("mmulti_unstable: Using 0x%X as client ID\n", my_id);
|
||||
initprintf("network: Using 0x%X as client ID\n", my_id);
|
||||
|
||||
resendat = getticks();
|
||||
remaining = max = gcom->numplayers - 1;
|
||||
|
||||
initprintf("Waiting for %d player%s...\n", remaining, remaining==1 ? "":"s");
|
||||
initprintf("network: Waiting for %d player%s...\n", remaining, remaining==1 ? "":"s");
|
||||
if (remaining == 0)
|
||||
{
|
||||
initprintf("Hmmm... don't have time to play with myself!\n");
|
||||
|
@ -1240,7 +1240,7 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
//this is where special formatting of allow lines comes in
|
||||
if (!heard_from[i])
|
||||
{
|
||||
initprintf("%s %s:%d...\n",first_send?"Connecting to":"Retrying",
|
||||
initprintf("network: %s %s:%d...\n",first_send?"Connecting to":"Retrying",
|
||||
static_ipstring(allowed_addresses[i].host),allowed_addresses[i].port);
|
||||
|
||||
send_peer_greeting(allowed_addresses[i].host,
|
||||
|
@ -1265,12 +1265,12 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
|
||||
if (rc != sizeof(packet))
|
||||
{
|
||||
initprintf("mmulti_unstable: Missized packet or fragment from %s:%i ?!\n", ipstr, port);
|
||||
initprintf("network: Missized packet or fragment from %s:%i ?!\n", ipstr, port);
|
||||
continue;
|
||||
}
|
||||
else if (packet.header != HEADER_PEER_GREETING)
|
||||
{
|
||||
initprintf("mmulti_unstable: Unexpected packet type from %s:%i ?!\n", ipstr, port);
|
||||
initprintf("network: Unexpected packet type from %s:%i ?!\n", ipstr, port);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1289,9 +1289,9 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
packet.id = B_SWAP16(packet.id);
|
||||
heard_from[i] = packet.id;
|
||||
|
||||
initprintf("Connected to %s:%i\n",
|
||||
initprintf("network: Connected to %s:%i\n",
|
||||
ipstr, (unsigned)port);
|
||||
initprintf("Waiting for server to launch game\n");
|
||||
initprintf("network: Waiting for server to launch game\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1300,7 +1300,7 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
packet.id = B_SWAP16(packet.id);
|
||||
heard_from[i] = packet.id;
|
||||
|
||||
initprintf("New player with id 0x%X\n",
|
||||
initprintf("network: New player with id 0x%X\n",
|
||||
(int32_t) packet.id);
|
||||
gcom->numplayers++;
|
||||
max++;
|
||||
|
@ -1311,7 +1311,7 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
|
||||
if (quitevent)
|
||||
{
|
||||
initprintf("Connection attempt aborted.\n");
|
||||
initprintf("network: Connection attempt aborted.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1328,8 +1328,8 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
{
|
||||
if (heard_from[i] == heard_from[i+1]) /* blah. */
|
||||
{
|
||||
initprintf("mmulti_unstable: ERROR: Two players have the same random ID!\n");
|
||||
initprintf("mmulti_unstable: ERROR: Please restart the game to generate new IDs.\n");
|
||||
initprintf("network: ERROR: Two players have the same random ID!\n");
|
||||
initprintf("network: ERROR: Please restart the game to generate new IDs.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1377,11 +1377,11 @@ static int32_t connect_to_server(gcomtype *gcom, int32_t myip)
|
|||
gcom->myconnectindex = i;
|
||||
}
|
||||
|
||||
// initprintf("mmulti_unstable: player #%i with id %d\n",i,heard_from[i]);
|
||||
// initprintf("network: player #%i with id %d\n",i,heard_from[i]);
|
||||
}
|
||||
// assert(gcom->myconnectindex);
|
||||
|
||||
// initprintf("mmulti_unstable: We are player #%i\n", gcom->myconnectindex);
|
||||
// initprintf("network: We are player #%i\n", gcom->myconnectindex);
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
@ -1406,7 +1406,7 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
{
|
||||
if (gcom->numplayers > 1)
|
||||
{
|
||||
initprintf("mmulti_unstable: Error: can't do both 'broadcast' and 'allow'.\n");
|
||||
initprintf("network: Error: can't do both 'broadcast' and 'allow'.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1427,7 +1427,7 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
}
|
||||
|
||||
|
||||
initprintf("mmulti_unstable: Using 0x%X as client ID\n", my_id);
|
||||
initprintf("network: Using 0x%X as client ID\n", my_id);
|
||||
|
||||
resendat = getticks();
|
||||
remaining = max = gcom->numplayers - 1;
|
||||
|
@ -1465,7 +1465,7 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
|
||||
if (!heard_from[i])
|
||||
{
|
||||
initprintf("%s %s:%d...\n",first_send?"Connecting to":"Retrying",
|
||||
initprintf("network: %s %s:%d...\n",first_send?"Connecting to":"Retrying",
|
||||
static_ipstring(allowed_addresses[i].host),allowed_addresses[i].port);
|
||||
|
||||
send_peer_greeting(allowed_addresses[i].host,
|
||||
|
@ -1526,7 +1526,7 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
{
|
||||
if (allowed_addresses[i].port != port)
|
||||
{
|
||||
initprintf("mmulti_unstable: Port number for player %d changed from %d to %d.\n",i,allowed_addresses[i].port,port);
|
||||
initprintf("network: Port number for player %d changed from %d to %d.\n",i,allowed_addresses[i].port,port);
|
||||
/* initprintf("Different player Port Number detected. %s:%i\n",ipstr,
|
||||
allowed_addresses[i].port);
|
||||
initprintf("Changed to %s:%i, player may be behind a firewall.\n", ipstr, port); //addfaz NAT addition */
|
||||
|
@ -1549,13 +1549,13 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
}
|
||||
|
||||
if (i == max)
|
||||
initprintf("mmulti_unstable: Disallowed player %s:%d ?!\n", ipstr, port);
|
||||
initprintf("network: Disallowed player %s:%d ?!\n", ipstr, port);
|
||||
|
||||
else if (rc != sizeof(packet))
|
||||
initprintf("mmulti_unstable: Missized packet or fragment from %s:%i ?!\n", ipstr, port);
|
||||
initprintf("network: Missized packet or fragment from %s:%i ?!\n", ipstr, port);
|
||||
|
||||
else if (packet.header != HEADER_PEER_GREETING)
|
||||
initprintf("mmulti_unstable: Unexpected packet type from %s:%i ?!\n", ipstr, port);
|
||||
initprintf("network: Unexpected packet type from %s:%i ?!\n", ipstr, port);
|
||||
|
||||
else if (heard_from[i] == 0)
|
||||
{
|
||||
|
@ -1565,7 +1565,7 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
allowed_addresses[i].port = port;
|
||||
remaining--;
|
||||
|
||||
initprintf("Connected to %s:%i (id 0x%X). %d player%s left.\n",
|
||||
initprintf("network: Connected to %s:%i (id 0x%X). %d player%s left.\n",
|
||||
ipstr, port ,(int32_t) packet.id,
|
||||
remaining, remaining == 1 ? "" : "s");
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
|
||||
if (quitevent)
|
||||
{
|
||||
initprintf("Connection attempt aborted.\n");
|
||||
initprintf("network: Connection attempt aborted.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1606,8 +1606,8 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
{
|
||||
if (heard_from[i] == heard_from[i+1]) /* blah. */
|
||||
{
|
||||
initprintf("mmulti_unstable: ERROR: Two players have the same random ID!\n");
|
||||
initprintf("mmulti_unstable: ERROR: Please restart the game to generate new IDs.\n");
|
||||
initprintf("network: ERROR: Two players have the same random ID!\n");
|
||||
initprintf("network: ERROR: Please restart the game to generate new IDs.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1656,11 +1656,11 @@ static int32_t connect_to_everyone(gcomtype *gcom, int32_t myip, int32_t bcast)
|
|||
gcom->myconnectindex = i;
|
||||
}
|
||||
|
||||
initprintf("mmulti_unstable: player #%i at %s:%i\n", i,static_ipstring(ip),allowed_addresses[i].port);
|
||||
initprintf("network: player #%i at %s:%i\n", i,static_ipstring(ip),allowed_addresses[i].port);
|
||||
}
|
||||
// assert(gcom->myconnectindex);
|
||||
|
||||
initprintf("mmulti_unstable: We are player #%i\n", gcom->myconnectindex);
|
||||
initprintf("network: We are player #%i\n", gcom->myconnectindex);
|
||||
|
||||
/*
|
||||
* Ok, we should have specific IPs and ports for all players, and
|
||||
|
@ -1811,7 +1811,7 @@ static int32_t parse_udp_config(int32_t argc, char **argv, gcomtype *gcom)
|
|||
j = strtol(argv[i]+2, &p, 10);
|
||||
if (!(*p) && j > 1024 && j<65535) udpport = j;
|
||||
|
||||
initprintf("mmulti_unstable: Using port %d\n", udpport);
|
||||
initprintf("network: Using port %d\n", udpport);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1831,9 +1831,9 @@ static int32_t parse_udp_config(int32_t argc, char **argv, gcomtype *gcom)
|
|||
udpmode = udpmode_server;
|
||||
gcom->numplayers = (argv[i][4]-'0');
|
||||
if ((argv[i][5] >= '0') && (argv[i][5] <= '9')) gcom->numplayers = gcom->numplayers*10+(argv[i][5]-'0');
|
||||
initprintf("mmulti_unstable: %d-player game server\n", gcom->numplayers--);
|
||||
initprintf("network: %d-player game server\n", gcom->numplayers--);
|
||||
}
|
||||
initprintf("mmulti_unstable: Master-slave mode\n");
|
||||
initprintf("network: Master-slave mode\n");
|
||||
}
|
||||
else if (argv[i][2] == '1')
|
||||
{
|
||||
|
@ -1841,7 +1841,7 @@ static int32_t parse_udp_config(int32_t argc, char **argv, gcomtype *gcom)
|
|||
udpmode = udpmode_peer;
|
||||
myconnectindex = daindex;
|
||||
// daindex++;
|
||||
initprintf("mmulti_unstable: Peer-to-peer mode\n");
|
||||
initprintf("network: Peer-to-peer mode\n");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -1854,7 +1854,7 @@ static int32_t parse_udp_config(int32_t argc, char **argv, gcomtype *gcom)
|
|||
{
|
||||
// if ((danetmode == 1) && (daindex == myconnectindex)) daindex++;
|
||||
parse_interface(st, &allowed_addresses[daindex].host, &allowed_addresses[daindex].port);
|
||||
initprintf("mmulti_unstable: Player %d at %s:%d\n",daindex,st,allowed_addresses[daindex].port);
|
||||
initprintf("network: Player %d at %s:%d\n",daindex,st,allowed_addresses[daindex].port);
|
||||
daindex++;
|
||||
}
|
||||
else
|
||||
|
@ -1870,11 +1870,11 @@ static int32_t parse_udp_config(int32_t argc, char **argv, gcomtype *gcom)
|
|||
// if ((danetmode == 1) && (daindex == myconnectindex)) daindex++;
|
||||
allowed_addresses[daindex].host = ntohl(*(int32_t *)lph->h_addr);
|
||||
allowed_addresses[daindex].port = pt;
|
||||
initprintf("mmulti_unstable: Player %d at %s:%d (%s)\n",daindex,
|
||||
initprintf("network: Player %d at %s:%d (%s)\n",daindex,
|
||||
inet_ntoa(*(struct in_addr *)lph->h_addr),pt,argv[i]);
|
||||
daindex++;
|
||||
}
|
||||
else initprintf("mmulti_unstable: Failed resolving %s\n",argv[i]);
|
||||
else initprintf("network: Failed resolving %s\n",argv[i]);
|
||||
}
|
||||
free(st);
|
||||
}
|
||||
|
@ -1884,7 +1884,7 @@ static int32_t parse_udp_config(int32_t argc, char **argv, gcomtype *gcom)
|
|||
}
|
||||
else
|
||||
{
|
||||
initprintf("mmulti_unstable: Using '%s' as configuration file\n", argv[0]);
|
||||
initprintf("network: Using '%s' as configuration file\n", argv[0]);
|
||||
|
||||
ptr = buf;
|
||||
while ((tok = get_token(&ptr)) != NULL)
|
||||
|
@ -1898,7 +1898,7 @@ static int32_t parse_udp_config(int32_t argc, char **argv, gcomtype *gcom)
|
|||
{
|
||||
bogus = 0;
|
||||
}
|
||||
initprintf("mmulti_unstable: Using interface %s:%d\n",
|
||||
initprintf("network: Using interface %s:%d\n",
|
||||
static_ipstring(ip), (int32_t) udpport);
|
||||
}
|
||||
|
||||
|
@ -2051,7 +2051,7 @@ void deinit_network_transport(gcomtype *gcom)
|
|||
|
||||
deinitialize_sockets();
|
||||
|
||||
initprintf("UDP net deinitialized successfully.\n");
|
||||
initprintf("UDP networking uninitialized successfully.\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <shellapi.h>
|
||||
#endif
|
||||
|
||||
#define BUILDDATE " 20090227"
|
||||
#define BUILDDATE " 20090313"
|
||||
#define VERSION " 1.2.0devel"
|
||||
|
||||
static int32_t floor_over_floor;
|
||||
|
|
|
@ -260,6 +260,8 @@ void CONFIG_SetDefaults(void)
|
|||
ud.weaponscale = 100;
|
||||
ud.textscale = 100;
|
||||
|
||||
ud.config.CheckForUpdates = 1;
|
||||
|
||||
Bstrcpy(ud.rtsname, "DUKE.RTS");
|
||||
Bstrcpy(szPlayerName, "Duke");
|
||||
|
||||
|
@ -901,6 +903,7 @@ int32 CONFIG_ReadSetup(void)
|
|||
|
||||
{
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "VoiceToggle",&ud.config.VoiceToggle);
|
||||
// hack to switch old VoiceToggle value over to new bitfield format
|
||||
if (ud.config.VoiceToggle == 2) ud.config.VoiceToggle = 5;
|
||||
}
|
||||
|
||||
|
@ -958,14 +961,14 @@ int32 CONFIG_ReadSetup(void)
|
|||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_WriteBinds(void) // save binds and aliases to disk
|
||||
void CONFIG_WriteBinds(void) // save binds and aliases to <cfgname>_binds.cfg
|
||||
{
|
||||
int32_t i;
|
||||
FILE *fp;
|
||||
char *ptr = Bstrdup(setupfilename);
|
||||
char tempbuf[128];
|
||||
|
||||
Bsprintf(tempbuf,"%s_binds.cfg",strtok(ptr,"."));
|
||||
Bsprintf(tempbuf, "%s_binds.cfg", strtok(ptr, "."));
|
||||
fp = fopen(tempbuf, "wt");
|
||||
|
||||
if (fp)
|
||||
|
|
|
@ -4534,6 +4534,10 @@ void G_DrawRooms(int32_t snum,int32_t smoothratio)
|
|||
polymer_setanimatesprites(G_DoSpriteAnimations, ud.camerax,ud.cameray,ud.cameraang,smoothratio);
|
||||
#endif
|
||||
drawrooms(ud.camerax,ud.cameray,ud.cameraz,ud.cameraang,ud.camerahoriz,ud.camerasect);
|
||||
#ifdef POLYMER
|
||||
if (getrendermode() == 4)
|
||||
polymer_resetlights();
|
||||
#endif
|
||||
G_DoSpriteAnimations(ud.camerax,ud.cameray,ud.cameraang,smoothratio);
|
||||
drawmasks();
|
||||
|
||||
|
@ -6642,6 +6646,9 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
intptr_t l, t1,t3,t4;
|
||||
spritetype *s,*t;
|
||||
int32_t switchpic;
|
||||
#ifdef POLYMER
|
||||
_prlight light;
|
||||
#endif
|
||||
|
||||
if (!spritesortcnt) return;
|
||||
|
||||
|
@ -7363,6 +7370,39 @@ PALONLY:
|
|||
case SHRINKEREXPLOSION__STATIC:
|
||||
case RPG__STATIC:
|
||||
case FLOORFLAME__STATIC:
|
||||
|
||||
#ifdef POLYMER
|
||||
light.sector = t->sectnum;
|
||||
|
||||
light.x = t->x;
|
||||
light.y = t->y;
|
||||
light.z = t->z;
|
||||
|
||||
light.range = tilesizx[t->picnum]*tilesizy[t->picnum];
|
||||
light.faderange = 0;
|
||||
|
||||
light.color[0] = 255;
|
||||
light.color[1] = 80;
|
||||
light.color[2] = 0;
|
||||
|
||||
if ((DynamicTileMap[s->picnum] == ATOMICHEALTH__STATIC) ||
|
||||
(DynamicTileMap[s->picnum] == FREEZEBLAST__STATIC))
|
||||
{
|
||||
light.color[0] = 0;
|
||||
light.color[1] = 0;
|
||||
light.color[2] = 255;
|
||||
}
|
||||
if ((DynamicTileMap[s->picnum] == SHRINKSPARK__STATIC) ||
|
||||
(DynamicTileMap[s->picnum] == SHRINKEREXPLOSION__STATIC))
|
||||
{
|
||||
light.color[0] = 0;
|
||||
light.color[1] = 255;
|
||||
light.color[2] = 0;
|
||||
}
|
||||
|
||||
if (getrendermode() >= 4)
|
||||
polymer_addlight(light);
|
||||
#endif
|
||||
if (t->picnum == EXPLOSION2)
|
||||
{
|
||||
g_player[screenpeek].ps->visibility = -127;
|
||||
|
@ -9339,10 +9379,16 @@ static int32_t loaddefinitions_game(const char *fn, int32_t preload)
|
|||
static void G_AddGroup(const char *buffer)
|
||||
{
|
||||
struct strllist *s;
|
||||
char buf[BMAX_PATH];
|
||||
|
||||
s = (struct strllist *)Bcalloc(1,sizeof(struct strllist));
|
||||
s->str = Bstrdup(buffer);
|
||||
if (Bstrchr(s->str,'.') == 0)
|
||||
Bstrcat(s->str,".grp");
|
||||
|
||||
Bstrcpy(buf, buffer);
|
||||
|
||||
if (Bstrchr(buf,'.') == 0)
|
||||
Bstrcat(buf,".grp");
|
||||
|
||||
s->str = Bstrdup(buf);
|
||||
|
||||
if (CommandGrps)
|
||||
{
|
||||
|
@ -10872,14 +10918,7 @@ void app_main(int32_t argc,const char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
ud.config.CheckForUpdates = -1;
|
||||
#endif
|
||||
|
||||
// used with binds for fast function lookup
|
||||
hash_init(&gamefuncH);
|
||||
for (i=NUMGAMEFUNCTIONS-1; i>=0; i--)
|
||||
{
|
||||
|
@ -10889,21 +10928,21 @@ void app_main(int32_t argc,const char **argv)
|
|||
Bfree(str);
|
||||
}
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef _WIN32
|
||||
ud.config.CheckForUpdates = -1;
|
||||
#endif
|
||||
*/
|
||||
|
||||
i = CONFIG_ReadSetup();
|
||||
if (getenv("DUKE3DGRP")) duke3dgrp = getenv("DUKE3DGRP");
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (glusetexcache == -1 || glusetexcachecompression == -1)
|
||||
{
|
||||
i=wm_ynbox("Texture Cache",
|
||||
"Would you like to enable the on-disk texture cache?\n\n"
|
||||
"You generally want to say 'yes' here, especially if using the HRP.");
|
||||
if (i) ud.config.useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
if (ud.config.CheckForUpdates == -1)
|
||||
{
|
||||
i=wm_ynbox("Automatic Update Notifications",
|
||||
|
@ -10911,6 +10950,7 @@ void app_main(int32_t argc,const char **argv)
|
|||
ud.config.CheckForUpdates = 0;
|
||||
if (i) ud.config.CheckForUpdates = 1;
|
||||
}
|
||||
*/
|
||||
|
||||
// initprintf("build %d\n",(uint8_t)atoi(BUILDDATE));
|
||||
|
||||
|
@ -10950,6 +10990,18 @@ void app_main(int32_t argc,const char **argv)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (glusetexcache == -1 || glusetexcachecompression == -1)
|
||||
{
|
||||
i=wm_ynbox("Texture Cache",
|
||||
"Would you like to enable the on-disk texture cache?\n\n"
|
||||
"You generally want to say 'yes' here, especially if using the HRP.");
|
||||
if (i) ud.config.useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (preinitengine())
|
||||
{
|
||||
wm_msgbox("Build Engine Initialization Error",
|
||||
|
@ -10963,7 +11015,7 @@ void app_main(int32_t argc,const char **argv)
|
|||
{
|
||||
// try and identify the 'defaultduke3dgrp' in the set of GRPs.
|
||||
// if it is found, set up the environment accordingly for the game it represents.
|
||||
// if it is not found, choose the first GRP from the list of
|
||||
// if it is not found, choose the first GRP from the list
|
||||
struct grpfile *fg, *first = NULL;
|
||||
int32_t i;
|
||||
for (fg = foundgrps; fg; fg=fg->next)
|
||||
|
@ -11116,7 +11168,7 @@ CLEAN_DIRECTORY:
|
|||
i = initgroupfile(duke3dgrp);
|
||||
|
||||
if (i == -1)
|
||||
initprintf("Warning: could not find group file '%s'!\n",duke3dgrp);
|
||||
initprintf("Warning: could not find main group file '%s'!\n",duke3dgrp);
|
||||
else
|
||||
initprintf("Using group file '%s' as main group file.\n", duke3dgrp);
|
||||
|
||||
|
@ -11177,8 +11229,8 @@ CLEAN_DIRECTORY:
|
|||
G_DoAutoload(CommandGrps->str);
|
||||
}
|
||||
|
||||
free(CommandGrps->str);
|
||||
free(CommandGrps);
|
||||
Bfree(CommandGrps->str);
|
||||
Bfree(CommandGrps);
|
||||
CommandGrps = s;
|
||||
}
|
||||
pathsearchmode = 0;
|
||||
|
|
|
@ -5133,7 +5133,9 @@ repeatcase:
|
|||
|
||||
Bstrcpy(temp,tempbuf);
|
||||
CONFIG_WriteSetup();
|
||||
Bsprintf(setupfilename,"%s/",mod_dir);
|
||||
if (mod_dir[0] != '/')
|
||||
Bsprintf(setupfilename,"%s/",mod_dir);
|
||||
else setupfilename[0] = 0;
|
||||
Bstrcat(setupfilename,temp);
|
||||
|
||||
initprintf("Using config file '%s'.\n",setupfilename);
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20090227";
|
||||
const char *s_buildDate = "20090313";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ int32_t G_GetVersionFromWebsite(char *buffer)
|
|||
struct sockaddr_in dest_addr;
|
||||
struct hostent *h;
|
||||
char *host = "eduke32.sourceforge.net";
|
||||
char *req = "GET http://eduke32.sourceforge.net/VERSION HTTP/1.0\r\n\r\n";
|
||||
char *req = "GET http://eduke32.sourceforge.net/VERSION HTTP/1.0\r\n\r\n\r\n";
|
||||
char tempbuf[2048],otherbuf[16],ver[16];
|
||||
SOCKET mysock;
|
||||
|
||||
|
|
Loading…
Reference in a new issue