Subversion Repositories eduke32

Compare Revisions

Regard whitespace Rev 8787 → Rev 8788

/source/duke3d/src/actors.cpp
22,6 → 22,10
 
#define actors_c_
 
#ifndef EDUKE32_STANDALONE
#include <map>
#endif
 
#include "duke3d.h"
 
#if KRANDDEBUG
101,6 → 105,15
auto const pSprite = (uspriteptr_t)&sprite[spriteNum];
auto const pOther = &sprite[otherSprite];
 
#ifndef EDUKE32_STANDALONE
if (WORLDTOUR && pSprite->picnum == FLAMETHROWERFLAME)
{
if (sprite[pSprite->owner].picnum == FIREFLY && pOther->picnum == FIREFLY)
return;
if (sprite[pSprite->owner].picnum == BOSS5 && pOther->picnum == BOSS5)
return;
}
#endif
 
// DEFAULT, ZOMBIEACTOR, MISC
if (pOther->statnum == STAT_DEFAULT || pOther->statnum == STAT_ZOMBIEACTOR || pOther->statnum == STAT_MISC
160,11 → 173,16
#endif
)
dmgActor.picnum = pSprite->picnum;
#ifndef EDUKE32_STANDALONE
else if (WORLDTOUR && (pSprite->picnum == FLAMETHROWERFLAME || pSprite->picnum == LAVAPOOL
|| (pSprite->picnum == FIREBALL && sprite[pSprite->owner].picnum == APLAYER)))
dmgActor.picnum = FLAMETHROWERFLAME;
#endif
else
dmgActor.picnum = RADIUSEXPLOSION;
 
#ifndef EDUKE32_STANDALONE
if (pSprite->picnum != SHRINKSPARK)
if (pSprite->picnum != SHRINKSPARK && (!WORLDTOUR || pSprite->picnum != LAVAPOOL))
#endif
{
// this is really weird
3142,6 → 3160,17
}
}
 
#ifndef EDUKE32_STANDALONE
struct SpriteTracerData
{
int32_t x, y, z;
int32_t xVel, yVel, zVel;
SpriteTracerData() : x(0), y(0), z(0), xVel(0), yVel(0), zVel(0) { }
};
 
std::map<int, SpriteTracerData> tracerData;
#endif
 
ACTOR_STATIC void G_MoveWeapons(void)
{
int spriteNum = headspritestat[STAT_PROJECTILE];
3193,6 → 3222,10
DELETE_SPRITE_AND_CONTINUE(spriteNum);
}
fallthrough__;
case FIREBALL__STATIC:
if (!WORLDTOUR && pSprite->picnum == FIREBALL)
break;
fallthrough__;
case SHRINKSPARK__STATIC:
case RPG__STATIC:
case FIRELASER__STATIC:
3219,6 → 3252,8
 
A_GetZLimits(spriteNum);
 
int const fireball = (WORLDTOUR && pSprite->picnum == FIREBALL && sprite[pSprite->owner].picnum != FIREBALL);
 
if (pSprite->picnum == RPG && actor[spriteNum].picnum != BOSS2 && pSprite->xrepeat >= 10
&& sector[pSprite->sectnum].lotag != ST_2_UNDERWATER
&& g_scriptVersion >= 13)
3226,6 → 3261,48
int const newSprite = A_Spawn(spriteNum, SMALLSMOKE);
sprite[newSprite].z += (1 << 8);
}
if (pSprite->picnum == FIREBALL)
{
if (sector[pSprite->sectnum].lotag == ST_2_UNDERWATER) { DELETE_SPRITE_AND_CONTINUE(spriteNum); }
if (fireball)
{
if (actor[spriteNum].t_data[0] >= 1 && actor[spriteNum].t_data[0] < 6)
{
float t = 1.f - 0.2 * actor[spriteNum].t_data[0];
int j = A_Spawn(spriteNum, FIREBALL);
spritetype* sj = &sprite[j];
sj->xvel = pSprite->xvel;
sj->yvel = pSprite->yvel;
sj->zvel = pSprite->zvel;
if (actor[spriteNum].t_data[0] > 1)
{
SpriteTracerData t = tracerData[actor[spriteNum].t_data[1]];
sj->x = t.x;
sj->y = t.y;
sj->z = t.z;
sj->xvel = t.xVel;
sj->yvel = t.yVel;
sj->zvel = t.zVel;
}
sj->xrepeat = sj->yrepeat = t * pSprite->xrepeat;
sj->cstat = pSprite->cstat;
sj->extra = 0;
actor[spriteNum].t_data[1] = j;
SpriteTracerData tt;
tt.x = sj->x;
tt.y = sj->y;
tt.z = sj->z;
tt.xVel = sj->xvel;
tt.yVel = sj->yvel;
tt.zVel = sj->zvel;
tracerData[actor[spriteNum].t_data[1]] = tt;
changespritestat(j, 4);
}
actor[spriteNum].t_data[0]++;
}
if (pSprite->zvel < 15000)
pSprite->zvel += 200;
}
 
vec3_t const tmpvect = { (spriteXvel * (sintable[(pSprite->ang + 512) & 2047])) >> 14 >> (int)!projectileMoved,
(spriteXvel * (sintable[pSprite->ang & 2047])) >> 14 >> (int)!projectileMoved, spriteZvel >> (int)!projectileMoved };
3288,6 → 3365,7
DELETE_SPRITE_AND_CONTINUE(spriteNum);
}
 
if (!WORLDTOUR || pSprite->picnum != FIREBALL || fireball)
A_DamageObject(moveSprite, spriteNum);
 
if (sprite[moveSprite].picnum == APLAYER)
3304,6 → 3382,7
moveSprite &= (MAXWALLS - 1);
 
if (pSprite->picnum != RPG && pSprite->picnum != FREEZEBLAST && pSprite->picnum != SPIT
&& (!WORLDTOUR || pSprite->picnum != FIREBALL)
&& (wall[moveSprite].overpicnum == MIRROR || wall[moveSprite].picnum == MIRROR))
{
Proj_BounceOffWall(pSprite, moveSprite);
3354,6 → 3433,15
 
goto next_sprite;
}
 
if (pSprite->zvel >= 0 && fireball)
{
int lp = A_Spawn(spriteNum, LAVAPOOL);
sprite[lp].owner = sprite[spriteNum].owner;
sprite[lp].yvel = sprite[spriteNum].yvel;
actor[lp].owner = sprite[spriteNum].owner;
DELETE_SPRITE_AND_CONTINUE(spriteNum);
}
break;
default: break;
}
3407,6 → 3495,10
A_RadiusDamage(spriteNum, g_shrinkerRadius, 0, 0, 0, 0);
break;
 
case FIREBALL__STATIC:
if (WORLDTOUR)
break;
fallthrough__;
default:
{
int const newSprite = A_Spawn(spriteNum, EXPLOSION2);
3423,6 → 3515,12
}
}
 
if (fireball)
{
int ex = A_Spawn(spriteNum, EXPLOSION2);
sprite[ex].xrepeat = sprite[ex].yrepeat = pSprite->xrepeat >> 1;
}
 
if (pSprite->picnum != COOLEXPLOSION1)
DELETE_SPRITE_AND_CONTINUE(spriteNum);
}
3944,6 → 4042,108
#ifndef EDUKE32_STANDALONE
switch (DYNAMICTILEMAP(switchPic))
{
case FLAMETHROWERFLAME__STATIC:
{
if (!WORLDTOUR)
goto next_sprite;
 
if (G_HaveActor(sprite[spriteNum].picnum))
{
int32_t playerDist;
int const playerNum = A_FindPlayer(pSprite, &playerDist);
A_Execute(spriteNum, playerNum, playerDist);
}
 
actor[spriteNum].t_data[0]++;
if (sector[pSprite->sectnum].lotag == ST_2_UNDERWATER)
{
int const newSprite = A_Spawn(spriteNum, EXPLOSION2);
sprite[newSprite].shade = 127;
DELETE_SPRITE_AND_CONTINUE(spriteNum);
}
int spriteXvel = pSprite->xvel;
int spriteZvel = pSprite->zvel;
 
vec3_t davect = pSprite->pos;
 
A_GetZLimits(spriteNum);
 
if (pSprite->xrepeat < 80)
{
pSprite->xrepeat += actor[spriteNum].t_data[0] / 6;
pSprite->yrepeat += actor[spriteNum].t_data[0] / 6;
}
pSprite->clipdist += actor[spriteNum].t_data[0] / 6;
if (actor[spriteNum].t_data[0] < 2)
actor[spriteNum].t_data[3] = krand() % 10;
if (actor[spriteNum].t_data[0] > 30)
{
int const newSprite = A_Spawn(spriteNum, EXPLOSION2);
sprite[newSprite].shade = 127;
DELETE_SPRITE_AND_CONTINUE(spriteNum);
}
 
vec3_t const tmpvect = { (spriteXvel * (sintable[(pSprite->ang + 512) & 2047])) >> 14,
(spriteXvel * (sintable[pSprite->ang & 2047])) >> 14, spriteZvel };
 
int moveSprite = A_MoveSprite(spriteNum, &tmpvect, CLIPMASK1);
 
actor[spriteNum].movflag = moveSprite;
 
if (pSprite->sectnum < 0)
DELETE_SPRITE_AND_CONTINUE(spriteNum);
 
if ((moveSprite & 49152) != 49152 && pSprite->picnum != FREEZEBLAST)
G_WeaponHitCeilingOrFloor(spriteNum, pSprite, &moveSprite);
 
if (moveSprite != 0)
{
switch (moveSprite & 49152)
{
case 49152:
moveSprite &= (MAXSPRITES - 1);
 
A_DamageObject(moveSprite, spriteNum);
 
if (sprite[moveSprite].picnum == APLAYER)
{
A_PlaySound(PISTOL_BODYHIT, moveSprite);
}
break;
 
case 32768:
moveSprite &= (MAXWALLS - 1);
 
setsprite(spriteNum, &davect);
A_DamageWall(spriteNum, moveSprite, pSprite->pos, pSprite->picnum);
 
break;
 
case 16384:
setsprite(spriteNum, &davect);
 
if (pSprite->zvel < 0)
Sect_DamageCeiling(spriteNum, pSprite->sectnum);
else if (pSprite->zvel > 0)
Sect_DamageFloor(spriteNum, pSprite->sectnum);
break;
default: break;
}
}
 
if (pSprite->xrepeat >= 10)
{
int const x = pSprite->extra;
A_RadiusDamage(spriteNum, g_rpgRadius, x >> 2, x >> 1, x - (x >> 2), x);
}
else
{
int const x = pSprite->extra + (g_globalRandom & 3);
A_RadiusDamage(spriteNum, (g_rpgRadius >> 1), x >> 2, x >> 1, x - (x >> 2), x);
}
 
goto next_sprite;
}
case DUCK__STATIC:
case TARGET__STATIC:
if (pSprite->cstat&32)
5246,6 → 5446,17
}
goto next_sprite;
 
#ifndef EDUKE32_STANDALONE
case ONFIRESMOKE__STATIC:
case ONFIRE__STATIC:
case BURNEDCORPSE__STATIC:
case LAVAPOOLBUBBLE__STATIC:
case WHISPYSMOKE__STATIC:
case LAVAPOOL__STATIC:
if (!WORLDTOUR)
goto next_sprite;
fallthrough__;
#endif
case EXPLOSION2__STATIC:
case EXPLOSION2BOT__STATIC:
case FORCERIPPLE__STATIC:
5705,7 → 5916,35
A_SetSprite(spriteNum,CLIPMASK0);
 
goto next_sprite;
 
case FIREFLYFLYINGEFFECT__STATIC:
if (WORLDTOUR && G_HaveActor(sprite[spriteNum].picnum))
{
int playerDist;
int const playerNum = A_FindPlayer(pSprite, &playerDist);
A_Execute(spriteNum, playerNum, playerDist);
spritetype *pPlayer = &sprite[g_player[playerNum].ps->i];
spritetype* pOwner = &sprite[pSprite->owner];
if (pOwner->picnum != FIREFLY) DELETE_SPRITE_AND_CONTINUE(spriteNum);
if (pOwner->xrepeat < 24 && pOwner->pal != 1)
pSprite->cstat &= ~32768;
else
pSprite->cstat |= 32768;
float dx = pOwner->x-pPlayer->x;
float dy = pOwner->y-pPlayer->y;
float dn = sqrt(dx*dx+dy*dy);
if (dn > 0.f)
{
dx /= dn;
dy /= dn;
}
pSprite->x = pOwner->x-int(dx*-10.f);
pSprite->y = pOwner->y-int(dy*-10.f);
pSprite->z = pOwner->z+0x800;
if (pOwner->extra <= 0) DELETE_SPRITE_AND_CONTINUE(spriteNum);
}
goto next_sprite;
}
#endif
}
 
/source/duke3d/src/duke3d.h
47,10 → 47,12
#ifdef EDUKE32_STANDALONE
#define VOLUMEALL (1)
#define PLUTOPAK (1)
#define WORLDTOUR (0)
#define VOLUMEONE (0)
#else
#define VOLUMEALL (g_Shareware == 0)
#define PLUTOPAK (g_scriptVersion >= 14)
#define WORLDTOUR (DUKE && g_scriptVersion >= 16)
#define VOLUMEONE (g_Shareware == 1)
#endif
 
/source/duke3d/src/game.cpp
1973,6 → 1973,12
changespritestat(newSprite, STAT_ACTOR);
goto SPAWN_END;
 
case BOSS2STAYPUT__STATIC:
case BOSS3STAYPUT__STATIC:
case BOSS5STAYPUT__STATIC:
if (!WORLDTOUR)
break;
fallthrough__;
case OCTABRAINSTAYPUT__STATIC:
case LIZTROOPSTAYPUT__STATIC:
case PIGCOPSTAYPUT__STATIC:
1983,15 → 1989,20
case BOSS4STAYPUT__STATIC:
pActor->stayput = pSprite->sectnum;
fallthrough__;
case GREENSLIME__STATIC:
if (pSprite->picnum == GREENSLIME)
pSprite->extra = 1;
fallthrough__;
case BOSS5__STATIC:
case FIREFLY__STATIC:
if (!WORLDTOUR && (pSprite->picnum == BOSS5 || pSprite->picnum == FIREFLY))
break;
fallthrough__;
case BOSS1__STATIC:
case BOSS2__STATIC:
case BOSS3__STATIC:
case BOSS4__STATIC:
case ROTATEGUN__STATIC:
case GREENSLIME__STATIC:
if (pSprite->picnum == GREENSLIME)
pSprite->extra = 1;
fallthrough__;
case DRONE__STATIC:
case LIZTROOPONTOILET__STATIC:
case LIZTROOPJUSTSIT__STATIC:
2032,12 → 2043,14
}
 
if (pSprite->picnum == BOSS4STAYPUT || pSprite->picnum == BOSS1 || pSprite->picnum == BOSS2 ||
pSprite->picnum == BOSS1STAYPUT || pSprite->picnum == BOSS3 || pSprite->picnum == BOSS4)
pSprite->picnum == BOSS1STAYPUT || pSprite->picnum == BOSS3 || pSprite->picnum == BOSS4 ||
(WORLDTOUR && (pSprite->picnum == BOSS2STAYPUT || pSprite->picnum == BOSS3STAYPUT ||
pSprite->picnum == BOSS5STAYPUT || pSprite->picnum == BOSS5)))
{
if (spriteNum >= 0 && sprite[spriteNum].picnum == RESPAWN)
pSprite->pal = sprite[spriteNum].pal;
 
if (pSprite->pal)
if (pSprite->pal && (!WORLDTOUR || pSprite->pal != 22))
{
pSprite->clipdist = 80;
pSprite->xrepeat = pSprite->yrepeat = 40;
2175,6 → 2188,12
changespritestat(newSprite, STAT_ZOMBIEACTOR);
goto SPAWN_END;
 
case FLAMETHROWERSPRITE__STATIC:
case FLAMETHROWERAMMO__STATIC:
if (!WORLDTOUR)
break;
fallthrough__;
 
case ATOMICHEALTH__STATIC:
case STEROIDS__STATIC:
case HEATSENSOR__STATIC:
2392,6 → 2411,10
changespritestat(newSprite, STAT_MISC);
goto SPAWN_END;
 
case LAVAPOOL__STATIC:
if (!WORLDTOUR)
break;
fallthrough__;
case BLOODPOOL__STATIC:
case PUKE__STATIC:
{
2441,6 → 2464,8
pSprite->shade = 127;
}
pSprite->cstat |= 32;
if (pSprite->picnum == LAVAPOOL)
pSprite->z = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y) - 200;
fallthrough__;
}
case FECES__STATIC:
2666,6 → 2691,10
fallthrough__;
#endif
#ifndef EDUKE32_STANDALONE
case ONFIRE__STATIC:
if (!WORLDTOUR && pSprite->picnum == ONFIRE)
break;
fallthrough__;
case EXPLOSION2BOT__STATIC:
case BURNING__STATIC:
case BURNING2__STATIC:
2688,7 → 2717,7
}
else if (pSprite->picnum == SHRINKEREXPLOSION)
pSprite->xrepeat = pSprite->yrepeat = 32;
else if (pSprite->picnum == SMALLSMOKE)
else if (pSprite->picnum == SMALLSMOKE || pSprite->picnum == ONFIRE)
{
// 64 "money"
pSprite->xrepeat = pSprite->yrepeat = 24;
2706,6 → 2735,14
pSprite->z = floorZ-ZOFFSET4;
}
 
if (pSprite->picnum == ONFIRE)
{
pActor->bpos.x = pSprite->x += (krand()%256)-128;
pActor->bpos.y = pSprite->y += (krand()%256)-128;
pActor->bpos.z = pSprite->z -= krand()%10240;
pSprite->cstat |= 128;
}
 
changespritestat(newSprite, STAT_MISC);
 
goto SPAWN_END;
3416,6 → 3453,41
A_SetSprite(newSprite,CLIPMASK0);
goto SPAWN_END;
 
case LAVAPOOLBUBBLE__STATIC:
if (!WORLDTOUR)
break;
if (sprite[spriteNum].xrepeat >= 30)
{
pSprite->owner = spriteNum;
changespritestat(newSprite, STAT_MISC);
pSprite->xrepeat = pSprite->yrepeat = 1;
pSprite->x += (krand()%512)-256;
pSprite->y += (krand()%512)-256;
}
goto SPAWN_END;
case WHISPYSMOKE__STATIC:
if (!WORLDTOUR)
break;
pActor->bpos.x = pSprite->x += (krand()%256)-128;
pActor->bpos.y = pSprite->y += (krand()%256)-128;
pSprite->xrepeat = pSprite->yrepeat = 20;
changespritestat(newSprite, STAT_MISC);
goto SPAWN_END;
case FIREFLYFLYINGEFFECT__STATIC:
if (!WORLDTOUR)
break;
pSprite->owner = spriteNum;
changespritestat(newSprite, STAT_MISC);
pSprite->xrepeat = pSprite->yrepeat = 1;
goto SPAWN_END;
case E32_TILE5846__STATIC:
if (!WORLDTOUR)
break;
pSprite->extra = 150;
pSprite->cstat |= 257;
changespritestat(newSprite, STAT_ZOMBIEACTOR);
goto SPAWN_END;
 
default:
break; // NOT goto
}
5967,6 → 6039,17
 
for (bssize_t i=ARRAY_SIZE(GreenSlimeFoodEnemies)-1; i>=0; i--)
SETFLAG(GreenSlimeFoodEnemies[i], SFLAG_GREENSLIMEFOOD);
 
if (WORLDTOUR)
{
SETFLAG(FIREFLY, SFLAG_HARDCODED_BADGUY);
SETFLAG(BOSS5, SFLAG_NODAMAGEPUSH|SFLAG_HARDCODED_BADGUY);
SETFLAG(BOSS1STAYPUT, SFLAG_NODAMAGEPUSH|SFLAG_HARDCODED_BADGUY);
SETFLAG(BOSS2STAYPUT, SFLAG_NODAMAGEPUSH|SFLAG_HARDCODED_BADGUY);
SETFLAG(BOSS3STAYPUT, SFLAG_NODAMAGEPUSH|SFLAG_HARDCODED_BADGUY);
SETFLAG(BOSS4STAYPUT, SFLAG_NODAMAGEPUSH|SFLAG_HARDCODED_BADGUY);
SETFLAG(BOSS5STAYPUT, SFLAG_NODAMAGEPUSH|SFLAG_HARDCODED_BADGUY);
}
#endif
}
#undef SETFLAG
/source/duke3d/src/gamedef.cpp
2049,6 → 2049,9
g_deleteQueueSize = clamp(params[j++], 0, ARRAY_SSIZE(SpriteDeletionQueue));
g_tripbombLaserMode = params[j++];
}
 
if (g_scriptVersion >= 16)
p0.max_ammo_amount[FLAMETHROWER_WEAPON] = params[j++];
}
}
 
/source/duke3d/src/gamevars.cpp
998,6 → 998,13
GROWSPARK__STATIC, 0, 0, 0, 0, EXPANDERSHOOT__STATIC, 0, 0,
EJECT_CLIP__STATIC, INSERT_CLIP__STATIC, SELECT_WEAPON__STATIC, 216+(52<<8)+(20<<16)
},
 
{
FLAMETHROWER_WEAPON, 0, 0, 2, 16, 0,
WEAPON_RESET,
FIREBALL__STATIC, 0, 0, 0, FLAMETHROWER_INTRO__STATIC, FLAMETHROWER_INTRO__STATIC, 0, 0,
EJECT_CLIP__STATIC, INSERT_CLIP__STATIC, SELECT_WEAPON__STATIC, 216+(52<<8)+(20<<16)
},
#endif
};
 
/source/duke3d/src/inv.h
70,5 → 70,6
FREEZE_WEAPON,
HANDREMOTE_WEAPON, // 10
GROW_WEAPON,
FLAMETHROWER_WEAPON,
MAX_WEAPONS
};
/source/duke3d/src/namesdyn.cpp
636,6 → 636,38
{ "WOMAN", DVPTR(WOMAN), WOMAN__STATIC },
{ "WOODENHORSE", DVPTR(WOODENHORSE), WOODENHORSE__STATIC },
{ "XXXSTACY", DVPTR(XXXSTACY), XXXSTACY__STATIC },
{ "WIDESCREENSTATUSBAR", DVPTR(WIDESCREENSTATUSBAR), WIDESCREENSTATUSBAR__STATIC },
{ "RPGGUNWIDE", DVPTR(RPGGUNWIDE), RPGGUNWIDE__STATIC },
{ "FIRSTGUNRELOADWIDE", DVPTR(FIRSTGUNRELOADWIDE), FIRSTGUNRELOADWIDE__STATIC },
{ "FREEZEWIDE", DVPTR(FREEZEWIDE), FREEZEWIDE__STATIC },
{ "FREEZEFIREWIDE", DVPTR(FREEZEFIREWIDE), FREEZEFIREWIDE__STATIC },
{ "SHRINKERWIDE", DVPTR(SHRINKERWIDE), SHRINKERWIDE__STATIC },
{ "CRACKKNUCKLESWIDE", DVPTR(CRACKKNUCKLESWIDE), CRACKKNUCKLESWIDE__STATIC },
{ "FLAMETHROWERSPRITE", DVPTR(FLAMETHROWERSPRITE), FLAMETHROWERSPRITE__STATIC },
{ "FLAMETHROWERAMMO", DVPTR(FLAMETHROWERAMMO), FLAMETHROWERAMMO__STATIC },
{ "FLAMETHROWER", DVPTR(FLAMETHROWER), FLAMETHROWER__STATIC },
{ "FLAMETHROWERFIRE", DVPTR(FLAMETHROWERFIRE), FLAMETHROWERFIRE__STATIC },
{ "FLAMETHROWERFLAME", DVPTR(FLAMETHROWERFLAME), FLAMETHROWERFLAME__STATIC },
{ "FLAMETHROWERPILOT", DVPTR(FLAMETHROWERPILOT), FLAMETHROWERPILOT__STATIC },
{ "FIREBALL", DVPTR(FIREBALL), FIREBALL__STATIC },
{ "ONFIRE", DVPTR(ONFIRE), ONFIRE__STATIC },
{ "ONFIRESMOKE", DVPTR(ONFIRESMOKE), ONFIRESMOKE__STATIC },
{ "BURNEDCORPSE", DVPTR(BURNEDCORPSE), BURNEDCORPSE__STATIC },
{ "WHISPYSMOKE", DVPTR(WHISPYSMOKE), WHISPYSMOKE__STATIC },
{ "FIREFLY", DVPTR(FIREFLY), FIREFLY__STATIC },
{ "FIREFLYSHRINKEFFECT", DVPTR(FIREFLYSHRINKEFFECT), FIREFLYSHRINKEFFECT__STATIC },
{ "FIREFLYGROWEFFECT", DVPTR(FIREFLYGROWEFFECT), FIREFLYGROWEFFECT__STATIC },
{ "FIREFLYFLYINGEFFECT", DVPTR(FIREFLYFLYINGEFFECT), FIREFLYFLYINGEFFECT__STATIC },
{ "BOSS5", DVPTR(BOSS5), BOSS5__STATIC },
{ "BOSS5STAYPUT", DVPTR(BOSS5STAYPUT), BOSS5STAYPUT__STATIC },
{ "LAVAPOOL", DVPTR(LAVAPOOL), LAVAPOOL__STATIC },
{ "LAVASPLASH", DVPTR(LAVASPLASH), LAVASPLASH__STATIC },
{ "LAVAPOOLBUBBLE", DVPTR(LAVAPOOLBUBBLE), LAVAPOOLBUBBLE__STATIC },
{ "BOSS2STAYPUT", DVPTR(BOSS2STAYPUT), BOSS2STAYPUT__STATIC },
{ "BOSS3STAYPUT", DVPTR(BOSS3STAYPUT), BOSS3STAYPUT__STATIC },
{ "E32_TILE5736", DVPTR(E32_TILE5736), E32_TILE5736__STATIC },
{ "E32_TILE5737", DVPTR(E32_TILE5737), E32_TILE5737__STATIC },
{ "E32_TILE5846", DVPTR(E32_TILE5846), E32_TILE5846__STATIC },
};
 
#ifdef DYNTILEREMAP_ENABLE
1232,6 → 1264,38
int32_t WOMAN = WOMAN__STATIC;
int32_t WOODENHORSE = WOODENHORSE__STATIC;
int32_t XXXSTACY = XXXSTACY__STATIC;
int32_t WIDESCREENSTATUSBAR = WIDESCREENSTATUSBAR__STATIC;
int32_t RPGGUNWIDE = RPGGUNWIDE__STATIC;
int32_t FIRSTGUNRELOADWIDE = FIRSTGUNRELOADWIDE__STATIC;
int32_t FREEZEWIDE = FREEZEWIDE__STATIC;
int32_t FREEZEFIREWIDE = FREEZEFIREWIDE__STATIC;
int32_t SHRINKERWIDE = SHRINKERWIDE__STATIC;
int32_t CRACKKNUCKLESWIDE = CRACKKNUCKLESWIDE__STATIC;
int32_t FLAMETHROWERSPRITE = FLAMETHROWERSPRITE__STATIC;
int32_t FLAMETHROWERAMMO = FLAMETHROWERAMMO__STATIC;
int32_t FLAMETHROWER = FLAMETHROWER__STATIC;
int32_t FLAMETHROWERFIRE = FLAMETHROWERFIRE__STATIC;
int32_t FLAMETHROWERFLAME = FLAMETHROWERFLAME__STATIC;
int32_t FLAMETHROWERPILOT = FLAMETHROWERPILOT__STATIC;
int32_t FIREBALL = FIREBALL__STATIC;
int32_t ONFIRE = ONFIRE__STATIC;
int32_t ONFIRESMOKE = ONFIRESMOKE__STATIC;
int32_t BURNEDCORPSE = BURNEDCORPSE__STATIC;
int32_t WHISPYSMOKE = WHISPYSMOKE__STATIC;
int32_t FIREFLY = FIREFLY__STATIC;
int32_t FIREFLYSHRINKEFFECT = FIREFLYSHRINKEFFECT__STATIC;
int32_t FIREFLYGROWEFFECT = FIREFLYGROWEFFECT__STATIC;
int32_t FIREFLYFLYINGEFFECT = FIREFLYFLYINGEFFECT__STATIC;
int32_t BOSS5 = BOSS5__STATIC;
int32_t BOSS5STAYPUT = BOSS5STAYPUT__STATIC;
int32_t LAVAPOOL = LAVAPOOL__STATIC;
int32_t LAVASPLASH = LAVASPLASH__STATIC;
int32_t LAVAPOOLBUBBLE = LAVAPOOLBUBBLE__STATIC;
int32_t BOSS2STAYPUT = BOSS2STAYPUT__STATIC;
int32_t BOSS3STAYPUT = BOSS3STAYPUT__STATIC;
int32_t E32_TILE5736 = E32_TILE5736__STATIC;
int32_t E32_TILE5737 = E32_TILE5737__STATIC;
int32_t E32_TILE5846 = E32_TILE5846__STATIC;
 
#if !defined LUNATIC
static hashtable_t h_names = {512, NULL};
1310,6 → 1374,7
WeaponPickupSprites[9] = FREEZESPRITE;
WeaponPickupSprites[10] = HEAVYHBOMB;
WeaponPickupSprites[11] = SHRINKERSPRITE;
WeaponPickupSprites[12] = FLAMETHROWERSPRITE;
 
// ouch... the big background image takes up a fuckload of memory and takes a second to load!
#ifdef EDUKE32_GLES
/source/duke3d/src/namesdyn.h
620,6 → 620,38
#define SIGN1__STATIC 4909
#define SIGN2__STATIC 4912
#define JURYGUY__STATIC 4943
#define WIDESCREENSTATUSBAR__STATIC 5120
#define RPGGUNWIDE__STATIC 5121
#define FIRSTGUNRELOADWIDE__STATIC 5122
#define FREEZEWIDE__STATIC 5123
#define FREEZEFIREWIDE__STATIC 5124
#define SHRINKERWIDE__STATIC 5127
#define CRACKKNUCKLESWIDE__STATIC 5129
#define FLAMETHROWERSPRITE__STATIC 5134
#define FLAMETHROWERAMMO__STATIC 5135
#define FLAMETHROWER__STATIC 5138
#define FLAMETHROWERFIRE__STATIC 5139
#define FLAMETHROWERFLAME__STATIC 1891
#define FLAMETHROWERPILOT__STATIC 5174
#define FIREBALL__STATIC 5163
#define ONFIRE__STATIC 5152
#define ONFIRESMOKE__STATIC 5143
#define BURNEDCORPSE__STATIC 5173
#define WHISPYSMOKE__STATIC 5268
#define FIREFLY__STATIC 5180
#define FIREFLYSHRINKEFFECT__STATIC 5360
#define FIREFLYGROWEFFECT__STATIC 5367
#define FIREFLYFLYINGEFFECT__STATIC 5296
#define BOSS5__STATIC 5310
#define BOSS5STAYPUT__STATIC 5311
#define LAVAPOOL__STATIC 5304
#define LAVASPLASH__STATIC 5371
#define LAVAPOOLBUBBLE__STATIC 5207
#define BOSS2STAYPUT__STATIC 2711
#define BOSS3STAYPUT__STATIC 2761
#define E32_TILE5736__STATIC 5736
#define E32_TILE5737__STATIC 5737
#define E32_TILE5846__STATIC 5846
 
extern int16_t DynamicTileMap[MAXTILES];
 
1227,6 → 1259,38
extern int32_t WOMAN;
extern int32_t WOODENHORSE;
extern int32_t XXXSTACY;
extern int32_t WIDESCREENSTATUSBAR;
extern int32_t RPGGUNWIDE;
extern int32_t FIRSTGUNRELOADWIDE;
extern int32_t FREEZEWIDE;
extern int32_t FREEZEFIREWIDE;
extern int32_t SHRINKERWIDE;
extern int32_t CRACKKNUCKLESWIDE;
extern int32_t FLAMETHROWERSPRITE;
extern int32_t FLAMETHROWERAMMO;
extern int32_t FLAMETHROWER;
extern int32_t FLAMETHROWERFIRE;
extern int32_t FLAMETHROWERFLAME;
extern int32_t FLAMETHROWERPILOT;
extern int32_t FIREBALL;
extern int32_t ONFIRE;
extern int32_t ONFIRESMOKE;
extern int32_t BURNEDCORPSE;
extern int32_t WHISPYSMOKE;
extern int32_t FIREFLY;
extern int32_t FIREFLYSHRINKEFFECT;
extern int32_t FIREFLYGROWEFFECT;
extern int32_t FIREFLYFLYINGEFFECT;
extern int32_t BOSS5;
extern int32_t BOSS5STAYPUT;
extern int32_t LAVAPOOL;
extern int32_t LAVASPLASH;
extern int32_t LAVAPOOLBUBBLE;
extern int32_t BOSS2STAYPUT;
extern int32_t BOSS3STAYPUT;
extern int32_t E32_TILE5736;
extern int32_t E32_TILE5737;
extern int32_t E32_TILE5846;
 
#define DYNAMICTILEMAP(Tilenum) (DynamicTileMap[Tilenum])
 
/source/duke3d/src/player.cpp
1248,6 → 1248,10
}
break;
 
case FIREBALL__STATIC:
if (!WORLDTOUR)
break;
fallthrough__;
case FIRELASER__STATIC:
case SPIT__STATIC:
case COOLEXPLOSION1__STATIC:
1262,6 → 1266,14
vel = (pSprite->picnum == BOSS2) ? 644 : 348;
startPos.z -= (4 << 7);
break;
case FIREBALL__STATIC:
if (pSprite->picnum == BOSS5 || pSprite->picnum == BOSS5STAYPUT)
{
vel = 968;
startPos.z += 0x1800;
break;
}
fallthrough__;
case FIRELASER__STATIC:
default:
vel = 840;
1271,9 → 1283,16
 
if (playerNum >= 0)
{
if (GetAutoAimAng(spriteNum, playerNum, projecTile, -ZOFFSET4, 0, &startPos, vel, &Zvel, &shootAng) < 0)
if (projecTile == FIREBALL)
{
Zvel = fix16_to_int(F16(100) - pPlayer->q16horiz - pPlayer->q16horizoff) * 98;
startPos.x += sintable[(348+shootAng+512)&2047]/448;
startPos.y += sintable[(348+shootAng)&2047]/448;
startPos.z += 0x300;
}
else if (GetAutoAimAng(spriteNum, playerNum, projecTile, -ZOFFSET4, 0, &startPos, vel, &Zvel, &shootAng) < 0)
Zvel = fix16_to_int(F16(100) - pPlayer->q16horiz - pPlayer->q16horizoff) * 98;
}
else
{
int const otherPlayer = A_FindPlayer(pSprite, NULL);
1310,6 → 1329,16
sprite[returnSprite].ang += 128 - (krand() & 255);
}
}
else if (projecTile == FIREBALL)
{
if (PN(spriteNum) == BOSS5 || PN(spriteNum) == BOSS5STAYPUT || playerNum >= 0)
{
sprite[returnSprite].xrepeat = 40;
sprite[returnSprite].yrepeat = 40;
}
sprite[returnSprite].yvel = playerNum;
//sprite[returnSprite].cstat |= 0x4000;
}
 
sprite[returnSprite].cstat = 128;
sprite[returnSprite].clipdist = 4;
1563,10 → 1592,90
 
return returnSprite;
}
case FLAMETHROWERFLAME__STATIC:
{
if (!WORLDTOUR)
break;
 
if (pSprite->extra >= 0) pSprite->shade = -96;
vel = 1024;
int j, underwater;
if (playerNum >= 0)
{
Zvel = fix16_to_int(F16(100) - pPlayer->q16horiz - pPlayer->q16horizoff) * 81;
int xv = sprite[pPlayer->i].xvel;
if (xv)
{
int ang = getangle(startPos.x-pPlayer->opos.x,startPos.y-pPlayer->opos.y);
ang = 512-(1024-klabs(klabs(ang-shootAng)-1024));
vel = 1024+int(float(ang)*(1.f/512.f)*float(xv));
}
underwater = sector[pPlayer->cursectnum].lotag == ST_2_UNDERWATER;
}
else
{
// NOTE: j is a player index
j = A_FindPlayer(pSprite, NULL);
shootAng = getangle(g_player[j].ps->opos.x - startPos.x, g_player[j].ps->opos.y - startPos.y);
if (PN(spriteNum) == BOSS3 || PN(spriteNum) == BOSS3STAYPUT)
startPos.z -= MinibossScale(spriteNum, ZOFFSET5);
else if (PN(spriteNum) == BOSS5 || PN(spriteNum) == BOSS5STAYPUT)
{
vel += 128;
startPos.z += MinibossScale(spriteNum, 24 << 8);
}
 
Zvel = tabledivide32_noinline((g_player[j].ps->opos.z - startPos.z) * vel, safeldist(g_player[j].ps->i, pSprite));
 
if (A_CheckEnemySprite(pSprite) && (AC_MOVFLAGS(pSprite, &actor[spriteNum]) & face_player_smart))
shootAng = pSprite->ang + (krand() & 31) - 16;
underwater = sector[pSprite->sectnum].lotag == 2;
}
if (underwater)
{
if ((krand() % 5) != 0)
return -1;
j = A_Spawn(spriteNum, WATERBUBBLE);
}
else
{
j = A_Spawn(spriteNum, projecTile);
sprite[j].zvel = Zvel;
sprite[j].xvel = vel;
}
sprite[j].x = startPos.x+sintable[(shootAng+630)&2047]/448;
sprite[j].y = startPos.y+sintable[(shootAng+112)&2047]/448;
sprite[j].z = startPos.z-0x100;
sprite[j].cstat = 128;
sprite[j].ang = shootAng;
sprite[j].xrepeat = sprite[j].xrepeat = 2;
sprite[j].clipdist = 40;
sprite[j].owner = spriteNum;
sprite[j].yvel = playerNum;
if (playerNum == -1 && (sprite[spriteNum].picnum == BOSS5 || sprite[spriteNum].picnum == BOSS5))
{
sprite[j].xrepeat = sprite[j].yrepeat = 10;
sprite[j].x -= sintable[shootAng&2047]/56;
sprite[j].y -= sintable[(shootAng-512)&2047]/56;
}
return j;
}
case FIREFLY__STATIC:
{
if (!WORLDTOUR)
break;
 
int j = A_Spawn(spriteNum, projecTile);
sprite[j].pos = startPos;
sprite[j].ang = shootAng;
sprite[j].xvel = 500;
sprite[j].zvel = 0;
return j;
}
}
 
return -1;
}
#endif
 
int A_ShootWithZvel(int const spriteNum, int const projecTile, int const forceZvel)
1945,6 → 2054,9
if (PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) != KNEE_WEAPON)
pPlayer->ammo_amount[pPlayer->curr_weapon]--;
 
if (PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) == FLAMETHROWER_WEAPON && sector[pPlayer->cursectnum].lotag == ST_2_UNDERWATER)
return;
 
if (PWEAPON(playerNum, pPlayer->curr_weapon, FireSound) > 0)
A_PlaySound(PWEAPON(playerNum, pPlayer->curr_weapon, FireSound), pPlayer->i);
 
2777,6 → 2889,31
FREEZE, weaponShade, weaponBits, weaponPal);
break;
 
case FLAMETHROWER_WEAPON:
if ((*weaponFrame) < (PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime) + 1) && (*weaponFrame) >= 1 && sector[pPlayer->cursectnum].lotag != ST_2_UNDERWATER)
{
static uint8_t freezerFrames[] = { 0, 0, 1, 1, 2, 2 };
 
if (doAnim)
{
weaponX += rand() & 1;
weaponY += rand() & 1;
}
weaponYOffset -= 16;
G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 261 - weaponYOffset,
FLAMETHROWERFIRE, -32, weaponBits, weaponPal);
G_DrawWeaponTileWithID(currentWeapon, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset,
FLAMETHROWERFIRE + 1 + freezerFrames[*weaponFrame % 6], -32, weaponBits, weaponPal);
}
else
{
G_DrawWeaponTileWithID(currentWeapon, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 261 - weaponYOffset,
FLAMETHROWER, weaponShade, weaponBits, weaponPal);
G_DrawWeaponTileWithID(currentWeapon, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 261 - weaponYOffset,
FLAMETHROWERPILOT, weaponShade, weaponBits, weaponPal);
}
break;
 
case GROW_WEAPON:
case SHRINKER_WEAPON:
weaponX += 28;
3435,7 → 3572,7
 
int16_t WeaponPickupSprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATIC, SHOTGUNSPRITE__STATIC,
CHAINGUNSPRITE__STATIC, RPGSPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC, DEVISTATORSPRITE__STATIC,
TRIPBOMBSPRITE__STATIC, FREEZESPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC
TRIPBOMBSPRITE__STATIC, FREEZESPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC, FLAMETHROWERSPRITE__STATIC
};
// this is used for player deaths
void P_DropWeapon(int const playerNum)
4167,6 → 4304,15
}
break;
 
case FLAMETHROWER_WEAPON:
if (pPlayer->ammo_amount[pPlayer->curr_weapon] > 0)
{
(*weaponFrame) = 1;
if (PWEAPON(playerNum, pPlayer->curr_weapon, InitialSound) > 0 && sector[pPlayer->cursectnum].lotag != ST_2_UNDERWATER)
A_PlaySound(PWEAPON(playerNum, pPlayer->curr_weapon, InitialSound), pPlayer->i);
}
break;
 
case DEVISTATOR_WEAPON:
if (pPlayer->ammo_amount[pPlayer->curr_weapon] > 0)
{
/source/duke3d/src/player.h
220,7 → 220,7
#endif
 
int8_t crouch_toggle;
int8_t padding_[1];
int8_t padding_[3];
} DukePlayer_t;
 
// KEEPINSYNC lunatic/_defs_game.lua
/source/duke3d/src/sbar.cpp
620,7 → 620,7
 
int32_t asprites[MAX_WEAPONS] = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO,
RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO,
TRIPBOMBSPRITE, FREEZEAMMO+1, HBOMBAMMO, GROWAMMO
TRIPBOMBSPRITE, FREEZEAMMO+1, HBOMBAMMO, GROWAMMO, FLAMETHROWERAMMO+1,
};
Bmemcpy(ammo_sprites, asprites, sizeof(ammo_sprites));
}
/source/duke3d/src/sector.cpp
1995,6 → 1995,11
{
switch (DYNAMICTILEMAP(sprite[dmgSrc].picnum))
{
case FLAMETHROWERFLAME__STATIC:
case FIREBALL__STATIC:
if (!WORLDTOUR)
break;
fallthrough__;
case RADIUSEXPLOSION__STATIC:
case RPG__STATIC:
case FIRELASER__STATIC:
2138,6 → 2143,15
A_DeleteSprite(spriteNum);
return;
 
case E32_TILE5736__STATIC:
case E32_TILE5737__STATIC:
if (!WORLDTOUR)
break;
A_PlaySound(GLASS_BREAKING,spriteNum);
A_SpawnWallGlass(spriteNum,-1,10);
A_DeleteSprite(spriteNum);
return;
 
case HYDROPLANT__STATIC:
PN(spriteNum) = BROKEHYDROPLANT;
A_PlaySound(GLASS_BREAKING,spriteNum);
2246,6 → 2260,10
A_PlaySound(SLT(spriteNum),spriteNum);
A_Spawn(spriteNum,SHT(spriteNum));
fallthrough__;
case E32_TILE5846__STATIC:
if (!WORLDTOUR && PN(spriteNum) == E32_TILE5846)
break;
fallthrough__;
case SPACEMARINE__STATIC:
sprite[spriteNum].extra -= sprite[dmgSrc].extra;
if (sprite[spriteNum].extra > 0)
2317,6 → 2335,9
{
if (A_CheckEnemySprite(&sprite[spriteNum]) == 1)
{
if (WORLDTOUR && sprite[spriteNum].picnum == FIREFLY && sprite[spriteNum].xrepeat < 48)
return;
 
if (sprite[dmgSrc].picnum == RPG)
sprite[dmgSrc].extra <<= 1;
 
2374,7 → 2395,11
if (sprite[dmgSrc].picnum == FREEZEBLAST && ((PN(spriteNum) == APLAYER && sprite[spriteNum].pal == 1) || (g_freezerSelfDamage == 0 && sprite[dmgSrc].owner == spriteNum)))
return;
 
if (WORLDTOUR && sprite[dmgSrc].picnum == FIREBALL && sprite[sprite[spriteNum].owner].picnum != FIREBALL)
actor[spriteNum].picnum = FLAMETHROWERFLAME;
else
actor[spriteNum].picnum = sprite[dmgSrc].picnum;
 
actor[spriteNum].extra += sprite[dmgSrc].extra;
actor[spriteNum].ang = sprite[dmgSrc].ang;
actor[spriteNum].owner = sprite[dmgSrc].owner;
2782,6 → 2807,8
{
// if( ( p->weapon_pos == 0 || ( p->holster_weapon && p->weapon_pos == WEAPON_POS_LOWER ) ))
{
if (weaponNum >= 12) // hack
weaponNum++;
if (weaponNum == 10 || weaponNum == 11)
{
int currentWeapon = pPlayer->curr_weapon;
2789,7 → 2816,7
weaponNum = (weaponNum == 10 ? -1 : 1); // JBF: prev (-1) or next (1) weapon choice
int i = currentWeapon;
 
while ((currentWeapon >= 0 && currentWeapon < 11) || (PLUTOPAK && currentWeapon == GROW_WEAPON))
while ((currentWeapon >= 0 && currentWeapon < 11) || (PLUTOPAK && currentWeapon == GROW_WEAPON) || (WORLDTOUR && currentWeapon == FLAMETHROWER_WEAPON))
{
// this accounts for the expander when handling next/previous
 
2823,6 → 2850,34
currentWeapon--;
break;
 
case KNEE_WEAPON:
if ((int32_t) weaponNum == -1)
{
if (WORLDTOUR)
currentWeapon = FLAMETHROWER_WEAPON;
else
currentWeapon = FREEZE_WEAPON;
}
else
currentWeapon++;
break;
 
case FLAMETHROWER_WEAPON:
currentWeapon = ((int32_t) weaponNum == -1) ? FREEZE_WEAPON : KNEE_WEAPON;
break;
 
case FREEZE_WEAPON:
if ((int32_t)weaponNum == 1)
{
if (WORLDTOUR)
currentWeapon = FLAMETHROWER_WEAPON;
else
currentWeapon = KNEE_WEAPON;
}
else
currentWeapon--;
break;
 
case HANDREMOTE_WEAPON:
i = currentWeapon = HANDBOMB_WEAPON;
fallthrough__;
2831,9 → 2886,6
break;
}
 
if (currentWeapon == -1) currentWeapon = FREEZE_WEAPON;
else if (currentWeapon == 10) currentWeapon = KNEE_WEAPON;
 
if (((pPlayer->gotweapon & (1<<currentWeapon)) && pPlayer->ammo_amount[currentWeapon] > 0) || P_CheckDetonatorSpecialCase(pPlayer, currentWeapon))
{
weaponNum = currentWeapon;
2851,12 → 2903,16
pPlayer->subweapon &= ~(1 << GROW_WEAPON);
else if (weaponNum == GROW_WEAPON)
pPlayer->subweapon |= (1<<GROW_WEAPON);
else if (weaponNum == FREEZE_WEAPON)
pPlayer->subweapon &= ~(1 << FLAMETHROWER_WEAPON);
else if (weaponNum == FLAMETHROWER_WEAPON)
pPlayer->subweapon |= (1<<FLAMETHROWER_WEAPON);
}
 
// last used weapon will depend on subweapon
if (weaponNum >= 12) // alt weapon, last used weapon
if (weaponNum >= 13) // alt weapon, last used weapon
{
uint32_t const weaponNumSwitch = weaponNum == 13 ? pPlayer->last_used_weapon : pPlayer->curr_weapon;
uint32_t const weaponNumSwitch = weaponNum == 14 ? pPlayer->last_used_weapon : pPlayer->curr_weapon;
switch (weaponNumSwitch)
{
case HANDREMOTE_WEAPON:
2865,6 → 2921,9
case GROW_WEAPON:
weaponNum = SHRINKER_WEAPON;
break;
case FLAMETHROWER_WEAPON:
weaponNum = FREEZE_WEAPON;
break;
default:
weaponNum = weaponNumSwitch;
break;
2912,6 → 2971,34
pPlayer->subweapon &= ~(1<<GROW_WEAPON);
}
 
if (weaponNum == FREEZE_WEAPON && WORLDTOUR)
{
if (screenpeek == playerNum) pus = NUMPAGES;
 
if (pPlayer->curr_weapon != FLAMETHROWER_WEAPON && pPlayer->curr_weapon != FREEZE_WEAPON)
{
if (pPlayer->ammo_amount[FLAMETHROWER_WEAPON] > 0)
{
if ((pPlayer->subweapon&(1<<FLAMETHROWER_WEAPON)) == (1<<FLAMETHROWER_WEAPON))
weaponNum = FLAMETHROWER_WEAPON;
else if (pPlayer->ammo_amount[FREEZE_WEAPON] == 0)
{
weaponNum = FLAMETHROWER_WEAPON;
pPlayer->subweapon |= (1<<FLAMETHROWER_WEAPON);
}
}
else if (pPlayer->ammo_amount[FREEZE_WEAPON] > 0)
pPlayer->subweapon &= ~(1<<FLAMETHROWER_WEAPON);
}
else if (pPlayer->curr_weapon == FREEZE_WEAPON)
{
pPlayer->subweapon |= (1<<FLAMETHROWER_WEAPON);
weaponNum = FLAMETHROWER_WEAPON;
}
else
pPlayer->subweapon &= ~(1<<FLAMETHROWER_WEAPON);
}
 
if (pPlayer->holster_weapon)
{
playerBits |= BIT(SK_HOLSTER);
2928,6 → 3015,7
case FREEZE_WEAPON:
case GROW_WEAPON:
case SHRINKER_WEAPON:
case FLAMETHROWER_WEAPON:
if (pPlayer->ammo_amount[weaponNum] == 0 && pPlayer->show_empty_weapon == 0)
{
pPlayer->last_full_weapon = pPlayer->curr_weapon;
/source/duke3d/src/soundsdyn.cpp
183,6 → 183,9
{ "WIERDSHOT_FLY", DVPTR(WIERDSHOT_FLY), WIERDSHOT_FLY__STATIC },
{ "WIND_AMBIENCE", DVPTR(WIND_AMBIENCE), WIND_AMBIENCE__STATIC },
{ "WIND_REPEAT", DVPTR(WIND_REPEAT), WIND_REPEAT__STATIC },
{ "FLAMETHROWER_INTRO", DVPTR(FLAMETHROWER_INTRO), FLAMETHROWER_INTRO__STATIC },
{ "FLAMETHROWER_LOOP", DVPTR(FLAMETHROWER_LOOP), FLAMETHROWER_LOOP__STATIC },
{ "FLAMETHROWER_END", DVPTR(FLAMETHROWER_END), FLAMETHROWER_END__STATIC },
};
 
#ifdef DYNSOUNDREMAP_ENABLE
325,6 → 328,9
int32_t WIERDSHOT_FLY = WIERDSHOT_FLY__STATIC;
int32_t WIND_AMBIENCE = WIND_AMBIENCE__STATIC;
int32_t WIND_REPEAT = WIND_REPEAT__STATIC;
int32_t FLAMETHROWER_INTRO = FLAMETHROWER_INTRO__STATIC;
int32_t FLAMETHROWER_LOOP = FLAMETHROWER_LOOP__STATIC;
int32_t FLAMETHROWER_END = FLAMETHROWER_END__STATIC;
 
#if !defined LUNATIC
static hashtable_t h_names = {512, NULL};
/source/duke3d/src/soundsdyn.h
163,6 → 163,9
#define EXPANDERSHOOT__STATIC 388
#define INTRO4_B__STATIC 392
#define BIGBANG__STATIC 393
#define FLAMETHROWER_INTRO__STATIC 398
#define FLAMETHROWER_LOOP__STATIC 399
#define FLAMETHROWER_END__STATIC 400
 
extern int16_t DynamicSoundMap[MAXSOUNDS];
 
315,6 → 318,9
extern int32_t WIERDSHOT_FLY;
extern int32_t WIND_AMBIENCE;
extern int32_t WIND_REPEAT;
extern int32_t FLAMETHROWER_INTRO;
extern int32_t FLAMETHROWER_LOOP;
extern int32_t FLAMETHROWER_END;
 
#define DYNAMICSOUNDMAP(Soundnum) (DynamicSoundMap[Soundnum])