From b4ed27fa7d690d6b82736704c8b2d175a07139b3 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 22 Aug 2006 21:02:06 +0000 Subject: [PATCH] Somebody needed an 'ezshootvar'. These commands are getting ridiculous. git-svn-id: https://svn.eduke32.com/eduke32@276 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 4 ++-- polymer/eduke32/source/gamedef.c | 4 ++++ polymer/eduke32/source/gamedef.h | 2 ++ polymer/eduke32/source/gameexec.c | 14 ++++++++++++-- polymer/eduke32/source/player.c | 4 +++- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 059c6d602..6dd0532ac 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10914,7 +10914,7 @@ FRAGBONUS: if( KB_KeyPressed( sc_F12 ) ) { KB_ClearKeyDown( sc_F12 ); - screencapture("eduke0000.tga",0); + screencapture("duke0000.tga",0); } if(bonusonly || ud.multimode > 1) return; @@ -11126,7 +11126,7 @@ FRAGBONUS: if( KB_KeyPressed( sc_F12 ) ) { KB_ClearKeyDown( sc_F12 ); - screencapture("eduke0000.tga",0); + screencapture("duke0000.tga",0); } if( totalclock < (60*13) ) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 56b454ccc..91d5a729e 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -439,6 +439,8 @@ char *keyw[] = { "findnearactorzvar", // 292 "findnearspritez", // 293 "findnearspritezvar", // 294 + "zshootvar", // 295 + "ezshootvar", // 296 "" }; @@ -4136,6 +4138,8 @@ repeatcase: case CON_CHANGESPRITESTAT: case CON_CHANGESPRITESECT: + case CON_ZSHOOTVAR: + case CON_EZSHOOTVAR: if(!CheckEventSync(current_event)) ReportError(WARNING_EVENTSYNC); case CON_GETPNAME: diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index e88a713ac..c0e4fa106 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -726,5 +726,7 @@ enum keywords { CON_FINDNEARACTORZVAR, // 292 CON_FINDNEARSPRITEZ, // 293 CON_FINDNEARSPRITEZVAR, // 294 + CON_ZSHOOTVAR, // 295 + CON_EZSHOOTVAR, // 296 END }; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 9ae0a9064..7265b3eae 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -4548,16 +4548,26 @@ SKIPJIBS: case CON_SHOOTVAR: case CON_ESHOOTVAR: + case CON_EZSHOOTVAR: + case CON_ZSHOOTVAR: { long lIn, lReturn=-1; insptr++; + if(tw == CON_ZSHOOTVAR || tw == CON_EZSHOOTVAR) + { + hittype[g_i].temp_data[9] = GetGameVarID(*insptr++, g_i, g_p); + if (hittype[g_i].temp_data[9] == 0) + hittype[g_i].temp_data[9] = 1; + } lIn=GetGameVarID(*insptr++, g_i, g_p); if(g_sp->sectnum >= 0 && g_sp->sectnum < MAXSECTORS) + { lReturn = shoot(g_i, lIn); - if (tw == CON_ESHOOTVAR) - SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p); + if (tw == CON_ESHOOTVAR || tw == CON_EZSHOOTVAR) + SetGameVarID(g_iReturnVarID, lReturn, g_i, g_p); + } break; } diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index a8623f304..00b29a8e5 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2707,6 +2707,7 @@ void getinput(short snum) loc.avel = angvel = 0; loc.horz = horiz = 0; loc.bits = (((long)gamequit)<<26); + loc.extbits = 0; return; } @@ -3484,7 +3485,7 @@ void processinput(short snum) if(p->frag_ps != snum) { if(GTFLAGS(GAMETYPE_FLAG_TDM) && ps[p->frag_ps].team == ps[snum].team) - p->fraggedself++; + ps[p->frag_ps].fraggedself++; else { ps[p->frag_ps].frag++; @@ -5112,6 +5113,7 @@ void computergetinput(long snum, input *syn) syn->avel = 0; syn->horz = 0; syn->bits = 0; + syn->extbits = 0; x1 = sprite[p->i].x; y1 = sprite[p->i].y;