git-svn-id: https://svn.eduke32.com/eduke32@529 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2007-03-24 23:17:56 +00:00
parent 4785f64476
commit b54b8e1e6b
9 changed files with 41 additions and 14 deletions

View file

@ -303,7 +303,7 @@ int writesetup(const char *fn)
"key2dzoomout = %X\n" "key2dzoomout = %X\n"
"keychat = %X\n" "keychat = %X\n"
#endif #endif
"; Console key scancode, in hex\n" // "; Console key scancode, in hex\n"
"keyconsole = %X\n" "keyconsole = %X\n"
"\n", "\n",

View file

@ -269,6 +269,7 @@ void CONFIG_SetDefaults(void)
ud.brightness = 8; ud.brightness = 8;
ud.color = 0; ud.color = 0;
ud.crosshair = 2; ud.crosshair = 2;
ud.deathmsgs = 1;
ud.democams = 1; ud.democams = 1;
ud.detail = 1; ud.detail = 1;
ud.drawweapon = 1; ud.drawweapon = 1;
@ -291,7 +292,7 @@ void CONFIG_SetDefaults(void)
ud.viewbob = 1; ud.viewbob = 1;
ud.weaponsway = 1; ud.weaponsway = 1;
ud.weaponswitch = 3; // new+empty ud.weaponswitch = 3; // new+empty
ud.angleinterpolation = 50; ud.angleinterpolation = 0;
UseJoystick = 0; UseJoystick = 0;
UseMouse = 1; UseMouse = 1;
VoiceToggle = 2; VoiceToggle = 2;
@ -704,6 +705,7 @@ int32 CONFIG_ReadSetup(void)
SCRIPT_GetNumber(scripthandle, "Misc", "ShowOpponentWeapons",&ShowOpponentWeapons); SCRIPT_GetNumber(scripthandle, "Misc", "ShowOpponentWeapons",&ShowOpponentWeapons);
ud.showweapons = ShowOpponentWeapons; ud.showweapons = ShowOpponentWeapons;
SCRIPT_GetNumber(scripthandle, "Misc", "ShowViewWeapon",&ud.drawweapon); SCRIPT_GetNumber(scripthandle, "Misc", "ShowViewWeapon",&ud.drawweapon);
SCRIPT_GetNumber(scripthandle, "Misc", "DeathMessages",&ud.deathmsgs);
SCRIPT_GetNumber(scripthandle, "Misc", "DemoCams",&ud.democams); SCRIPT_GetNumber(scripthandle, "Misc", "DemoCams",&ud.democams);
SCRIPT_GetNumber(scripthandle, "Misc", "ShowFPS",&ud.tickrate); SCRIPT_GetNumber(scripthandle, "Misc", "ShowFPS",&ud.tickrate);
SCRIPT_GetNumber(scripthandle, "Misc", "Color",&ud.color); SCRIPT_GetNumber(scripthandle, "Misc", "Color",&ud.color);
@ -813,6 +815,7 @@ void CONFIG_WriteSetup(void)
SCRIPT_PutNumber(scripthandle, "Misc", "AutoVote",ud.autovote,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "AutoVote",ud.autovote,false,false);
SCRIPT_PutNumber(scripthandle, "Misc", "Color",ud.color,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "Color",ud.color,false,false);
SCRIPT_PutNumber(scripthandle, "Misc", "Crosshairs",ud.crosshair,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "Crosshairs",ud.crosshair,false,false);
SCRIPT_PutNumber(scripthandle, "Misc", "DeathMessages",ud.deathmsgs,false,false);
SCRIPT_PutNumber(scripthandle, "Misc", "DemoCams",ud.democams,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "DemoCams",ud.democams,false,false);
ud.executions++; ud.executions++;
SCRIPT_PutNumber(scripthandle, "Misc", "Executions",ud.executions,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "Executions",ud.executions,false,false);
@ -830,7 +833,7 @@ void CONFIG_WriteSetup(void)
SCRIPT_PutNumber(scripthandle, "Misc", "UsePrecache",useprecache,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "UsePrecache",useprecache,false,false);
SCRIPT_PutNumber(scripthandle, "Misc", "ViewBobbing",ud.viewbob,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "ViewBobbing",ud.viewbob,false,false);
SCRIPT_PutNumber(scripthandle, "Misc", "WeaponSway",ud.weaponsway,false,false); SCRIPT_PutNumber(scripthandle, "Misc", "WeaponSway",ud.weaponsway,false,false);
SCRIPT_PutNumber(scripthandle, "Misc", "AngleInterpolation",ud.angleinterpolation,false,false); // SCRIPT_PutNumber(scripthandle, "Misc", "AngleInterpolation",ud.angleinterpolation,false,false);
SCRIPT_PutNumber(scripthandle, "Screen Setup", "Detail",ud.detail,false,false); SCRIPT_PutNumber(scripthandle, "Screen Setup", "Detail",ud.detail,false,false);
#if defined(POLYMOST) && defined(USE_OPENGL) #if defined(POLYMOST) && defined(USE_OPENGL)
@ -851,7 +854,7 @@ void CONFIG_WriteSetup(void)
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLVBOs", r_vbos,false,false); SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLVBOs", r_vbos,false,false);
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLVBOCount", r_vbocount,false,false); SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLVBOCount", r_vbocount,false,false);
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLAnimationSmoothing",r_animsmoothing,false,false); // SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLAnimationSmoothing",r_animsmoothing,false,false);
#endif #endif
#ifdef RENDERTYPEWIN #ifdef RENDERTYPEWIN
SCRIPT_PutNumber(scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false); SCRIPT_PutNumber(scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false);

View file

@ -366,7 +366,7 @@ struct user_defs {
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;
int32 wchoice[MAXPLAYERS][MAX_WEAPONS],playerai,angleinterpolation; int32 wchoice[MAXPLAYERS][MAX_WEAPONS],playerai,angleinterpolation,deathmsgs;
int32 respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness; int32 respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
int32 m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail; int32 m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail;

View file

@ -4380,7 +4380,6 @@ int spawn(int j, int pn)
T1 = T2 = T3 = T4 = T5 = T6 = T7 = T8 = T9 = 0; T1 = T2 = T3 = T4 = T5 = T6 = T7 = T8 = T9 = 0;
ResetActorGameVars(i); // this shouldn't be necessary
actorspriteflags[i] = 0; actorspriteflags[i] = 0;
sprpos[i].x = sprite[i].x; sprpos[i].x = sprite[i].x;
@ -9991,14 +9990,12 @@ void app_main(int argc,char **argv)
Bsprintf(gametype_names[2],"GRUNTMATCH (NO SPAWN)"); Bsprintf(gametype_names[2],"GRUNTMATCH (NO SPAWN)");
} }
i = initgroupfile(duke3dgrp);
if (initgroupfile(duke3dgrp) == -1) if (i == -1)
initprintf("Warning: could not find group file '%s'.\n",duke3dgrp); initprintf("Warning: could not find group file '%s'.\n",duke3dgrp);
else else
{
initprintf("Using group file '%s' as main group file.\n", duke3dgrp); initprintf("Using group file '%s' as main group file.\n", duke3dgrp);
autoloadgrps(duke3dgrp);
}
getfilenames("autoload","*.grp"); getfilenames("autoload","*.grp");
while (findfiles) { Bsprintf(tempbuf,"autoload/%s",findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } while (findfiles) { Bsprintf(tempbuf,"autoload/%s",findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
@ -10007,6 +10004,9 @@ void app_main(int argc,char **argv)
getfilenames("autoload","*.pk3"); getfilenames("autoload","*.pk3");
while (findfiles) { Bsprintf(tempbuf,"autoload/%s",findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } while (findfiles) { Bsprintf(tempbuf,"autoload/%s",findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
if (i != -1)
autoloadgrps(duke3dgrp);
loadgroupfiles(duke3ddef); loadgroupfiles(duke3ddef);
{ {

View file

@ -814,6 +814,8 @@ LABELS userdefslabels[]=
{ "team", USERDEFS_TEAM, 0, 0 }, { "team", USERDEFS_TEAM, 0, 0 },
{ "viewbob", USERDEFS_VIEWBOB, 0, 0 }, { "viewbob", USERDEFS_VIEWBOB, 0, 0 },
{ "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 }, { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 },
{ "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 },
{ "deathmsgs", USERDEFS_DEATHMSGS, 0, 0 },
{ "", -1, 0, 0 } // END OF LIST { "", -1, 0, 0 } // END OF LIST
}; };

View file

@ -316,7 +316,9 @@ enum userdefslabels {
USERDEFS_IDPLAYERS, USERDEFS_IDPLAYERS,
USERDEFS_TEAM, USERDEFS_TEAM,
USERDEFS_VIEWBOB, USERDEFS_VIEWBOB,
USERDEFS_WEAPONSWAY USERDEFS_WEAPONSWAY,
USERDEFS_ANGLEINTERPOLATION,
USERDEFS_DEATHMSGS
}; };
enum sectorlabels { enum sectorlabels {

View file

@ -679,6 +679,20 @@ static void DoUserDef(int iSet, int lLabelID, int lVar2)
SetGameVarID(lVar2, ud.weaponsway, g_i, g_p); SetGameVarID(lVar2, ud.weaponsway, g_i, g_p);
break; break;
case USERDEFS_ANGLEINTERPOLATION:
if (iSet)
ud.angleinterpolation = lValue;
else
SetGameVarID(lVar2, ud.angleinterpolation, g_i, g_p);
break;
case USERDEFS_DEATHMSGS:
if (iSet)
ud.deathmsgs = lValue;
else
SetGameVarID(lVar2, ud.deathmsgs, g_i, g_p);
break;
default: default:
break; break;
} }

View file

@ -625,6 +625,8 @@ cvar[] =
{ "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 }, { "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
{ "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT|256, 0, 0, 2 }, { "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT|256, 0, 0, 2 },
{ "cl_deathmessages", "cl_deathmessages: enable/disable multiplayer death messages", (void*)&ud.deathmsgs, CVAR_BOOL, 0, 0, 1 },
{ "cl_democams", "cl_democams: enable/disable demo playback cameras", (void*)&ud.democams, CVAR_BOOL, 0, 0, 1 }, { "cl_democams", "cl_democams: enable/disable demo playback cameras", (void*)&ud.democams, CVAR_BOOL, 0, 0, 1 },
{ "cl_drawweapon", "cl_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 0, 2 }, { "cl_drawweapon", "cl_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 0, 2 },

View file

@ -3546,6 +3546,7 @@ void processinput(int snum)
FTA(116,&ps[p->frag_ps]); FTA(116,&ps[p->frag_ps]);
} }
if (ud.deathmsgs)
{ {
char name1[32],name2[32]; char name1[32],name2[32];
@ -3615,9 +3616,12 @@ void processinput(int snum)
} }
else Bsprintf(tempbuf,fta_quotes[PSDEATHSTRINGS+3],&ud.user_name[snum][0],p->team+1); else Bsprintf(tempbuf,fta_quotes[PSDEATHSTRINGS+3],&ud.user_name[snum][0],p->team+1);
if (ScreenWidth >= 800) if (ud.deathmsgs)
adduserquote(tempbuf); {
else OSD_Printf("%s\n",stripcolorcodes(tempbuf)); if (ScreenWidth >= 800)
adduserquote(tempbuf);
else OSD_Printf("%s\n",stripcolorcodes(tempbuf));
}
} }
if (myconnectindex == connecthead) if (myconnectindex == connecthead)