mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Per-weapon player death messages, an option to disable the exit button in maps, and voting on map changes
git-svn-id: https://svn.eduke32.com/eduke32@147 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
834d2c9a9b
commit
1230ad3914
11 changed files with 338 additions and 206 deletions
|
@ -339,6 +339,7 @@ struct user_defs {
|
||||||
|
|
||||||
int32 runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
int32 runkey_mode,statusbarscale,mouseaiming,weaponswitch,drawweapon; // JBF 20031125
|
||||||
int32 brightskins,democams,color,pcolor[MAXPLAYERS],msgdisptime,statusbarmode;
|
int32 brightskins,democams,color,pcolor[MAXPLAYERS],msgdisptime,statusbarmode;
|
||||||
|
int32 m_noexits,noexits;
|
||||||
|
|
||||||
int32 entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
|
int32 entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
|
||||||
int32 coords,tickrate,levelstats,m_coop,coop,screen_size,lockout,crosshair;
|
int32 coords,tickrate,levelstats,m_coop,coop,screen_size,lockout,crosshair;
|
||||||
|
|
|
@ -72,6 +72,8 @@ int display_bonus_screen = 1, userconfiles = 0;
|
||||||
static int netparamcount = 0;
|
static int netparamcount = 0;
|
||||||
static char **netparam = NULL;
|
static char **netparam = NULL;
|
||||||
|
|
||||||
|
int votes[MAXPLAYERS], gotvote[MAXPLAYERS], voting = -1;
|
||||||
|
|
||||||
void setstatusbarscale(long sc)
|
void setstatusbarscale(long sc)
|
||||||
{
|
{
|
||||||
ud.statusbarscale = min(100,max(10,sc));
|
ud.statusbarscale = min(100,max(10,sc));
|
||||||
|
@ -422,6 +424,58 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); }
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 18: // map vote
|
||||||
|
|
||||||
|
if (myconnectindex == connecthead)
|
||||||
|
{
|
||||||
|
//Master re-transmits message to all others
|
||||||
|
for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
|
||||||
|
if (i != other)
|
||||||
|
sendpacket(i,packbuf,packbufleng);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(packbuf[1])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if(voting == myconnectindex)
|
||||||
|
{
|
||||||
|
gotvote[packbuf[2]] = 1;
|
||||||
|
votes[packbuf[2]] = packbuf[3];
|
||||||
|
Bsprintf(tempbuf,"GOT VOTE FROM %s",ud.user_name[packbuf[2]]);
|
||||||
|
adduserquote(tempbuf);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1: // call map vote
|
||||||
|
voting = packbuf[2];
|
||||||
|
Bsprintf(tempbuf,"%s HAS CALLED A VOTE FOR MAP %s",ud.user_name[packbuf[2]],level_names[packbuf[3]*11 + packbuf[4]]);
|
||||||
|
adduserquote(tempbuf);
|
||||||
|
Bsprintf(tempbuf,"PRESS F1 TO VOTE YES, F2 TO VOTE NO");
|
||||||
|
adduserquote(tempbuf);
|
||||||
|
Bmemset(votes,0,sizeof(votes));
|
||||||
|
Bmemset(gotvote,0,sizeof(gotvote));
|
||||||
|
gotvote[voting] = votes[voting] = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2: // cancel map vote
|
||||||
|
if(packbuf[2] == voting)
|
||||||
|
{
|
||||||
|
voting = -1;
|
||||||
|
i = 0;
|
||||||
|
for(j=0;j<MAXPLAYERS;j++)
|
||||||
|
i += gotvote[j];
|
||||||
|
|
||||||
|
if(i != numplayers)
|
||||||
|
Bsprintf(tempbuf,"%s HAS CANCELED THE VOTE",ud.user_name[packbuf[2]]);
|
||||||
|
else Bsprintf(tempbuf,"VOTE FAILED");
|
||||||
|
Bmemset(votes,0,sizeof(votes));
|
||||||
|
Bmemset(gotvote,0,sizeof(gotvote));
|
||||||
|
adduserquote(tempbuf);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 126:
|
case 126:
|
||||||
//Slaves in M/S mode only send to master
|
//Slaves in M/S mode only send to master
|
||||||
//Master re-transmits message to all others
|
//Master re-transmits message to all others
|
||||||
|
@ -576,6 +630,9 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); }
|
||||||
for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
|
for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
|
||||||
if (i != other) sendpacket(i,packbuf,packbufleng);
|
if (i != other) sendpacket(i,packbuf,packbufleng);
|
||||||
|
|
||||||
|
if(voting != -1)
|
||||||
|
adduserquote("VOTE SUCCEEDED");
|
||||||
|
|
||||||
ud.m_level_number = ud.level_number = packbuf[1];
|
ud.m_level_number = ud.level_number = packbuf[1];
|
||||||
ud.m_volume_number = ud.volume_number = packbuf[2];
|
ud.m_volume_number = ud.volume_number = packbuf[2];
|
||||||
ud.m_player_skill = ud.player_skill = packbuf[3];
|
ud.m_player_skill = ud.player_skill = packbuf[3];
|
||||||
|
@ -586,6 +643,7 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); }
|
||||||
ud.m_coop = packbuf[8];
|
ud.m_coop = packbuf[8];
|
||||||
ud.m_marker = ud.marker = packbuf[9];
|
ud.m_marker = ud.marker = packbuf[9];
|
||||||
ud.m_ffire = ud.ffire = packbuf[10];
|
ud.m_ffire = ud.ffire = packbuf[10];
|
||||||
|
ud.m_noexits = ud.noexits = packbuf[11];
|
||||||
|
|
||||||
for(i=connecthead;i>=0;i=connectpoint2[i])
|
for(i=connecthead;i>=0;i=connectpoint2[i])
|
||||||
{
|
{
|
||||||
|
@ -644,36 +702,6 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); }
|
||||||
FX_PlayWAV3D(rtsptr,0,0,0,255,-packbuf[1]);
|
FX_PlayWAV3D(rtsptr,0,0,0,255,-packbuf[1]);
|
||||||
rtsplaying = 7;
|
rtsplaying = 7;
|
||||||
break;
|
break;
|
||||||
case 8:
|
|
||||||
//Slaves in M/S mode only send to master
|
|
||||||
//Master re-transmits message to all others
|
|
||||||
if ((!networkmode) && (myconnectindex == connecthead))
|
|
||||||
for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
|
|
||||||
if (i != other) sendpacket(i,packbuf,packbufleng);
|
|
||||||
|
|
||||||
ud.m_level_number = ud.level_number = packbuf[1];
|
|
||||||
ud.m_volume_number = ud.volume_number = packbuf[2];
|
|
||||||
ud.m_player_skill = ud.player_skill = packbuf[3];
|
|
||||||
ud.m_monsters_off = ud.monsters_off = packbuf[4];
|
|
||||||
ud.m_respawn_monsters = ud.respawn_monsters = packbuf[5];
|
|
||||||
ud.m_respawn_items = ud.respawn_items = packbuf[6];
|
|
||||||
ud.m_respawn_inventory = ud.respawn_inventory = packbuf[7];
|
|
||||||
ud.m_coop = ud.coop = packbuf[8];
|
|
||||||
ud.m_marker = ud.marker = packbuf[9];
|
|
||||||
ud.m_ffire = ud.ffire = packbuf[10];
|
|
||||||
|
|
||||||
copybufbyte(packbuf+10,boardfilename,packbufleng-11);
|
|
||||||
boardfilename[packbufleng-11] = 0;
|
|
||||||
|
|
||||||
for(i=connecthead;i>=0;i=connectpoint2[i])
|
|
||||||
{
|
|
||||||
resetweapons(i);
|
|
||||||
resetinventory(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
newgame(ud.volume_number,ud.level_number,ud.player_skill);
|
|
||||||
if (enterlevel(MODE_GAME)) backtomenu();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
movefifoend[other] = movefifoplc = movefifosendplc = fakemovefifoplc = 0;
|
movefifoend[other] = movefifoplc = movefifosendplc = fakemovefifoplc = 0;
|
||||||
|
@ -2062,18 +2090,18 @@ void operatefta(void)
|
||||||
|
|
||||||
if (ps[screenpeek].ftq == 115 || ps[screenpeek].ftq == 116)
|
if (ps[screenpeek].ftq == 115 || ps[screenpeek].ftq == 116)
|
||||||
{
|
{
|
||||||
k = quotebot;
|
k = quotebot-8;
|
||||||
for(i=0;i<MAXUSERQUOTES;i++)
|
/* for(i=0;i<MAXUSERQUOTES;i++)
|
||||||
{
|
{
|
||||||
if (user_quote_time[i] <= 0) break;
|
if (user_quote_time[i] <= 0) break;
|
||||||
k -= 8;
|
k -= 8;
|
||||||
l = Bstrlen(user_quote[i]);
|
l = Bstrlen(user_quote[i]);
|
||||||
while(l > TEXTWRAPLEN)
|
while(l > TEXTWRAPLEN)
|
||||||
{
|
{
|
||||||
l -= TEXTWRAPLEN;
|
l -= TEXTWRAPLEN;
|
||||||
k -= scale(8,200,ScreenHeight);
|
k -= 8;
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
k -= 4;
|
k -= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6809,9 +6837,10 @@ FOUNDCHEAT:
|
||||||
tempbuf[8] = ud.m_coop;
|
tempbuf[8] = ud.m_coop;
|
||||||
tempbuf[9] = ud.m_marker;
|
tempbuf[9] = ud.m_marker;
|
||||||
tempbuf[10] = ud.m_ffire;
|
tempbuf[10] = ud.m_ffire;
|
||||||
|
tempbuf[11] = ud.m_noexits;
|
||||||
|
|
||||||
for(i=connecthead;i>=0;i=connectpoint2[i])
|
for(i=connecthead;i>=0;i=connectpoint2[i])
|
||||||
sendpacket(i,tempbuf,11);
|
sendpacket(i,tempbuf,12);
|
||||||
}
|
}
|
||||||
else ps[myconnectindex].gm |= MODE_RESTART;
|
else ps[myconnectindex].gm |= MODE_RESTART;
|
||||||
|
|
||||||
|
@ -7157,6 +7186,42 @@ void nonsharedkeys(void)
|
||||||
inputloc = 0;
|
inputloc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(gotvote[myconnectindex] == 0 && voting != -1)
|
||||||
|
{
|
||||||
|
gametext(160,60,"PRESS F1 TO VOTE YES, F2 TO VOTE NO",0,2);
|
||||||
|
if(KB_KeyPressed(sc_F1))
|
||||||
|
{
|
||||||
|
KB_ClearKeyDown(sc_F1);
|
||||||
|
tempbuf[0] = 18;
|
||||||
|
tempbuf[1] = 0;
|
||||||
|
tempbuf[2] = myconnectindex;
|
||||||
|
tempbuf[3] = 1;
|
||||||
|
|
||||||
|
for(i=connecthead;i >= 0;i=connectpoint2[i])
|
||||||
|
{
|
||||||
|
if (i != myconnectindex) sendpacket(i,tempbuf,4);
|
||||||
|
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
||||||
|
}
|
||||||
|
adduserquote("VOTE CAST");
|
||||||
|
gotvote[myconnectindex] = 1;
|
||||||
|
}
|
||||||
|
else if(KB_KeyPressed(sc_F2))
|
||||||
|
{
|
||||||
|
KB_ClearKeyDown(sc_F2);
|
||||||
|
tempbuf[0] = 18;
|
||||||
|
tempbuf[1] = 0;
|
||||||
|
tempbuf[2] = myconnectindex;
|
||||||
|
tempbuf[3] = 0;
|
||||||
|
|
||||||
|
for(i=connecthead;i >= 0;i=connectpoint2[i])
|
||||||
|
{
|
||||||
|
if (i != myconnectindex) sendpacket(i,tempbuf,4);
|
||||||
|
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
||||||
|
}
|
||||||
|
adduserquote("VOTE CAST");
|
||||||
|
gotvote[myconnectindex] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
if( KB_KeyPressed(sc_F1) || ( ud.show_help && ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) ) ) )
|
if( KB_KeyPressed(sc_F1) || ( ud.show_help && ( KB_KeyPressed(sc_Space) || KB_KeyPressed(sc_Enter) || KB_KeyPressed(sc_kpad_Enter) ) ) )
|
||||||
{
|
{
|
||||||
KB_ClearKeyDown(sc_F1);
|
KB_ClearKeyDown(sc_F1);
|
||||||
|
@ -9071,11 +9136,13 @@ char opendemoread(char which_demo) // 0 = mine
|
||||||
if (kread(recfilep,(int32 *)&ps[i].weaponswitch,sizeof(int32)) != sizeof(int32)) goto corrupt;
|
if (kread(recfilep,(int32 *)&ps[i].weaponswitch,sizeof(int32)) != sizeof(int32)) goto corrupt;
|
||||||
if (kread(recfilep,(int32 *)&ud.pcolor[i],sizeof(int32)) != sizeof(int32)) goto corrupt;
|
if (kread(recfilep,(int32 *)&ud.pcolor[i],sizeof(int32)) != sizeof(int32)) goto corrupt;
|
||||||
ps[i].palookup = ud.pcolor[i];
|
ps[i].palookup = ud.pcolor[i];
|
||||||
|
if (kread(recfilep,(int32 *)&ud.m_noexits,sizeof(int32)) != sizeof(int32)) goto corrupt;
|
||||||
} else {
|
} else {
|
||||||
if (kread(recfilep,(int32 *)&ps[i].aim_mode,sizeof(char)) != sizeof(char)) goto corrupt;
|
if (kread(recfilep,(int32 *)&ps[i].aim_mode,sizeof(char)) != sizeof(char)) goto corrupt;
|
||||||
OSD_Printf("aim_mode: %d\n",ps[i].aim_mode);
|
OSD_Printf("aim_mode: %d\n",ps[i].aim_mode);
|
||||||
ps[i].auto_aim = 1;
|
ps[i].auto_aim = 1;
|
||||||
ps[i].weaponswitch = 3;
|
ps[i].weaponswitch = 3;
|
||||||
|
ud.m_noexits = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9125,6 +9192,7 @@ void opendemowrite(void)
|
||||||
fwrite((int32 *)&ps[i].auto_aim,sizeof(int32),1,frecfilep); // JBF 20031126
|
fwrite((int32 *)&ps[i].auto_aim,sizeof(int32),1,frecfilep); // JBF 20031126
|
||||||
fwrite(&ps[i].weaponswitch,sizeof(int32),1,frecfilep);
|
fwrite(&ps[i].weaponswitch,sizeof(int32),1,frecfilep);
|
||||||
fwrite(&ud.pcolor[i],sizeof(int32),1,frecfilep);
|
fwrite(&ud.pcolor[i],sizeof(int32),1,frecfilep);
|
||||||
|
fwrite((int32 *)&ud.m_noexits,sizeof(int32),1,frecfilep);
|
||||||
}
|
}
|
||||||
|
|
||||||
totalreccnt = 0;
|
totalreccnt = 0;
|
||||||
|
@ -9992,7 +10060,7 @@ char domovethings(void)
|
||||||
adduserquote(buf);
|
adduserquote(buf);
|
||||||
Bstrcpy(fta_quotes[116],buf);
|
Bstrcpy(fta_quotes[116],buf);
|
||||||
|
|
||||||
ps[myconnectindex].ftq = 116, ps[myconnectindex].fta = 60;
|
ps[myconnectindex].ftq = 116, ps[myconnectindex].fta = 180;
|
||||||
|
|
||||||
if(j < 0 && networkmode == 0 )
|
if(j < 0 && networkmode == 0 )
|
||||||
gameexit( "The server/master player just quit the game; disconnected.");
|
gameexit( "The server/master player just quit the game; disconnected.");
|
||||||
|
|
|
@ -803,6 +803,8 @@ LABELS userdefslabels[]= {
|
||||||
{ "color", USERDEFS_COLOR, 0, 0 },
|
{ "color", USERDEFS_COLOR, 0, 0 },
|
||||||
{ "msgdisptime", USERDEFS_MSGDISPTIME, 0, 0 },
|
{ "msgdisptime", USERDEFS_MSGDISPTIME, 0, 0 },
|
||||||
{ "statusbarmode", USERDEFS_STATUSBARMODE, 0, 0 },
|
{ "statusbarmode", USERDEFS_STATUSBARMODE, 0, 0 },
|
||||||
|
{ "m_noexits", USERDEFS_M_NOEXITS, 0, 0 },
|
||||||
|
{ "noexits", USERDEFS_NOEXITS, 0, 0 },
|
||||||
{ "", -1, 0, 0 } // END OF LIST
|
{ "", -1, 0, 0 } // END OF LIST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,9 @@ enum userdefslabels {
|
||||||
USERDEFS_DEMOCAMS,
|
USERDEFS_DEMOCAMS,
|
||||||
USERDEFS_COLOR,
|
USERDEFS_COLOR,
|
||||||
USERDEFS_MSGDISPTIME,
|
USERDEFS_MSGDISPTIME,
|
||||||
USERDEFS_STATUSBARMODE
|
USERDEFS_STATUSBARMODE,
|
||||||
|
USERDEFS_M_NOEXITS,
|
||||||
|
USERDEFS_NOEXITS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum sectorlabels {
|
enum sectorlabels {
|
||||||
|
|
|
@ -624,6 +624,20 @@ void DoUserDef(char bSet, long lLabelID, long lVar2, short sActor, short sPlayer
|
||||||
SetGameVarID((int)lVar2, ud.statusbarmode, sActor, sPlayer);
|
SetGameVarID((int)lVar2, ud.statusbarmode, sActor, sPlayer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case USERDEFS_M_NOEXITS:
|
||||||
|
if(bSet)
|
||||||
|
ud.m_noexits = lValue;
|
||||||
|
else
|
||||||
|
SetGameVarID((int)lVar2, ud.m_noexits, sActor, sPlayer);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case USERDEFS_NOEXITS:
|
||||||
|
if(bSet)
|
||||||
|
ud.noexits = lValue;
|
||||||
|
else
|
||||||
|
SetGameVarID((int)lVar2, ud.noexits, sActor, sPlayer);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4209,9 +4223,10 @@ SKIPJIBS:
|
||||||
tempbuf[8] = ud.m_coop;
|
tempbuf[8] = ud.m_coop;
|
||||||
tempbuf[9] = ud.m_marker;
|
tempbuf[9] = ud.m_marker;
|
||||||
tempbuf[10] = ud.m_ffire;
|
tempbuf[10] = ud.m_ffire;
|
||||||
|
tempbuf[11] = ud.m_noexits;
|
||||||
|
|
||||||
for(i=connecthead;i>=0;i=connectpoint2[i])
|
for(i=connecthead;i>=0;i=connectpoint2[i])
|
||||||
sendpacket(i,tempbuf,11);
|
sendpacket(i,tempbuf,12);
|
||||||
}
|
}
|
||||||
else { ps[myconnectindex].gm |= MODE_EOL; display_bonus_screen = 0; } // MODE_RESTART;
|
else { ps[myconnectindex].gm |= MODE_EOL; display_bonus_screen = 0; } // MODE_RESTART;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ int last_menu;
|
||||||
short sh,onbar,buttonstat,deletespot;
|
short sh,onbar,buttonstat,deletespot;
|
||||||
short last_zero,last_fifty,last_onehundred,last_twoohtwo,last_threehundred = 0;
|
short last_zero,last_fifty,last_onehundred,last_twoohtwo,last_threehundred = 0;
|
||||||
|
|
||||||
static char fileselect = 1, menunamecnt, menuname[256][64];
|
static char menunamecnt;
|
||||||
|
|
||||||
static CACHE1D_FIND_REC *finddirs=NULL, *findfiles=NULL, *finddirshigh=NULL, *findfileshigh=NULL;
|
static CACHE1D_FIND_REC *finddirs=NULL, *findfiles=NULL, *finddirshigh=NULL, *findfileshigh=NULL;
|
||||||
static int numdirs=0, numfiles=0;
|
static int numdirs=0, numfiles=0;
|
||||||
|
@ -45,6 +45,8 @@ static int vidsets[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 }, cu
|
||||||
|
|
||||||
static char *mousebuttonnames[] = { "Left", "Right", "Middle", "Thumb", "Wheel Down", "Wheel Up" };
|
static char *mousebuttonnames[] = { "Left", "Right", "Middle", "Thumb", "Wheel Down", "Wheel Up" };
|
||||||
|
|
||||||
|
extern int gotvote[MAXPLAYERS], votes[MAXPLAYERS], voting;
|
||||||
|
|
||||||
void cmenu(short cm)
|
void cmenu(short cm)
|
||||||
{
|
{
|
||||||
current_menu = cm;
|
current_menu = cm;
|
||||||
|
@ -3963,80 +3965,107 @@ VOLUME_ALL_40x:
|
||||||
if (menunamecnt == 0)
|
if (menunamecnt == 0)
|
||||||
cmenu(600);
|
cmenu(600);
|
||||||
}
|
}
|
||||||
|
|
||||||
case 603:
|
case 603:
|
||||||
c = (320>>1) - 120;
|
|
||||||
displayfragbar();
|
|
||||||
rotatesprite(320>>1<<16,19<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
|
|
||||||
menutext(320>>1,24,0,0,"USER MAPS");
|
|
||||||
for(x=0;x<menunamecnt;x++)
|
|
||||||
{
|
{
|
||||||
if(x == fileselect)
|
int plrvotes = 0, j = 0;
|
||||||
minitext(15 + (x/15)*54,32 + (x%15)*8,menuname[x],0,26);
|
|
||||||
else minitext(15 + (x/15)*54,32 + (x%15)*8,menuname[x],16,26);
|
|
||||||
}
|
|
||||||
|
|
||||||
fileselect = probey;
|
x = probe(186,124,0,0);
|
||||||
if( KB_KeyPressed( sc_LeftArrow ) || KB_KeyPressed( sc_kpad_4 ) || ((buttonstat&1) && minfo.dyaw < -256 ) )
|
|
||||||
{
|
|
||||||
KB_ClearKeyDown( sc_LeftArrow );
|
|
||||||
KB_ClearKeyDown( sc_kpad_4 );
|
|
||||||
probey -= 15;
|
|
||||||
if(probey < 0) probey += 15;
|
|
||||||
else sound(KICK_HIT);
|
|
||||||
}
|
|
||||||
if( KB_KeyPressed( sc_RightArrow ) || KB_KeyPressed( sc_kpad_6 ) || ((buttonstat&1) && minfo.dyaw > 256 ) )
|
|
||||||
{
|
|
||||||
KB_ClearKeyDown( sc_RightArrow );
|
|
||||||
KB_ClearKeyDown( sc_kpad_6 );
|
|
||||||
probey += 15;
|
|
||||||
if(probey >= menunamecnt)
|
|
||||||
probey -= 15;
|
|
||||||
else sound(KICK_HIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
onbar = 0;
|
if (x == -1) {
|
||||||
x = probe(0,0,0,menunamecnt);
|
if(voting != -1)
|
||||||
|
{
|
||||||
|
Bmemset(votes,0,sizeof(votes));
|
||||||
|
Bmemset(gotvote,0,sizeof(gotvote));
|
||||||
|
|
||||||
if(x == -1) cmenu(600);
|
tempbuf[0] = 18;
|
||||||
else if(x >= 0)
|
tempbuf[1] = 2;
|
||||||
{
|
tempbuf[2] = myconnectindex;
|
||||||
tempbuf[0] = 8;
|
|
||||||
tempbuf[1] = ud.m_level_number = 6;
|
|
||||||
tempbuf[2] = ud.m_volume_number = 0;
|
|
||||||
tempbuf[3] = ud.m_player_skill+1;
|
|
||||||
|
|
||||||
if(ud.player_skill == 3)
|
for(c=connecthead;c>=0;c=connectpoint2[c])
|
||||||
ud.m_respawn_monsters = 1;
|
{
|
||||||
else ud.m_respawn_monsters = 0;
|
if(c != myconnectindex) sendpacket(c,tempbuf,3);
|
||||||
|
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
||||||
if(ud.m_coop == 0) ud.m_respawn_items = 1;
|
}
|
||||||
else ud.m_respawn_items = 0;
|
voting = -1;
|
||||||
|
}
|
||||||
ud.m_respawn_inventory = 1;
|
cmenu(0);
|
||||||
|
|
||||||
tempbuf[4] = ud.m_monsters_off;
|
|
||||||
tempbuf[5] = ud.m_respawn_monsters;
|
|
||||||
tempbuf[6] = ud.m_respawn_items;
|
|
||||||
tempbuf[7] = ud.m_respawn_inventory;
|
|
||||||
tempbuf[8] = ud.m_coop;
|
|
||||||
tempbuf[9] = ud.m_marker;
|
|
||||||
|
|
||||||
x = strlen(menuname[probey]);
|
|
||||||
|
|
||||||
copybufbyte(menuname[probey],tempbuf+10,x);
|
|
||||||
copybufbyte(menuname[probey],boardfilename,x+1);
|
|
||||||
|
|
||||||
for(c=connecthead;c>=0;c=connectpoint2[c])
|
|
||||||
{
|
|
||||||
if (c != myconnectindex) sendpacket(c,tempbuf,x+10);
|
|
||||||
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newgame(ud.m_volume_number,ud.m_level_number,ud.m_player_skill+1);
|
for(i=0;i<MAXPLAYERS;i++)
|
||||||
if (enterlevel(MODE_GAME)) backtomenu();
|
{
|
||||||
}
|
plrvotes += votes[i];
|
||||||
break;
|
j += gotvote[i];
|
||||||
|
}
|
||||||
|
if(j == numplayers || !ps[myconnectindex].i || (plrvotes > (numplayers>>1)))
|
||||||
|
{
|
||||||
|
if(plrvotes > (numplayers>>1) || !ps[myconnectindex].i)
|
||||||
|
{
|
||||||
|
tempbuf[0] = 5;
|
||||||
|
tempbuf[1] = ud.m_level_number;
|
||||||
|
tempbuf[2] = ud.m_volume_number;
|
||||||
|
tempbuf[3] = ud.m_player_skill+1;
|
||||||
|
|
||||||
|
if( ud.m_player_skill == 3 ) ud.m_respawn_monsters = 1;
|
||||||
|
else ud.m_respawn_monsters = 0;
|
||||||
|
|
||||||
|
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_ITEMRESPAWN)) ud.m_respawn_items = 1;
|
||||||
|
else ud.m_respawn_items = 0;
|
||||||
|
|
||||||
|
ud.m_respawn_inventory = 1;
|
||||||
|
|
||||||
|
tempbuf[4] = ud.m_monsters_off;
|
||||||
|
tempbuf[5] = ud.m_respawn_monsters;
|
||||||
|
tempbuf[6] = ud.m_respawn_items;
|
||||||
|
tempbuf[7] = ud.m_respawn_inventory;
|
||||||
|
tempbuf[8] = ud.m_coop;
|
||||||
|
tempbuf[9] = ud.m_marker;
|
||||||
|
tempbuf[10] = ud.m_ffire;
|
||||||
|
tempbuf[11] = ud.m_noexits;
|
||||||
|
|
||||||
|
for(c=connecthead;c>=0;c=connectpoint2[c])
|
||||||
|
{
|
||||||
|
resetweapons(c);
|
||||||
|
resetinventory(c);
|
||||||
|
|
||||||
|
}
|
||||||
|
for(c=connecthead;c>=0;c=connectpoint2[c])
|
||||||
|
{
|
||||||
|
if(c != myconnectindex) sendpacket(c,tempbuf,12);
|
||||||
|
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
||||||
|
}
|
||||||
|
|
||||||
|
if(voting != -1)
|
||||||
|
adduserquote("VOTE SUCCEEDED");
|
||||||
|
|
||||||
|
newgame(ud.m_volume_number,ud.m_level_number,ud.m_player_skill+1);
|
||||||
|
if (enterlevel(MODE_GAME)) backtomenu();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(j == numplayers) {
|
||||||
|
Bmemset(votes,0,sizeof(votes));
|
||||||
|
Bmemset(gotvote,0,sizeof(gotvote));
|
||||||
|
|
||||||
|
tempbuf[0] = 18;
|
||||||
|
tempbuf[1] = 2;
|
||||||
|
tempbuf[2] = myconnectindex;
|
||||||
|
tempbuf[3] = 1;
|
||||||
|
|
||||||
|
for(c=connecthead;c>=0;c=connectpoint2[c])
|
||||||
|
{
|
||||||
|
if(c != myconnectindex) sendpacket(c,tempbuf,4);
|
||||||
|
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
||||||
|
}
|
||||||
|
voting = -1;
|
||||||
|
adduserquote("VOTE FAILED");
|
||||||
|
cmenu(0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
gametext(160,60,"WAITING FOR VOTES",0,2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 600:
|
case 600:
|
||||||
c = (320>>1) - 120;
|
c = (320>>1) - 120;
|
||||||
if((ps[myconnectindex].gm&MODE_GAME) != MODE_GAME)
|
if((ps[myconnectindex].gm&MODE_GAME) != MODE_GAME)
|
||||||
|
@ -4053,8 +4082,9 @@ VOLUME_ALL_40x:
|
||||||
|
|
||||||
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_MARKEROPTION))
|
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_MARKEROPTION))
|
||||||
modval(0,1,(int *)&ud.m_marker,1,probey==4);
|
modval(0,1,(int *)&ud.m_marker,1,probey==4);
|
||||||
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_COOP))
|
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_PLAYERSFRIENDLY))
|
||||||
modval(0,1,(int *)&ud.m_ffire,1,probey==5);
|
modval(0,1,(int *)&ud.m_ffire,1,probey==5);
|
||||||
|
else modval(0,1,(int *)&ud.m_noexits,1,probey==5);
|
||||||
|
|
||||||
switch(x)
|
switch(x)
|
||||||
{
|
{
|
||||||
|
@ -4110,98 +4140,43 @@ VOLUME_ALL_40x:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_COOP))
|
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_PLAYERSFRIENDLY))
|
||||||
ud.m_ffire = !ud.m_ffire;
|
ud.m_ffire = !ud.m_ffire;
|
||||||
|
else ud.m_noexits = !ud.m_noexits;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
if (VOLUMEALL) {
|
if (VOLUMEALL) {
|
||||||
/* if(boardfilename[0] == 0) break;
|
|
||||||
|
|
||||||
tempbuf[0] = 5;
|
|
||||||
tempbuf[1] = ud.m_level_number = 7;
|
|
||||||
tempbuf[2] = ud.m_volume_number = 0;
|
|
||||||
tempbuf[3] = ud.m_player_skill+1;
|
|
||||||
|
|
||||||
ud.level_number = ud.m_level_number;
|
|
||||||
ud.volume_number = ud.m_volume_number;
|
|
||||||
|
|
||||||
if( ud.m_player_skill == 3 ) ud.m_respawn_monsters = 1;
|
|
||||||
else ud.m_respawn_monsters = 0;
|
|
||||||
|
|
||||||
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_ITEMRESPAWN)) ud.m_respawn_items = 1;
|
|
||||||
else ud.m_respawn_items = 0;
|
|
||||||
|
|
||||||
ud.m_respawn_inventory = 1;
|
|
||||||
|
|
||||||
tempbuf[4] = ud.m_monsters_off;
|
|
||||||
tempbuf[5] = ud.m_respawn_monsters;
|
|
||||||
tempbuf[6] = ud.m_respawn_items;
|
|
||||||
tempbuf[7] = ud.m_respawn_inventory;
|
|
||||||
tempbuf[8] = ud.m_coop;
|
|
||||||
tempbuf[9] = ud.m_marker;
|
|
||||||
tempbuf[10] = ud.m_ffire;
|
|
||||||
|
|
||||||
for(c=connecthead;c>=0;c=connectpoint2[c])
|
|
||||||
{
|
|
||||||
resetweapons(c);
|
|
||||||
resetinventory(c);
|
|
||||||
}
|
|
||||||
for(c=connecthead;c>=0;c=connectpoint2[c])
|
|
||||||
{
|
|
||||||
if (c != myconnectindex) sendpacket(c,tempbuf,11);
|
|
||||||
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
|
||||||
}
|
|
||||||
|
|
||||||
newgame(ud.m_volume_number,ud.m_level_number,ud.m_player_skill+1);
|
|
||||||
if (enterlevel(MODE_GAME)) backtomenu();
|
|
||||||
|
|
||||||
return; */
|
|
||||||
currentlist = 1;
|
currentlist = 1;
|
||||||
last_probey = probey;
|
last_probey = probey;
|
||||||
cmenu(101);
|
cmenu(101);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
|
if(voting == -1)
|
||||||
tempbuf[0] = 5;
|
|
||||||
tempbuf[1] = ud.m_level_number;
|
|
||||||
tempbuf[2] = ud.m_volume_number;
|
|
||||||
tempbuf[3] = ud.m_player_skill+1;
|
|
||||||
|
|
||||||
if( ud.m_player_skill == 3 ) ud.m_respawn_monsters = 1;
|
|
||||||
else ud.m_respawn_monsters = 0;
|
|
||||||
|
|
||||||
if((gametype_flags[ud.m_coop] & GAMETYPE_FLAG_ITEMRESPAWN)) ud.m_respawn_items = 1;
|
|
||||||
else ud.m_respawn_items = 0;
|
|
||||||
|
|
||||||
ud.m_respawn_inventory = 1;
|
|
||||||
|
|
||||||
tempbuf[4] = ud.m_monsters_off;
|
|
||||||
tempbuf[5] = ud.m_respawn_monsters;
|
|
||||||
tempbuf[6] = ud.m_respawn_items;
|
|
||||||
tempbuf[7] = ud.m_respawn_inventory;
|
|
||||||
tempbuf[8] = ud.m_coop;
|
|
||||||
tempbuf[9] = ud.m_marker;
|
|
||||||
tempbuf[10] = ud.m_ffire;
|
|
||||||
|
|
||||||
for(c=connecthead;c>=0;c=connectpoint2[c])
|
|
||||||
{
|
{
|
||||||
resetweapons(c);
|
if(ps[myconnectindex].i)
|
||||||
resetinventory(c);
|
{
|
||||||
|
Bmemset(votes,0,sizeof(votes));
|
||||||
|
Bmemset(gotvote,0,sizeof(gotvote));
|
||||||
|
votes[myconnectindex] = gotvote[myconnectindex] = 1;
|
||||||
|
voting = myconnectindex;
|
||||||
|
|
||||||
|
tempbuf[0] = 18;
|
||||||
|
tempbuf[1] = 1;
|
||||||
|
tempbuf[2] = myconnectindex;
|
||||||
|
tempbuf[3] = ud.m_volume_number;
|
||||||
|
tempbuf[4] = ud.m_level_number;
|
||||||
|
|
||||||
|
for(c=connecthead;c>=0;c=connectpoint2[c])
|
||||||
|
{
|
||||||
|
if(c != myconnectindex) sendpacket(c,tempbuf,5);
|
||||||
|
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cmenu(603);
|
||||||
}
|
}
|
||||||
for(c=connecthead;c>=0;c=connectpoint2[c])
|
break;
|
||||||
{
|
|
||||||
if(c != myconnectindex) sendpacket(c,tempbuf,11);
|
|
||||||
if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master
|
|
||||||
}
|
|
||||||
|
|
||||||
newgame(ud.m_volume_number,ud.m_level_number,ud.m_player_skill+1);
|
|
||||||
if (enterlevel(MODE_GAME)) backtomenu();
|
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
c += 40;
|
c += 40;
|
||||||
|
@ -4223,8 +4198,9 @@ VOLUME_ALL_40x:
|
||||||
if(gametype_flags[ud.m_coop] & GAMETYPE_FLAG_MARKEROPTION)
|
if(gametype_flags[ud.m_coop] & GAMETYPE_FLAG_MARKEROPTION)
|
||||||
gametext(c+70,57+16+16+16+16-7-9,ud.m_marker?"ON":"OFF",MENUHIGHLIGHT(4),2+8+16);
|
gametext(c+70,57+16+16+16+16-7-9,ud.m_marker?"ON":"OFF",MENUHIGHLIGHT(4),2+8+16);
|
||||||
|
|
||||||
if(gametype_flags[ud.m_coop] & GAMETYPE_FLAG_COOP)
|
if(gametype_flags[ud.m_coop] & GAMETYPE_FLAG_PLAYERSFRIENDLY)
|
||||||
gametext(c+70,57+16+16+16+16+16-7-9,ud.m_ffire?"ON":"OFF",MENUHIGHLIGHT(5),2+8+16);
|
gametext(c+70,57+16+16+16+16+16-7-9,ud.m_ffire?"ON":"OFF",MENUHIGHLIGHT(5),2+8+16);
|
||||||
|
else gametext(c+70,57+16+16+16+16+16-7-9,ud.m_noexits?"OFF":"ON",MENUHIGHLIGHT(5),2+8+16);
|
||||||
|
|
||||||
c -= 44;
|
c -= 44;
|
||||||
|
|
||||||
|
@ -4248,9 +4224,9 @@ VOLUME_ALL_40x:
|
||||||
else
|
else
|
||||||
menutext(c,57+16+16+16+16-9,MENUHIGHLIGHT(4),1,"MARKERS");
|
menutext(c,57+16+16+16+16-9,MENUHIGHLIGHT(4),1,"MARKERS");
|
||||||
|
|
||||||
if(gametype_flags[ud.m_coop] & GAMETYPE_FLAG_COOP)
|
if(gametype_flags[ud.m_coop] & GAMETYPE_FLAG_PLAYERSFRIENDLY)
|
||||||
menutext(c,57+16+16+16+16+16-9,MENUHIGHLIGHT(5),PHX(-6),"FR. FIRE");
|
menutext(c,57+16+16+16+16+16-9,MENUHIGHLIGHT(5),0,"FR. FIRE");
|
||||||
else menutext(c,57+16+16+16+16+16-9,MENUHIGHLIGHT(5),1,"FR. FIRE");
|
else menutext(c,57+16+16+16+16+16-9,MENUHIGHLIGHT(5),0,"MAP EXITS");
|
||||||
|
|
||||||
if (VOLUMEALL) {
|
if (VOLUMEALL) {
|
||||||
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),0,"USER MAP");
|
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),0,"USER MAP");
|
||||||
|
@ -4260,7 +4236,7 @@ VOLUME_ALL_40x:
|
||||||
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),1,"USER MAP");
|
menutext(c,57+16+16+16+16+16+16-9,MENUHIGHLIGHT(6),1,"USER MAP");
|
||||||
}
|
}
|
||||||
|
|
||||||
menutext(c,57+16+16+16+16+16+16+16-9,MENUHIGHLIGHT(7),PHX(-8),"START GAME");
|
menutext(c,57+16+16+16+16+16+16+16-9,MENUHIGHLIGHT(7),voting!=-1,"START GAME");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -731,7 +731,7 @@ short shoot(short i,short atwith)
|
||||||
if(hitspr >= 0)
|
if(hitspr >= 0)
|
||||||
{
|
{
|
||||||
checkhitsprite(hitspr,k);
|
checkhitsprite(hitspr,k);
|
||||||
if( sprite[hitspr].picnum == APLAYER && (!(gametype_flags[ud.coop] & GAMETYPE_FLAG_COOP) || ud.ffire == 1) )
|
if( sprite[hitspr].picnum == APLAYER && (!(gametype_flags[ud.coop] & GAMETYPE_FLAG_PLAYERSFRIENDLY) || ud.ffire == 1) )
|
||||||
{
|
{
|
||||||
l = spawn(k,JIBS6);
|
l = spawn(k,JIBS6);
|
||||||
sprite[k].xrepeat = sprite[k].yrepeat = 0;
|
sprite[k].xrepeat = sprite[k].yrepeat = 0;
|
||||||
|
@ -1237,7 +1237,7 @@ DOSKIPBULLETHOLE:
|
||||||
if(hitspr >= 0)
|
if(hitspr >= 0)
|
||||||
{
|
{
|
||||||
checkhitsprite(hitspr,k);
|
checkhitsprite(hitspr,k);
|
||||||
if( sprite[hitspr].picnum == APLAYER && (!(gametype_flags[ud.coop]&GAMETYPE_FLAG_COOP ) || ud.ffire == 1) )
|
if( sprite[hitspr].picnum == APLAYER && (!(gametype_flags[ud.coop]&GAMETYPE_FLAG_PLAYERSFRIENDLY ) || ud.ffire == 1) )
|
||||||
{
|
{
|
||||||
l = spawn(k,JIBS6);
|
l = spawn(k,JIBS6);
|
||||||
sprite[k].xrepeat = sprite[k].yrepeat = 0;
|
sprite[k].xrepeat = sprite[k].yrepeat = 0;
|
||||||
|
@ -3460,10 +3460,55 @@ void processinput(short snum)
|
||||||
Bsprintf(fta_quotes[116],"KILLED %s",&ud.user_name[snum][0]);
|
Bsprintf(fta_quotes[116],"KILLED %s",&ud.user_name[snum][0]);
|
||||||
FTA(116,&ps[p->frag_ps]);
|
FTA(116,&ps[p->frag_ps]);
|
||||||
}
|
}
|
||||||
Bsprintf(tempbuf,"%s WAS KILLED BY %s",&ud.user_name[snum][0],&ud.user_name[p->frag_ps][0]);
|
char *s[] = {
|
||||||
|
"%s WAS KICKED TO THE CURB BY %s",
|
||||||
|
"%s WAS PICKED OFF BY %s",
|
||||||
|
"%s TOOK %s'S SHOT TO THE FACE",
|
||||||
|
"%s DANCED THE CHAINGUN CHA-CHA WITH %s",
|
||||||
|
"%s TRIED TO MAKE A BONG OUT OF %s'S ROCKET",
|
||||||
|
"%s TOOK A FEW TOO MANY HITS OFF OF %s'S PIPE",
|
||||||
|
"%s FELT THE EFFECTS OF %s'S CORPORATE DOWNSIZING",
|
||||||
|
"%s WAS TOO COOL FOR %s",
|
||||||
|
"%s HAD HIS HORIZONS EXPANDED BY %s",
|
||||||
|
};
|
||||||
|
switch(dynamictostatic[hittype[p->i].picnum]) {
|
||||||
|
case KNEE__STATIC:
|
||||||
|
if(hittype[p->i].temp_data[1] == 1)
|
||||||
|
i = 7;
|
||||||
|
else i = 0;
|
||||||
|
break;
|
||||||
|
case SHOTSPARK1__STATIC:
|
||||||
|
switch(ps[p->frag_ps].curr_weapon)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case PISTOL_WEAPON:
|
||||||
|
i = 1;
|
||||||
|
break;
|
||||||
|
case SHOTGUN_WEAPON:
|
||||||
|
i = 2;
|
||||||
|
break;
|
||||||
|
case CHAINGUN_WEAPON:
|
||||||
|
i = 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RPG__STATIC: i = 4; break;
|
||||||
|
case RADIUSEXPLOSION__STATIC: i = 5; break;
|
||||||
|
case SHRINKSPARK__STATIC: i = 6; break;
|
||||||
|
case GROWSPARK__STATIC: i = 8; break;
|
||||||
|
default: i = 0; break;
|
||||||
|
}
|
||||||
|
initprintf("%d\n",dynamictostatic[hittype[p->i].picnum]);
|
||||||
|
Bsprintf(tempbuf,s[i],&ud.user_name[snum][0],&ud.user_name[p->frag_ps][0]);
|
||||||
|
adduserquote(tempbuf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *s[] = { "%s KILLED HIMSELF. WHAT A TOOL!","%s TRIED TO LEAVE" };
|
||||||
|
p->fraggedself++;
|
||||||
|
Bsprintf(tempbuf,(hittype[p->i].picnum==NUKEBUTTON)?s[1]:s[0],&ud.user_name[snum][0]);
|
||||||
adduserquote(tempbuf);
|
adduserquote(tempbuf);
|
||||||
}
|
}
|
||||||
else p->fraggedself++;
|
|
||||||
|
|
||||||
if(myconnectindex == connecthead)
|
if(myconnectindex == connecthead)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1461,6 +1461,8 @@ void resetmys(void)
|
||||||
|
|
||||||
extern void adduserquote(char *daquote);
|
extern void adduserquote(char *daquote);
|
||||||
|
|
||||||
|
extern int gotvote[MAXPLAYERS], votes[MAXPLAYERS], voting;
|
||||||
|
|
||||||
int enterlevel(char g)
|
int enterlevel(char g)
|
||||||
{
|
{
|
||||||
short i;
|
short i;
|
||||||
|
@ -1475,6 +1477,11 @@ int enterlevel(char g)
|
||||||
ud.coop = ud.m_coop;
|
ud.coop = ud.m_coop;
|
||||||
ud.marker = ud.m_marker;
|
ud.marker = ud.m_marker;
|
||||||
ud.ffire = ud.m_ffire;
|
ud.ffire = ud.m_ffire;
|
||||||
|
ud.noexits = ud.m_noexits;
|
||||||
|
|
||||||
|
voting = -1;
|
||||||
|
Bmemset(votes,0,sizeof(votes));
|
||||||
|
Bmemset(gotvote,0,sizeof(gotvote));
|
||||||
|
|
||||||
if( (g&MODE_DEMO) == 0 && ud.recstat == 2)
|
if( (g&MODE_DEMO) == 0 && ud.recstat == 2)
|
||||||
ud.recstat = 0;
|
ud.recstat = 0;
|
||||||
|
|
|
@ -325,6 +325,10 @@ int loadplayer(signed char spot)
|
||||||
|
|
||||||
if (kdfread(&dynamictostatic[0],sizeof(dynamictostatic[0]),MAXTILES,fil) != MAXTILES) goto corrupt;
|
if (kdfread(&dynamictostatic[0],sizeof(dynamictostatic[0]),MAXTILES,fil) != MAXTILES) goto corrupt;
|
||||||
|
|
||||||
|
if (kdfread(&ud.noexits,sizeof(ud.noexits),1,fil) != 1) goto corrupt;
|
||||||
|
ud.m_noexits = ud.noexits;
|
||||||
|
|
||||||
|
|
||||||
if(ReadGameVars(fil)) goto corrupt;
|
if(ReadGameVars(fil)) goto corrupt;
|
||||||
|
|
||||||
kclose(fil);
|
kclose(fil);
|
||||||
|
@ -696,6 +700,8 @@ int saveplayer(signed char spot)
|
||||||
|
|
||||||
dfwrite(&dynamictostatic[0],sizeof(dynamictostatic[0]),MAXTILES,fil);
|
dfwrite(&dynamictostatic[0],sizeof(dynamictostatic[0]),MAXTILES,fil);
|
||||||
|
|
||||||
|
dfwrite(&ud.noexits,sizeof(ud.noexits),1,fil);
|
||||||
|
|
||||||
SaveGameVars(fil);
|
SaveGameVars(fil);
|
||||||
|
|
||||||
fclose(fil);
|
fclose(fil);
|
||||||
|
|
|
@ -3372,12 +3372,20 @@ void checksectors(short snum)
|
||||||
if(j >= 0 && wall[j].overpicnum == 0)
|
if(j >= 0 && wall[j].overpicnum == 0)
|
||||||
if(hittype[neartagsprite].temp_data[0] == 0)
|
if(hittype[neartagsprite].temp_data[0] == 0)
|
||||||
{
|
{
|
||||||
hittype[neartagsprite].temp_data[0] = 1;
|
if(ud.noexits)
|
||||||
sprite[neartagsprite].owner = p->i;
|
{
|
||||||
p->buttonpalette = sprite[neartagsprite].pal;
|
hittype[p->i].picnum = NUKEBUTTON;
|
||||||
if(p->buttonpalette)
|
hittype[p->i].extra = 250;
|
||||||
ud.secretlevel = sprite[neartagsprite].lotag;
|
}
|
||||||
else ud.secretlevel = 0;
|
else
|
||||||
|
{
|
||||||
|
hittype[neartagsprite].temp_data[0] = 1;
|
||||||
|
sprite[neartagsprite].owner = p->i;
|
||||||
|
p->buttonpalette = sprite[neartagsprite].pal;
|
||||||
|
if(p->buttonpalette)
|
||||||
|
ud.secretlevel = sprite[neartagsprite].lotag;
|
||||||
|
else ud.secretlevel = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case WATERFOUNTAIN__STATIC:
|
case WATERFOUNTAIN__STATIC:
|
||||||
|
|
|
@ -55,6 +55,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
|
||||||
ZeroMemory(&pi,sizeof(pi));
|
ZeroMemory(&pi,sizeof(pi));
|
||||||
si.cb = sizeof(si);
|
si.cb = sizeof(si);
|
||||||
|
|
||||||
|
printf("Launching EDuke32...\n\nPlease leave this window open for the entire duration of your game.");
|
||||||
|
|
||||||
if (!CreateProcess(NULL,szCmdLine,NULL,NULL,0,0,NULL,NULL,&si,&pi)) {
|
if (!CreateProcess(NULL,szCmdLine,NULL,NULL,0,0,NULL,NULL,&si,&pi)) {
|
||||||
MessageBox(0,"Failed to start eduke32.exe.", "Failure starting game", MB_OK|MB_ICONSTOP);
|
MessageBox(0,"Failed to start eduke32.exe.", "Failure starting game", MB_OK|MB_ICONSTOP);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue