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

This commit is contained in:
terminx 2009-04-13 06:53:03 +00:00
parent 22a7ec1b3b
commit 3d7a6a3572
9 changed files with 180 additions and 167 deletions

View file

@ -149,7 +149,7 @@ typedef struct s_prprogrambit {
} _prprogrambit;
// LIGHTS
#define PR_MAXLIGHTS 256
#define PR_MAXLIGHTS 128
#define SHADOW_DEPTH_OFFSET 30
#define PR_MAXLIGHTPRIORITY 3

View file

@ -5733,8 +5733,8 @@ void uninitengine(void)
Bfree(tsprite);
if (spriteext != NULL)
Bfree(spriteext);
// if (spritesmooth != NULL)
// Bfree(spritesmooth);
if (spritesmooth != NULL)
Bfree(spritesmooth);
#endif
}

View file

@ -2701,7 +2701,7 @@ static void G_MoveWeapons(void)
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 1024, 255+(80<<8),0);
if (DynamicTileMap[s->picnum] == RPG__STATIC && ActorExtra[i].picnum != BOSS2 &&
s->xrepeat >= 10 && sector[s->sectnum].lotag != 2)
s->xrepeat >= 10 && sector[s->sectnum].lotag != 2)
{
j = A_Spawn(i,SMALLSMOKE);
sprite[j].z += (1<<8);
@ -5095,34 +5095,34 @@ static void G_MoveMisc(void) // STATNUM 5
case FORCERIPPLE__STATIC:
case TRANSPORTERSTAR__STATIC:
case TRANSPORTERBEAM__STATIC:
{
switch (DynamicTileMap[switchpicnum])
{
switch (DynamicTileMap[switchpicnum])
{
case BURNING__STATIC:
case BURNING2__STATIC:
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
if (s->z > ActorExtra[i].floorz + 2048) break;
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 64 * s->xrepeat, 255+(80<<8),0);
break;
case BURNING__STATIC:
case BURNING2__STATIC:
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
if (s->z > ActorExtra[i].floorz + 2048) break;
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 64 * s->xrepeat, 255+(80<<8),0);
break;
case EXPLOSION2__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 4096, 255+(80<<8),0);
break;
case FORCERIPPLE__STATIC:
case EXPLOSION2__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 4096, 255+(80<<8),0);
break;
case FORCERIPPLE__STATIC:
// case TRANSPORTERSTAR__STATIC:
case TRANSPORTERBEAM__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 80+(80<<8)+(255<<16),0);
break;
case SHRINKEREXPLOSION__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(255<<8)+(128<<16),0);
break;
}
case TRANSPORTERBEAM__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 80+(80<<8)+(255<<16),0);
break;
case SHRINKEREXPLOSION__STATIC:
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z, 2048, 128+(255<<8)+(128<<16),0);
break;
}
if (!actorscrptr[sprite[i].picnum])
goto BOLT;
p = A_FindPlayer(s,&x);
A_Execute(i,p,x);
goto BOLT;
}
}
case SHELL__STATIC:
case SHOTGUNSHELL__STATIC:

View file

@ -1759,7 +1759,7 @@ static void SoundDisplay()
// SoundToggle = 1;
while (keystatus[KEYSC_ESC]==0 && keystatus[KEYSC_Q]==0 && keystatus[KEYSC_F2]==0
&& keystatus[buildkeys[BK_MODE2D_3D]]==0) // quickjump to 3d mode
&& keystatus[buildkeys[BK_MODE2D_3D]]==0) // quickjump to 3d mode
{
if (handleevents())
{
@ -1993,7 +1993,7 @@ static void M32_MoveFX(void)
ht = s->hitag;
if (s->lotag < 999 && (unsigned)sector[s->sectnum].lotag < 9 &&
AmbienceToggle && sector[s->sectnum].floorz != sector[s->sectnum].ceilingz)
AmbienceToggle && sector[s->sectnum].floorz != sector[s->sectnum].ceilingz)
{
if ((g_sounds[s->lotag].m&2))
{
@ -2005,7 +2005,7 @@ static void M32_MoveFX(void)
for (j = headspritestat[0]; j >= 0; j = nextspritestat[j])
{
if (s->picnum == MUSICANDSFX && j != i && sprite[j].lotag < 999 &&
(sprite[j].filler&1) == 1 && dist(&sprite[j],(spritetype*)&pos) > x)
(sprite[j].filler&1) == 1 && dist(&sprite[j],(spritetype*)&pos) > x)
{
S_StopEnvSound(sprite[j].lotag,j);
break;
@ -9163,7 +9163,7 @@ int32_t parseconsounds(scriptfile *script)
if (g_sounds[sndnum].filename == NULL)
g_sounds[sndnum].filename = Bcalloc(slen+1,sizeof(uint8_t));
// Hopefully noone does memcpy(..., g_sounds[].filename, BMAX_PATH)
// Hopefully noone does memcpy(..., g_sounds[].filename, BMAX_PATH)
if (!g_sounds[sndnum].filename)
{
Bfree(definedname);

View file

@ -4530,7 +4530,8 @@ void G_DrawRooms(int32_t snum,int32_t smoothratio)
}
#ifdef POLYMER
if (getrendermode() == 4) {
if (getrendermode() == 4)
{
polymer_setanimatesprites(G_DoSpriteAnimations, ud.camerax,ud.cameray,ud.cameraang,smoothratio);
}
#endif
@ -7350,43 +7351,44 @@ PALONLY:
}
}
switch (DynamicTileMap[s->picnum-1])
{
case DIPSWITCH__STATIC:
case DIPSWITCH2__STATIC:
case DIPSWITCH3__STATIC:
case PULLSWITCH__STATIC:
case HANDSWITCH__STATIC:
case SLOTDOOR__STATIC:
case LIGHTSWITCH__STATIC:
case SPACELIGHTSWITCH__STATIC:
case SPACEDOORSWITCH__STATIC:
case FRANKENSTINESWITCH__STATIC:
case LIGHTSWITCH2__STATIC:
case POWERSWITCH1__STATIC:
case LOCKSWITCH1__STATIC:
case POWERSWITCH2__STATIC:
case TECHSWITCH__STATIC:
framelights[framelightcount & (PR_MAXLIGHTS-1)].radius = 0;
framelights[framelightcount & (PR_MAXLIGHTS-1)].sector = t->sectnum;
switch (DynamicTileMap[s->picnum-1])
{
case DIPSWITCH__STATIC:
case DIPSWITCH2__STATIC:
case DIPSWITCH3__STATIC:
case PULLSWITCH__STATIC:
case HANDSWITCH__STATIC:
case SLOTDOOR__STATIC:
case LIGHTSWITCH__STATIC:
case SPACELIGHTSWITCH__STATIC:
case SPACEDOORSWITCH__STATIC:
case FRANKENSTINESWITCH__STATIC:
case POWERSWITCH1__STATIC:
case LOCKSWITCH1__STATIC:
case POWERSWITCH2__STATIC:
case TECHSWITCH__STATIC:
case ACCESSSWITCH__STATIC:
case ACCESSSWITCH2__STATIC:
framelights[framelightcount & (PR_MAXLIGHTS-1)].radius = 0;
framelights[framelightcount & (PR_MAXLIGHTS-1)].sector = t->sectnum;
framelights[framelightcount & (PR_MAXLIGHTS-1)].x = t->x+((sintable[(t->ang+512)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].y = t->y+((sintable[(t->ang)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].z = t->z-1024;
framelights[framelightcount & (PR_MAXLIGHTS-1)].x = t->x+((sintable[(t->ang+512)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].y = t->y+((sintable[(t->ang)&2047])>>7);
framelights[framelightcount & (PR_MAXLIGHTS-1)].z = t->z-1024;
framelights[framelightcount & (PR_MAXLIGHTS-1)].range = 1024;
framelights[framelightcount & (PR_MAXLIGHTS-1)].range = 1024;
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[0] = 48;
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[1] = 255;
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[2] = 48;
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[0] = 48;
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[1] = 255;
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[2] = 48;
framelights[framelightcount & (PR_MAXLIGHTS-1)].priority = 2;
framelights[framelightcount & (PR_MAXLIGHTS-1)].priority = 2;
if (framelightcount < PR_MAXLIGHTS)
framelightcount++;
if (framelightcount < PR_MAXLIGHTS)
framelightcount++;
break;
}
break;
}
switch (DynamicTileMap[s->picnum])
{
@ -7400,11 +7402,12 @@ PALONLY:
case SPACELIGHTSWITCH__STATIC:
case SPACEDOORSWITCH__STATIC:
case FRANKENSTINESWITCH__STATIC:
case LIGHTSWITCH2__STATIC:
case POWERSWITCH1__STATIC:
case LOCKSWITCH1__STATIC:
case POWERSWITCH2__STATIC:
case TECHSWITCH__STATIC:
case ACCESSSWITCH__STATIC:
case ACCESSSWITCH2__STATIC:
framelights[framelightcount & (PR_MAXLIGHTS-1)].radius = 0;
framelights[framelightcount & (PR_MAXLIGHTS-1)].sector = t->sectnum;
@ -8186,11 +8189,11 @@ static void G_ShowScores(void)
if (playerswhenstarted > 1 && (GametypeFlags[ud.coop]&GAMETYPE_SCORESHEET))
{
/*
rotatesprite(160<<16,34<<16,65536L,0,INGAMEDUKETHREEDEE,0,0,10,0,0,xdim-1,ydim-1);
if (PLUTOPAK) // JBF 20030804
rotatesprite((260)<<16,36<<16,65536L,0,PLUTOPAKSPRITE+2,0,0,2+8,0,0,xdim-1,ydim-1);
*/
/*
rotatesprite(160<<16,34<<16,65536L,0,INGAMEDUKETHREEDEE,0,0,10,0,0,xdim-1,ydim-1);
if (PLUTOPAK) // JBF 20030804
rotatesprite((260)<<16,36<<16,65536L,0,PLUTOPAKSPRITE+2,0,0,2+8,0,0,xdim-1,ydim-1);
*/
gametext(160,SCORESHEETOFFSET+58+2,"MULTIPLAYER TOTALS",0,2+8+16);
gametext(160,SCORESHEETOFFSET+58+10,MapInfo[(ud.volume_number*MAXLEVELS)+ud.last_level-1].name,0,2+8+16);
@ -10978,25 +10981,25 @@ void app_main(int32_t argc,const char **argv)
glusetexcache = glusetexcachecompression = -1;
#endif
/*
#ifdef _WIN32
ud.config.CheckForUpdates = -1;
#endif
*/
/*
#ifdef _WIN32
ud.config.CheckForUpdates = -1;
#endif
*/
i = CONFIG_ReadSetup();
if (getenv("DUKE3DGRP")) duke3dgrp = getenv("DUKE3DGRP");
#ifdef _WIN32
/*
if (ud.config.CheckForUpdates == -1)
{
i=wm_ynbox("Automatic Update Notifications",
"Would you like to check for new versions of EDuke32 at startup?");
ud.config.CheckForUpdates = 0;
if (i) ud.config.CheckForUpdates = 1;
}
*/
/*
if (ud.config.CheckForUpdates == -1)
{
i=wm_ynbox("Automatic Update Notifications",
"Would you like to check for new versions of EDuke32 at startup?");
ud.config.CheckForUpdates = 0;
if (i) ud.config.CheckForUpdates = 1;
}
*/
// initprintf("build %d\n",(uint8_t)atoi(BUILDDATE));
@ -11042,8 +11045,8 @@ void app_main(int32_t argc,const char **argv)
{
#if 0
i=wm_ynbox("Texture Cache",
"Would you like to enable the on-disk texture cache?\n\n"
"You generally want to say 'yes' here, especially if using the HRP.");
"Would you like to enable the on-disk texture cache?\n\n"
"You generally want to say 'yes' here, especially if using the HRP.");
#else
i = 1;
#endif

View file

@ -758,26 +758,26 @@ cvar_t cvars[] =
{ "r_projectionhack", "r_projectionhack: enable/disable projection hack", (void*)&glprojectionhacks, CVAR_INT, 0, 0, 2 },
# ifdef POLYMER
// polymer cvars
{ "pr_lighting", "pr_lighting: enable/disable dynamic lights", (void*)&pr_lighting, CVAR_BOOL, 0, 0, 1 },
{ "pr_normalmapping", "pr_normalmapping: enable/disable virtual displacement mapping", (void*)&pr_normalmapping, CVAR_BOOL, 0, 0, 1 },
{ "pr_specularmapping", "pr_specularmapping: enable/disable specular mapping", (void*)&pr_specularmapping, CVAR_BOOL, 0, 0, 1 },
{ "pr_shadows", "pr_shadows: enable/disable dynamic shadows", (void*)&pr_shadows, CVAR_BOOL, 0, 0, 1 },
{ "pr_shadowcount", "pr_shadowcount: maximal amount of shadow emitting lights on screen - you need to restart the renderer for it to take effect", (void*)&pr_shadowcount, CVAR_INT, 0, 0, 64 },
{ "pr_shadowdetail", "pr_shadowdetail: sets the shadow map resolution - you need to restart the renderer for it to take effect", (void*)&pr_shadowdetail, CVAR_INT, 0, 0, 5 },
{ "pr_maxlightpasses", "pr_maxlightpasses: the maximal amount of lights a single object can by affected by", (void*)&pr_maxlightpasses, CVAR_INT, 0, 0, 512 },
{ "pr_maxlightpriority", "pr_maxlightpriority: lowering that value removes less meaningful lights from the scene", (void*)&pr_maxlightpriority, CVAR_INT, 0, 0, PR_MAXLIGHTPRIORITY },
{ "pr_fov", "pr_fov: sets the field of vision in build angle", (void*)&pr_fov, CVAR_INT, 0, 0, 1023},
{ "pr_billboardingmode", "pr_billboardingmode: face sprite display method. 0: classic mode; 1: polymost mode", (void*)&pr_billboardingmode, CVAR_INT, 0, 0, 1 },
{ "pr_verbosity", "pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 0, 3 },
{ "pr_wireframe", "pr_wireframe: toggles wireframe mode", (void*)&pr_wireframe, CVAR_INT, 0, 0, 1 },
{ "pr_vbos", "pr_vbos: contols Vertex Buffer Object usage. 0: no VBOs. 1: VBOs for map data. 2: VBOs for model data.", (void*)&pr_vbos, CVAR_INT, 0, 0, 2 },
{ "pr_gpusmoothing", "pr_gpusmoothing: toggles model animation interpolation", (void*)&pr_gpusmoothing, CVAR_INT, 0, 0, 1 },
{ "pr_overrideparallax", "pr_overrideparallax: overrides parallax mapping scale and bias values with values from the pr_parallaxscale and pr_parallaxbias cvars; use it to fine-tune DEF tokens", (void*)&pr_overrideparallax, CVAR_BOOL, 0, 0, 1 },
{ "pr_parallaxscale", "pr_parallaxscale: overriden parallax mapping offset scale", (void*)&pr_parallaxscale, CVAR_FLOAT, 0, -10, 10 },
{ "pr_parallaxbias", "pr_parallaxbias: overriden parallax mapping offset bias", (void*)&pr_parallaxbias, CVAR_FLOAT, 0, -10, 10 },
{ "pr_overridespecular", "pr_overridespecular: overrides specular material power and factor values with values from the pr_specularpower and pr_specularfactor cvars; use it to fine-tune DEF tokens", (void*)&pr_overridespecular, CVAR_BOOL, 0, 0, 1 },
{ "pr_specularpower", "pr_specularpower: overriden specular material power", (void*)&pr_specularpower, CVAR_FLOAT, 0, -10, 1000 },
{ "pr_specularfactor", "pr_specularfactor: overriden specular material factor", (void*)&pr_specularfactor, CVAR_FLOAT, 0, -10, 1000 },
{ "r_pr_lighting", "r_pr_lighting: enable/disable dynamic lights", (void*)&pr_lighting, CVAR_BOOL, 0, 0, 1 },
{ "r_pr_normalmapping", "r_pr_normalmapping: enable/disable virtual displacement mapping", (void*)&pr_normalmapping, CVAR_BOOL, 0, 0, 1 },
{ "r_pr_specularmapping", "r_pr_specularmapping: enable/disable specular mapping", (void*)&pr_specularmapping, CVAR_BOOL, 0, 0, 1 },
{ "r_pr_shadows", "r_pr_shadows: enable/disable dynamic shadows", (void*)&pr_shadows, CVAR_BOOL, 0, 0, 1 },
{ "r_pr_shadowcount", "r_pr_shadowcount: maximal amount of shadow emitting lights on screen - you need to restart the renderer for it to take effect", (void*)&pr_shadowcount, CVAR_INT, 0, 0, 64 },
{ "r_pr_shadowdetail", "r_pr_shadowdetail: sets the shadow map resolution - you need to restart the renderer for it to take effect", (void*)&pr_shadowdetail, CVAR_INT, 0, 0, 5 },
{ "r_pr_maxlightpasses", "r_pr_maxlightpasses: the maximal amount of lights a single object can by affected by", (void*)&pr_maxlightpasses, CVAR_INT, 0, 0, 512 },
{ "r_pr_maxlightpriority", "r_pr_maxlightpriority: lowering that value removes less meaningful lights from the scene", (void*)&pr_maxlightpriority, CVAR_INT, 0, 0, PR_MAXLIGHTPRIORITY },
{ "r_pr_fov", "r_pr_fov: sets the field of vision in build angle", (void*)&pr_fov, CVAR_INT, 0, 0, 1023},
{ "r_pr_billboardingmode", "r_pr_billboardingmode: face sprite display method. 0: classic mode; 1: polymost mode", (void*)&pr_billboardingmode, CVAR_INT, 0, 0, 1 },
{ "r_pr_verbosity", "r_pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 0, 3 },
{ "r_pr_wireframe", "r_pr_wireframe: toggles wireframe mode", (void*)&pr_wireframe, CVAR_INT, 0, 0, 1 },
{ "r_pr_vbos", "r_pr_vbos: contols Vertex Buffer Object usage. 0: no VBOs. 1: VBOs for map data. 2: VBOs for model data.", (void*)&pr_vbos, CVAR_INT, 0, 0, 2 },
{ "r_pr_gpusmoothing", "r_pr_gpusmoothing: toggles model animation interpolation", (void*)&pr_gpusmoothing, CVAR_INT, 0, 0, 1 },
{ "r_pr_overrideparallax", "r_pr_overrideparallax: overrides parallax mapping scale and bias values with values from the pr_parallaxscale and pr_parallaxbias cvars; use it to fine-tune DEF tokens", (void*)&pr_overrideparallax, CVAR_BOOL, 0, 0, 1 },
{ "r_pr_parallaxscale", "r_pr_parallaxscale: overriden parallax mapping offset scale", (void*)&pr_parallaxscale, CVAR_FLOAT, 0, -10, 10 },
{ "r_pr_parallaxbias", "r_pr_parallaxbias: overriden parallax mapping offset bias", (void*)&pr_parallaxbias, CVAR_FLOAT, 0, -10, 10 },
{ "r_pr_overridespecular", "r_pr_overridespecular: overrides specular material power and factor values with values from the pr_specularpower and pr_specularfactor cvars; use it to fine-tune DEF tokens", (void*)&pr_overridespecular, CVAR_BOOL, 0, 0, 1 },
{ "r_pr_specularpower", "r_pr_specularpower: overriden specular material power", (void*)&pr_specularpower, CVAR_FLOAT, 0, -10, 1000 },
{ "r_pr_specularfactor", "r_pr_specularfactor: overriden specular material factor", (void*)&pr_specularfactor, CVAR_FLOAT, 0, -10, 1000 },
#endif
#endif
{ "r_drawweapon", "r_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 0, 2 },

View file

@ -345,29 +345,39 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
}
}
G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7),
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, 255+(80<<8),0);
switch (DynamicTileMap[atwith])
{
case FIRELASER__STATIC:
case SHOTGUN__STATIC:
case SHOTSPARK1__STATIC:
case CHAINGUN__STATIC:
case RPG__STATIC:
case MORTER__STATIC:
G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7),
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 4096, 255+(80<<8),0);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>7);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>7);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>7);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>7);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = 255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = 80;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = 0;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = 255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = 80;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = 0;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
break;
}
}
if (A_CheckSpriteTileFlags(atwith,SPRITE_PROJECTILE))
@ -2141,7 +2151,7 @@ void P_FireWeapon(DukePlayer_t *p)
p->visibility = 0;
G_AddGameLight(0, s->sectnum, s->x+((sintable[(p->ang+512)&2047])>>7), s->y+((sintable[(p->ang)&2047])>>7),
s->z-PHEIGHT, 4096, aplWeaponFlashColor[p->curr_weapon][snum],0);
s->z-PHEIGHT, 4096, aplWeaponFlashColor[p->curr_weapon][snum],0);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(p->ang+512)&2047])>>7);

View file

@ -186,12 +186,12 @@ int32_t S_PlaySoundXYZ(int32_t num, int32_t i, const vec3_t *pos)
// if(num != 358) return 0;
if (num >= MAXSOUNDS ||
!SM32_havesound ||
!SM32_havesound ||
// ((g_sounds[num].m&8) && ud.lockout) ||
SoundToggle == 0 ||
g_sounds[num].num > 3 ||
FX_VoiceAvailable(g_sounds[num].pr) == 0)
return -1;
SoundToggle == 0 ||
g_sounds[num].num > 3 ||
FX_VoiceAvailable(g_sounds[num].pr) == 0)
return -1;
if (g_sounds[num].m&128)
{
@ -203,8 +203,8 @@ int32_t S_PlaySoundXYZ(int32_t num, int32_t i, const vec3_t *pos)
{
for (j=0; j<MAXSOUNDS; j++)
// for (k=0; k<g_sounds[j].num; k++)
if ((g_sounds[j].num > 0) && (g_sounds[j].m&4))
return -1;
if ((g_sounds[j].num > 0) && (g_sounds[j].m&4))
return -1;
}
cx = pos->x;
@ -234,23 +234,23 @@ int32_t S_PlaySoundXYZ(int32_t num, int32_t i, const vec3_t *pos)
if (sndist < 0) sndist = 0;
if (cs > -1 && sndist && PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,SX,SY,SZ-(24<<8),SECT))
sndist += sndist>>5;
/*
switch (num)
{
case PIPEBOMB_EXPLODE:
case LASERTRIP_EXPLODE:
case RPG_EXPLODE:
if (sndist > (6144))
sndist = 6144;
if (g_player[screenpeek].ps->cursectnum > -1 && sector[g_player[screenpeek].ps->cursectnum].lotag == 2)
pitch -= 1024;
break;
default:
*/
if (cursectnum > -1 && sector[cursectnum].lotag == 2 && (g_sounds[num].m&4) == 0)
pitch = -768;
if (sndist > 31444 && PN != MUSICANDSFX)
return -1;
/*
switch (num)
{
case PIPEBOMB_EXPLODE:
case LASERTRIP_EXPLODE:
case RPG_EXPLODE:
if (sndist > (6144))
sndist = 6144;
if (g_player[screenpeek].ps->cursectnum > -1 && sector[g_player[screenpeek].ps->cursectnum].lotag == 2)
pitch -= 1024;
break;
default:
*/
if (cursectnum > -1 && sector[cursectnum].lotag == 2 && (g_sounds[num].m&4) == 0)
pitch = -768;
if (sndist > 31444 && PN != MUSICANDSFX)
return -1;
// break;
// }
@ -478,21 +478,21 @@ void S_Pan3D(void)
if (PN == MUSICANDSFX && SLT < 999)
g_numEnvSoundsPlaying++;
/*
switch (j)
/*
switch (j)
{
case PIPEBOMB_EXPLODE:
case LASERTRIP_EXPLODE:
case RPG_EXPLODE:
if (sndist > (6144)) sndist = (6144);
break;
default:
*/
if (sndist > 31444 && PN != MUSICANDSFX)
{
case PIPEBOMB_EXPLODE:
case LASERTRIP_EXPLODE:
case RPG_EXPLODE:
if (sndist > (6144)) sndist = (6144);
break;
default:
*/
if (sndist > 31444 && PN != MUSICANDSFX)
{
S_StopSound(j);
continue;
}
S_StopSound(j);
continue;
}
// }
if (g_sounds[j].ptr == 0 && S_LoadSound(j) == 0) continue;