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

This commit is contained in:
terminx 2008-02-16 22:18:48 +00:00
parent 7d36a601e4
commit 2f4028c265
6 changed files with 38 additions and 27 deletions

View file

@ -1657,7 +1657,7 @@ void editinput(void)
repeatpanalign = (keystatus[0x2a]|keystatus[0x36]); repeatpanalign = (keystatus[0x2a]|keystatus[0x36]);
if ((keystatus[0x4b]|keystatus[0x4d]) > 0) // 4 & 6 (keypad) if ((keystatus[0x4b]|keystatus[0x4d]) > 0) // 4 & 6 (keypad)
{ {
if ((repeatcountx == 0) || (repeatcountx > 16)) if ((repeatcountx == 0) || (repeatcountx > 32))
{ {
changedir = 0; changedir = 0;
if (keystatus[0x4b] > 0) changedir = -1; if (keystatus[0x4b] > 0) changedir = -1;
@ -1684,16 +1684,16 @@ void editinput(void)
sprite[searchwall].xrepeat = 4; sprite[searchwall].xrepeat = 4;
} }
asksave = 1; asksave = 1;
repeatcountx = max(1,repeatcountx); repeatcountx = max(1,repeatcountx-2);
} }
repeatcountx += (synctics>>1); repeatcountx += synctics;
} }
else else
repeatcountx = 0; repeatcountx = 0;
if ((keystatus[0x48]|keystatus[0x50]) > 0) // 2 & 8 (keypad) if ((keystatus[0x48]|keystatus[0x50]) > 0) // 2 & 8 (keypad)
{ {
if ((repeatcounty == 0) || (repeatcounty > 16)) if ((repeatcounty == 0) || (repeatcounty > 32))
{ {
changedir = 0; changedir = 0;
if (keystatus[0x48] > 0) changedir = -1; if (keystatus[0x48] > 0) changedir = -1;
@ -1720,9 +1720,9 @@ void editinput(void)
sprite[searchwall].yrepeat = 4; sprite[searchwall].yrepeat = 4;
} }
asksave = 1; asksave = 1;
repeatcounty = max(1,repeatcounty); repeatcounty = max(1,repeatcounty-2);
} }
repeatcounty += (synctics>>1); repeatcounty += synctics;
//} //}
} }
else else

View file

@ -6723,7 +6723,7 @@ void animatesprites(int x,int y,int a,int smoothratio)
} }
} }
if ((display_mirror || screenpeek != p || s->owner == -1) && ud.multimode > 1) if (ud.multimode > 1 && (display_mirror || screenpeek != p || s->owner == -1))
{ {
if (ud.showweapons && sprite[g_player[p].ps->i].extra > 0 && g_player[p].ps->curr_weapon > 0) if (ud.showweapons && sprite[g_player[p].ps->i].extra > 0 && g_player[p].ps->curr_weapon > 0)
{ {
@ -6731,17 +6731,19 @@ void animatesprites(int x,int y,int a,int smoothratio)
tsprite[spritesortcnt].statnum = 99; tsprite[spritesortcnt].statnum = 99;
tsprite[spritesortcnt].yrepeat = (t->yrepeat>>3); /* tsprite[spritesortcnt].yrepeat = (t->yrepeat>>3);
if (t->yrepeat < 4) t->yrepeat = 4; if (t->yrepeat < 4) t->yrepeat = 4; */
tsprite[spritesortcnt].shade = t->shade; tsprite[spritesortcnt].shade = t->shade;
tsprite[spritesortcnt].cstat = 0; tsprite[spritesortcnt].cstat = 0;
tsprite[spritesortcnt].pal = 0;
tsprite[spritesortcnt].picnum = (g_player[p].ps->curr_weapon==GROW_WEAPON?GROWSPRITEICON:weapon_sprites[g_player[p].ps->curr_weapon]); tsprite[spritesortcnt].picnum = (g_player[p].ps->curr_weapon==GROW_WEAPON?GROWSPRITEICON:weapon_sprites[g_player[p].ps->curr_weapon]);
if (s->owner >= 0) if (s->owner >= 0)
tsprite[spritesortcnt].z = g_player[p].ps->posz-(12<<8); tsprite[spritesortcnt].z = g_player[p].ps->posz-(12<<8);
else tsprite[spritesortcnt].z = s->z-(51<<8); else tsprite[spritesortcnt].z = s->z-(51<<8);
if (tsprite[spritesortcnt].picnum == HEAVYHBOMB) if (tsprite[spritesortcnt].picnum == HEAVYHBOMB)
{ {
tsprite[spritesortcnt].xrepeat = 10; tsprite[spritesortcnt].xrepeat = 10;
@ -6752,7 +6754,6 @@ void animatesprites(int x,int y,int a,int smoothratio)
tsprite[spritesortcnt].xrepeat = 16; tsprite[spritesortcnt].xrepeat = 16;
tsprite[spritesortcnt].yrepeat = 16; tsprite[spritesortcnt].yrepeat = 16;
} }
tsprite[spritesortcnt].pal = 0;
spritesortcnt++; spritesortcnt++;
} }

View file

@ -441,6 +441,7 @@ static const char *keyw[] =
"gametextz", // 311 "gametextz", // 311
"digitalnumberz", // 312 "digitalnumberz", // 312
"spritenopal", // 313 "spritenopal", // 313
"hitradiusvar", // 314
"<null>" "<null>"
}; };
@ -2545,6 +2546,11 @@ static int parsecommand(void)
} }
return 0; return 0;
case CON_HITRADIUSVAR:
if (!CheckEventSync(current_event))
ReportError(WARNING_EVENTSYNC);
transmultvars(5);
break;
case CON_HITRADIUS: case CON_HITRADIUS:
transnum(LABEL_DEFINE); transnum(LABEL_DEFINE);
transnum(LABEL_DEFINE); transnum(LABEL_DEFINE);

View file

@ -797,5 +797,6 @@ enum keywords
CON_GAMETEXTZ, // 311 CON_GAMETEXTZ, // 311
CON_DIGITALNUMBERZ, // 312 CON_DIGITALNUMBERZ, // 312
CON_SPRITENOPAL, // 313 CON_SPRITENOPAL, // 313
CON_HITRADIUSVAR, // 314
END END
}; };

View file

@ -35,6 +35,8 @@ static int g_x,*g_t;
static spritetype *g_sp; static spritetype *g_sp;
static int killit_flag; static int killit_flag;
static int parse(void);
static void DoUserDef(int iSet, int lLabelID, int lVar2) static void DoUserDef(int iSet, int lLabelID, int lVar2)
{ {
int lValue; int lValue;
@ -3712,8 +3714,6 @@ static void DoProjectile(int iSet, int lVar1, int lLabelID, int lVar2)
} }
} }
static int parse(void);
void OnEvent(int iEventID, int iActor, int iPlayer, int lDist) void OnEvent(int iEventID, int iActor, int iPlayer, int lDist)
{ {
if (iEventID >= MAXGAMEEVENTS) if (iEventID >= MAXGAMEEVENTS)
@ -6094,6 +6094,15 @@ static int parse(void)
insptr++; insptr++;
break; break;
case CON_HITRADIUSVAR:
insptr++;
{
int v1=GetGameVarID(*insptr++,g_i,g_p),v2=GetGameVarID(*insptr++,g_i,g_p),v3=GetGameVarID(*insptr++,g_i,g_p);
int v4=GetGameVarID(*insptr++,g_i,g_p),v5=GetGameVarID(*insptr++,g_i,g_p);
hitradius(g_i,v1,v2,v3,v4,v5);
}
break;
case CON_HITRADIUS: case CON_HITRADIUS:
hitradius(g_i,*(insptr+1),*(insptr+2),*(insptr+3),*(insptr+4),*(insptr+5)); hitradius(g_i,*(insptr+1),*(insptr+2),*(insptr+3),*(insptr+4),*(insptr+5));
insptr+=6; insptr+=6;
@ -6101,9 +6110,9 @@ static int parse(void)
case CON_IFP: case CON_IFP:
{ {
insptr++; // insptr++;
l = *insptr; l = *(++insptr);
j = 0; j = 0;
s = sprite[g_player[g_p].ps->i].xvel; s = sprite[g_player[g_p].ps->i].xvel;

View file

@ -3227,9 +3227,7 @@ short weapon_sprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATIC, SHOT
void checkweapons(player_struct *p) void checkweapons(player_struct *p)
{ {
int cw, snum = sprite[p->i].yvel; int snum = sprite[p->i].yvel, cw = aplWeaponWorksLike[p->curr_weapon][snum];
cw = aplWeaponWorksLike[p->curr_weapon][snum];
if (cw < 1 || cw >= MAX_WEAPONS) return; if (cw < 1 || cw >= MAX_WEAPONS) return;
@ -3249,23 +3247,20 @@ void checkweapons(player_struct *p)
void processinput(int snum) void processinput(int snum)
{ {
int j, i, k, doubvel, fz, cz, hz, lz, truefdist, x, y; int j, i, k, doubvel, fz, cz, hz, lz, truefdist, x, y, shrunk;
int shrunk; unsigned int sb_snum = g_player[snum].sync->bits;
unsigned int sb_snum; short tempsect;
int psect, psectlotag;
short *kb, tempsect;
player_struct *p = g_player[snum].ps; player_struct *p = g_player[snum].ps;
int pi = p->i; int pi = p->i;
spritetype *s = &sprite[pi]; spritetype *s = &sprite[pi];
short *kb = &p->kickback_pic;
kb = &p->kickback_pic; int psect = p->cursectnum, psectlotag;
p->player_par++; p->player_par++;
OnEvent(EVENT_PROCESSINPUT, pi, snum, -1); OnEvent(EVENT_PROCESSINPUT, pi, snum, -1);
if (p->cheat_phase <= 0) sb_snum = g_player[snum].sync->bits; if (p->cheat_phase > 0) sb_snum = 0;
else sb_snum = 0;
if ((sb_snum&(1<<2))) if ((sb_snum&(1<<2)))
{ {
@ -3275,7 +3270,6 @@ void processinput(int snum)
sb_snum &= ~(1<<2); sb_snum &= ~(1<<2);
} }
psect = p->cursectnum;
if (psect == -1) if (psect == -1)
{ {
if (s->extra > 0 && ud.clipping == 0) if (s->extra > 0 && ud.clipping == 0)