From ca8f8d21aea39da99f97b27a25e48a6d593538db Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 28 Sep 2008 11:00:59 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1080 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/anim.c | 9 +++ polymer/eduke32/source/astub.c | 2 +- polymer/eduke32/source/duke3d.h | 2 +- polymer/eduke32/source/game.c | 3 +- polymer/eduke32/source/gamedef.c | 65 ++++++++++++++++- polymer/eduke32/source/menus.c | 2 +- polymer/eduke32/source/player.c | 115 ++++++++++++++++--------------- polymer/eduke32/source/sector.c | 6 +- 8 files changed, 138 insertions(+), 66 deletions(-) diff --git a/polymer/eduke32/source/anim.c b/polymer/eduke32/source/anim.c index b1ed5797a..2316f4c54 100644 --- a/polymer/eduke32/source/anim.c +++ b/polymer/eduke32/source/anim.c @@ -209,6 +209,7 @@ void playanm(const char *fn,char t) int ogltexfiltermode=gltexfiltermode; #endif int32 handle=-1; + int frametime = 0; // return; @@ -258,8 +259,16 @@ void playanm(const char *fn,char t) ototalclock = totalclock + 10; + frametime = totalclock; + for (i=1;i frametime + 45) + { + OSD_Printf("WARNING: slowdown in %s, skipping playback\n",fn); + goto ENDOFANIMLOOP; + } + frametime = totalclock; while (totalclock < ototalclock) { if (KB_KeyWaiting() || MOUSE_GetButtons()&LEFT_MOUSE) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 93323e0e7..918f4bd79 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#define BUILDDATE " 20080924" +#define BUILDDATE " 20080928" #define VERSION " 1.2.0devel" static int floor_over_floor; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 446df3de0..112fe13e3 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define APPNAME "EDuke32" #define VERSION " 1.5.0devel" // this is checked against http://eduke32.com/VERSION -#define BUILDDATE " 20080924" +#define BUILDDATE " 20080928" #define HEAD2 APPNAME VERSION BUILDDATE #ifdef __cplusplus diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index ce9db9a35..d573ff2b5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -13027,7 +13027,6 @@ FRAGBONUS: } if (playerbest > 0) for (ii=playerbest/(26*60), ij=1; ii>9; ii/=10, ij++) ; clockpad = max(clockpad,ij); - clockpad += 2; } while (1) @@ -13139,7 +13138,7 @@ FRAGBONUS: ); gametext((320>>2)+71,yy+9,tempbuf,0,2+8+16); if (g_player[myconnectindex].ps->player_par < playerbest) - gametext((320>>2)+71+(clockpad*24),yy+9,"New record!",0,2+8+16); + gametext((320>>2)+89+(clockpad*24),yy+9,"New record!",0,2+8+16); yy+=10; if (!(ud.volume_number == 0 && ud.last_level-1 == 7)) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 909fe263a..c3a1793e4 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -5605,6 +5605,9 @@ static void InitProjectiles(void) Bmemcpy(&defaultprojectile, &projectile, sizeof(projectile)); } +extern int g_NumObituaries; +extern int g_NumSelfObituaries; + void loadefs(const char *filenam) { char *mptr; @@ -5813,6 +5816,7 @@ void loadefs(const char *filenam) } { + /* const char *ppdeathstrings[] = { "^2%s ^2was kicked to the curb by %s", @@ -5856,8 +5860,62 @@ void loadefs(const char *filenam) "^2%s ^2got fragged by a monster. It was probably a liztroop.", "^2%s ^2switched to team %d" }; + */ - for (i=(sizeof(ppdeathstrings)/sizeof(ppdeathstrings[0]))-1;i>=0;i--) + const char *ppdeathstrings[] = + { + "^02%s^02 beat %s^02 like a cur", + "^02%s^02 broke %s", + "^02%s^02 body bagged %s", + "^02%s^02 boned %s^02 like a fish", + "^02%s^02 castrated %s", + "^02%s^02 creamed %s", + "^02%s^02 crushed %s", + "^02%s^02 destroyed %s", + "^02%s^02 diced %s", + "^02%s^02 disemboweled %s", + "^02%s^02 eviscerated %s", + "^02%s^02 flattened %s", + "^02%s^02 gave AnAl MaDnEsS to %s", + "^02%s^02 gave %s^02 Anal Justice", + "^02%s^02 hosed %s", + "^02%s^02 hurt %s^02 real bad", + "^02%s^02 killed %s", + "^02%s^02 made dog meat out of %s", + "^02%s^02 made mincemeat out of %s", + "^02%s^02 massacred %s", + "^02%s^02 mutilated %s", + "^02%s^02 murdered %s", + "^02%s^02 neutered %s", + "^02%s^02 reamed %s", + "^02%s^02 ripped %s^02 a new orifice", + "^02%s^02 rocked %s", + "^02%s^02 sent %s^02 to hell", + "^02%s^02 slaughtered %s", + "^02%s^02 sliced %s", + "^02%s^02 smashed %s", + "^02%s^02 snuffed %s", + "^02%s^02 sodomized %s", + "^02%s^02 splattered %s", + "^02%s^02 sprayed %s", + "^02%s^02 squashed %s", + "^02%s^02 throttled %s", + "^02%s^02 toasted %s", + "^02%s^02 ventilated %s", + "^02%s^02 wasted %s", + }; + + const char *psdeathstrings[] = + { + "^02%s^02 is excrement", + "^02%s^02 is hamburger", + "^02%s^02 suffered scrotum separation", + "^02%s^02 volunteered for population control", + "^02%s^02 has suicided", + }; + + g_NumObituaries = (sizeof(ppdeathstrings)/sizeof(ppdeathstrings[0])); + for (i=g_NumObituaries-1;i>=0;i--) { if (fta_quotes[i+PPDEATHSTRINGS] == NULL) { @@ -5866,12 +5924,13 @@ void loadefs(const char *filenam) } } - for (i=(sizeof(podeathstrings)/sizeof(podeathstrings[0]))-1;i>=0;i--) + g_NumSelfObituaries = (sizeof(psdeathstrings)/sizeof(psdeathstrings[0])); + for (i=g_NumSelfObituaries-1;i>=0;i--) { if (fta_quotes[i+PSDEATHSTRINGS] == NULL) { fta_quotes[i+PSDEATHSTRINGS] = Bcalloc(MAXQUOTELEN,sizeof(char)); - Bstrcpy(fta_quotes[i+PSDEATHSTRINGS],podeathstrings[i]); + Bstrcpy(fta_quotes[i+PSDEATHSTRINGS],psdeathstrings[i]); } } } diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 7392dc7a2..74c1fd9b5 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2891,7 +2891,7 @@ cheat_for_port_credits: "Show inv & pickup messages", "HUD weapon display", "Use alternate HUD", - "Demo playback cameras", + "Use camera view in demos", "-", "DM: Ignore map votes", "DM: Use private messages", diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index d452755d2..e8f30d074 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -3291,6 +3291,9 @@ void checkweapons(player_struct *p) } } +int g_NumObituaries = 0; +int g_NumSelfObituaries = 0; + void processinput(int snum) { int j, i, k, doubvel, fz, cz, hz, lz, truefdist, x, y, shrunk; @@ -3590,56 +3593,55 @@ void processinput(int snum) if (ud.obituaries) { - char name1[32],name2[32]; - - if (GTFLAGS(GAMETYPE_FLAG_PLAYERSFRIENDLY) || (GTFLAGS(GAMETYPE_FLAG_TDM) && g_player[snum].ps->team == g_player[p->frag_ps].ps->team)) - i = 9; - else - { - // temp_data[1] on a player's APLAYER actor means the player is frozen - if (hittype[p->i].temp_data[1] == 1) - i = 7; - else switch (dynamictostatic[hittype[p->i].picnum]) - { - case KNEE__STATIC: - i = 0; - break; - case SHOTSPARK1__STATIC: - switch (g_player[p->frag_ps].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; - } - } - Bstrcpy(name1,&g_player[snum].user_name[0]); - Bstrcpy(name2,&g_player[p->frag_ps].user_name[0]); - - Bsprintf(tempbuf,fta_quotes[PPDEATHSTRINGS+i+(mulscale(krand(), 3, 16)*10)],name1,name2); + /* + if (GTFLAGS(GAMETYPE_FLAG_PLAYERSFRIENDLY) || (GTFLAGS(GAMETYPE_FLAG_TDM) && g_player[snum].ps->team == g_player[p->frag_ps].ps->team)) + i = 9; + else + { + // temp_data[1] on a player's APLAYER actor means the player is frozen + if (hittype[p->i].temp_data[1] == 1) + i = 7; + else switch (dynamictostatic[hittype[p->i].picnum]) + { + case KNEE__STATIC: + i = 0; + break; + case SHOTSPARK1__STATIC: + switch (g_player[p->frag_ps].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; + } + } + */ + Bsprintf(tempbuf,fta_quotes[PPDEATHSTRINGS+(krand()%g_NumObituaries)], + &g_player[p->frag_ps].user_name[0], + &g_player[snum].user_name[0]); if (ud.config.ScreenWidth >= 800) adduserquote(tempbuf); else OSD_Printf("%s\n",tempbuf); @@ -3652,13 +3654,16 @@ void processinput(int snum) { p->fraggedself++; if (badguypic(sprite[p->wackedbyactor].picnum)) - i = 2; + Bsprintf(tempbuf,fta_quotes[PPDEATHSTRINGS+(krand()%g_NumObituaries)],"A monster",&g_player[snum].user_name[0]); else if (hittype[p->i].picnum == NUKEBUTTON) - i = 1; - else i = 0; - Bsprintf(tempbuf,fta_quotes[PSDEATHSTRINGS+i],&g_player[snum].user_name[0]); + Bsprintf(tempbuf,"^02%s^02 tried to leave",&g_player[snum].user_name[0]); + else + { + // random suicide death string + Bsprintf(tempbuf,fta_quotes[PSDEATHSTRINGS+(krand()%g_NumSelfObituaries)],&g_player[snum].user_name[0]); + } } - else Bsprintf(tempbuf,fta_quotes[PSDEATHSTRINGS+3],&g_player[snum].user_name[0],p->team+1); + else Bsprintf(tempbuf,"^02%s^02 switched to team %d",&g_player[snum].user_name[0],p->team+1); if (ud.obituaries) { diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index 7416a059e..93032282b 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -284,9 +284,9 @@ void doanimations(void) { stopinterpolation(animateptr[i]); - // This fixes a bug where wall or floor sprites contained in - // elevator sectors (ST 16-19) would jitter vertically after the - // elevator had stopped. + // This fixes a bug where wall or floor sprites contained in + // elevator sectors (ST 16-19) would jitter vertically after the + // elevator had stopped. if (animateptr[i] == §or[animatesect[i]].floorz) for (j=headspritesect[dasect];j>=0;j=nextspritesect[j]) if (sprite[j].statnum != 3)