From b54b8e1e6b0e6cda6fa5d9f914f44bb10ea1c28d Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 24 Mar 2007 23:17:56 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@529 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/config.c | 2 +- polymer/eduke32/source/config.c | 9 ++++++--- polymer/eduke32/source/duke3d.h | 2 +- polymer/eduke32/source/game.c | 10 +++++----- polymer/eduke32/source/gamedef.c | 2 ++ polymer/eduke32/source/gamedef.h | 4 +++- polymer/eduke32/source/gameexec.c | 14 ++++++++++++++ polymer/eduke32/source/osdcmds.c | 2 ++ polymer/eduke32/source/player.c | 10 +++++++--- 9 files changed, 41 insertions(+), 14 deletions(-) diff --git a/polymer/build/src/config.c b/polymer/build/src/config.c index 1d0896078..db44714b8 100644 --- a/polymer/build/src/config.c +++ b/polymer/build/src/config.c @@ -303,7 +303,7 @@ int writesetup(const char *fn) "key2dzoomout = %X\n" "keychat = %X\n" #endif - "; Console key scancode, in hex\n" +// "; Console key scancode, in hex\n" "keyconsole = %X\n" "\n", diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 4e87f6530..840f9fcf6 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -269,6 +269,7 @@ void CONFIG_SetDefaults(void) ud.brightness = 8; ud.color = 0; ud.crosshair = 2; + ud.deathmsgs = 1; ud.democams = 1; ud.detail = 1; ud.drawweapon = 1; @@ -291,7 +292,7 @@ void CONFIG_SetDefaults(void) ud.viewbob = 1; ud.weaponsway = 1; ud.weaponswitch = 3; // new+empty - ud.angleinterpolation = 50; + ud.angleinterpolation = 0; UseJoystick = 0; UseMouse = 1; VoiceToggle = 2; @@ -704,6 +705,7 @@ int32 CONFIG_ReadSetup(void) SCRIPT_GetNumber(scripthandle, "Misc", "ShowOpponentWeapons",&ShowOpponentWeapons); ud.showweapons = ShowOpponentWeapons; 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", "ShowFPS",&ud.tickrate); 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", "Color",ud.color,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); ud.executions++; 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", "ViewBobbing",ud.viewbob,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); #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", "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 #ifdef RENDERTYPEWIN SCRIPT_PutNumber(scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false); diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index e2621e95f..37773e001 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -366,7 +366,7 @@ struct user_defs { int32 entered_name,screen_tilting,shadows,fta_on,executions,auto_run; 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 m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 2e097ffd3..a7b29f0ae 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -4380,7 +4380,6 @@ int spawn(int j, int pn) T1 = T2 = T3 = T4 = T5 = T6 = T7 = T8 = T9 = 0; - ResetActorGameVars(i); // this shouldn't be necessary actorspriteflags[i] = 0; sprpos[i].x = sprite[i].x; @@ -9991,14 +9990,12 @@ void app_main(int argc,char **argv) 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); else - { initprintf("Using group file '%s' as main group file.\n", duke3dgrp); - autoloadgrps(duke3dgrp); - } getfilenames("autoload","*.grp"); 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"); 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); { diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 64642ae09..f9f89c9e4 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -814,6 +814,8 @@ LABELS userdefslabels[]= { "team", USERDEFS_TEAM, 0, 0 }, { "viewbob", USERDEFS_VIEWBOB, 0, 0 }, { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 }, + { "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 }, + { "deathmsgs", USERDEFS_DEATHMSGS, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index b1085c06a..c5333dc65 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -316,7 +316,9 @@ enum userdefslabels { USERDEFS_IDPLAYERS, USERDEFS_TEAM, USERDEFS_VIEWBOB, - USERDEFS_WEAPONSWAY + USERDEFS_WEAPONSWAY, + USERDEFS_ANGLEINTERPOLATION, + USERDEFS_DEATHMSGS }; enum sectorlabels { diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 43f2f81e3..dabe3a23b 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -679,6 +679,20 @@ static void DoUserDef(int iSet, int lLabelID, int lVar2) SetGameVarID(lVar2, ud.weaponsway, g_i, g_p); 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: break; } diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 3865546fa..f25538cae 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -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_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_drawweapon", "cl_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 0, 2 }, diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index b80be2e7f..f941e84d4 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -3546,6 +3546,7 @@ void processinput(int snum) FTA(116,&ps[p->frag_ps]); } + if (ud.deathmsgs) { 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); - if (ScreenWidth >= 800) - adduserquote(tempbuf); - else OSD_Printf("%s\n",stripcolorcodes(tempbuf)); + if (ud.deathmsgs) + { + if (ScreenWidth >= 800) + adduserquote(tempbuf); + else OSD_Printf("%s\n",stripcolorcodes(tempbuf)); + } } if (myconnectindex == connecthead)