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

This commit is contained in:
terminx 2006-10-10 23:04:38 +00:00
parent ae3a91cc06
commit cbade0ca16
4 changed files with 74 additions and 89 deletions

View file

@ -569,6 +569,9 @@ short shoot(short i,short atwith)
{ {
k = spawn(j,projectile[atwith].spawns); k = spawn(j,projectile[atwith].spawns);
sprite[k].z -= (8<<8); sprite[k].z -= (8<<8);
hittype[k].temp_data[6] = hitwall;
hittype[k].temp_data[7] = hitsect;
hittype[k].temp_data[8] = hitspr;
} }
if (projectile[atwith].sound > -1) spritesound(projectile[atwith].sound,j); if (projectile[atwith].sound > -1) spritesound(projectile[atwith].sound,j);
} }
@ -729,6 +732,9 @@ short shoot(short i,short atwith)
wh=spawn(k,projectile[atwith].spawns); wh=spawn(k,projectile[atwith].spawns);
if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat; if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat;
if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat; if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat;
hittype[wh].temp_data[6] = hitwall;
hittype[wh].temp_data[7] = hitsect;
hittype[wh].temp_data[8] = hitspr;
} }
} }
@ -750,6 +756,9 @@ short shoot(short i,short atwith)
wh=spawn(k,projectile[atwith].spawns); wh=spawn(k,projectile[atwith].spawns);
if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat; if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat;
if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat; if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat;
hittype[wh].temp_data[6] = hitwall;
hittype[wh].temp_data[7] = hitsect;
hittype[wh].temp_data[8] = hitspr;
} }
} }
if(p >= 0 && ( if(p >= 0 && (
@ -773,6 +782,9 @@ short shoot(short i,short atwith)
wh=spawn(k,projectile[atwith].spawns); wh=spawn(k,projectile[atwith].spawns);
if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat; if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat;
if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat; if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat;
hittype[wh].temp_data[6] = hitwall;
hittype[wh].temp_data[7] = hitsect;
hittype[wh].temp_data[8] = hitspr;
} }
if( isadoorwall(wall[hitwall].picnum) == 1 ) if( isadoorwall(wall[hitwall].picnum) == 1 )
goto DOSKIPBULLETHOLE; goto DOSKIPBULLETHOLE;
@ -875,6 +887,9 @@ DOSKIPBULLETHOLE:
wh=spawn(k,projectile[atwith].spawns); wh=spawn(k,projectile[atwith].spawns);
if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat; if (projectile[atwith].sxrepeat > 4) sprite[wh].xrepeat=projectile[atwith].sxrepeat;
if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat; if (projectile[atwith].syrepeat > 4) sprite[wh].yrepeat=projectile[atwith].syrepeat;
hittype[wh].temp_data[6] = hitwall;
hittype[wh].temp_data[7] = hitsect;
hittype[wh].temp_data[8] = hitspr;
} }
} }
else sprite[k].xrepeat = sprite[k].yrepeat = 0; else sprite[k].xrepeat = sprite[k].yrepeat = 0;
@ -1094,6 +1109,9 @@ DOSKIPBULLETHOLE:
k = spawn(j,SMALLSMOKE); k = spawn(j,SMALLSMOKE);
sprite[k].z -= (8<<8); sprite[k].z -= (8<<8);
spritesound(KICK_HIT,j); spritesound(KICK_HIT,j);
hittype[k].temp_data[6] = hitwall;
hittype[k].temp_data[7] = hitsect;
hittype[k].temp_data[8] = hitspr;
} }
if ( p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400 ) if ( p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400 )
@ -1235,7 +1253,10 @@ DOSKIPBULLETHOLE:
else else
checkhitceiling(hitsect); checkhitceiling(hitsect);
} }
spawn(k,SMALLSMOKE); l = spawn(k,SMALLSMOKE);
hittype[l].temp_data[6] = hitwall;
hittype[l].temp_data[7] = hitsect;
hittype[l].temp_data[8] = hitspr;
} }
if(hitspr >= 0) if(hitspr >= 0)
@ -1250,7 +1271,13 @@ DOSKIPBULLETHOLE:
sprite[l].xrepeat = sprite[l].yrepeat = 24; sprite[l].xrepeat = sprite[l].yrepeat = 24;
sprite[l].ang += 64-(TRAND&127); sprite[l].ang += 64-(TRAND&127);
} }
else spawn(k,SMALLSMOKE); else
{
l = spawn(k,SMALLSMOKE);
hittype[l].temp_data[6] = hitwall;
hittype[l].temp_data[7] = hitsect;
hittype[l].temp_data[8] = hitspr;
}
if(p >= 0 && ( if(p >= 0 && (
sprite[hitspr].picnum == DIPSWITCH || sprite[hitspr].picnum == DIPSWITCH ||
@ -1268,7 +1295,10 @@ DOSKIPBULLETHOLE:
} }
else if( hitwall >= 0 ) else if( hitwall >= 0 )
{ {
spawn(k,SMALLSMOKE); l = spawn(k,SMALLSMOKE);
hittype[l].temp_data[6] = hitwall;
hittype[l].temp_data[7] = hitsect;
hittype[l].temp_data[8] = hitspr;
if( isadoorwall(wall[hitwall].picnum) == 1 ) if( isadoorwall(wall[hitwall].picnum) == 1 )
goto SKIPBULLETHOLE; goto SKIPBULLETHOLE;
@ -1351,7 +1381,12 @@ SKIPBULLETHOLE:
{ {
checkhitsprite(hitspr,k); checkhitsprite(hitspr,k);
if( sprite[hitspr].picnum != APLAYER ) if( sprite[hitspr].picnum != APLAYER )
spawn(k,SMALLSMOKE); {
l = spawn(k,SMALLSMOKE);
hittype[l].temp_data[6] = hitwall;
hittype[l].temp_data[7] = hitsect;
hittype[l].temp_data[8] = hitspr;
}
else sprite[k].xrepeat = sprite[k].yrepeat = 0; else sprite[k].xrepeat = sprite[k].yrepeat = 0;
} }
else if( hitwall >= 0 ) else if( hitwall >= 0 )

View file

@ -126,7 +126,7 @@ int loadplayer(signed char spot)
} }
if (kdfread(&nump,sizeof(nump),1,fil) != 1) return -1; if (kdfread(&nump,sizeof(nump),1,fil) != 1) return -1;
if(nump != numplayers) if(nump != ud.multimode)
{ {
kclose(fil); kclose(fil);
ototalclock = totalclock; ototalclock = totalclock;

View file

@ -2716,101 +2716,50 @@ CHECKINV1:
j = ( (sb_snum&(15<<8))>>8 ) - 1; j = ( (sb_snum&(15<<8))>>8 ) - 1;
if (j == 0) SetGameVarID(g_iReturnVarID,j,p->i,snum);
switch(j)
{ {
SetGameVarID(g_iReturnVarID,j,p->i,snum); case 0:
OnEvent(EVENT_WEAPKEY1,p->i,snum, -1); OnEvent(EVENT_WEAPKEY1,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 1:
}
if (j == 1)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY2,p->i,snum, -1); OnEvent(EVENT_WEAPKEY2,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 2:
}
if (j == 2)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY3,p->i,snum, -1); OnEvent(EVENT_WEAPKEY3,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 3:
}
if (j == 3)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY4,p->i,snum, -1); OnEvent(EVENT_WEAPKEY4,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 4:
}
if (j == 4)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY5,p->i,snum, -1); OnEvent(EVENT_WEAPKEY5,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 5:
}
if (j == 5)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY6,p->i,snum, -1); OnEvent(EVENT_WEAPKEY6,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 6:
}
if (j == 6)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY7,p->i,snum, -1); OnEvent(EVENT_WEAPKEY7,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 7:
}
if (j == 7)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY8,p->i,snum, -1); OnEvent(EVENT_WEAPKEY8,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 8:
}
if (j == 8)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY9,p->i,snum, -1); OnEvent(EVENT_WEAPKEY9,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 9:
}
if (j == 9)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_WEAPKEY10,p->i,snum, -1); OnEvent(EVENT_WEAPKEY10,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 10:
}
if (j == 10)
{
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_PREVIOUSWEAPON,p->i,snum, -1); OnEvent(EVENT_PREVIOUSWEAPON,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j) break;
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum); case 11:
OnEvent(EVENT_NEXTWEAPON,p->i,snum, -1);
break;
} }
if (j == 11) if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j)
{ j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum);
SetGameVarID(g_iReturnVarID,j,p->i,snum);
OnEvent(EVENT_NEXTWEAPON,p->i,snum, -1);
if((unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum) != j)
j = (unsigned long) GetGameVarID(g_iReturnVarID,p->i,snum);
}
if (p->reloading == 1) if (p->reloading == 1)
j = -1; j = -1;

View file

@ -232,8 +232,9 @@ char loadsound(unsigned short num)
fp = kopen4load(sounds[num],loadfromgrouponly); fp = kopen4load(sounds[num],loadfromgrouponly);
if(fp == -1) if(fp == -1)
{ {
Bsprintf(fta_quotes[113],"Sound %s(#%d) not found.",sounds[num],num); // Bsprintf(fta_quotes[113],"Sound %s(#%d) not found.",sounds[num],num);
FTA(113,&ps[myconnectindex]); // FTA(113,&ps[myconnectindex]);
initprintf("Sound %s(#%d) not found.\n",sounds[num],num);
return 0; return 0;
} }
@ -329,7 +330,7 @@ int xyzsound(short num,short i,long x,long y,long z)
break; break;
} }
if (ps[screenpeek].sound_pitch) pitch = ps[screenpeek].sound_pitch; if (ps[screenpeek].sound_pitch) pitch += ps[screenpeek].sound_pitch;
if( Sound[num].num > 0 && PN != MUSICANDSFX ) if( Sound[num].num > 0 && PN != MUSICANDSFX )
{ {