mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 23:42:11 +00:00
Hardcoded the TNT barrels and proximity shell (using mazmazz's A_TNTExplode implementation from the minecart branch)
This commit is contained in:
parent
546af19c82
commit
7b603f4ac8
9 changed files with 331 additions and 3 deletions
|
@ -2394,8 +2394,8 @@ static actionpointer_t actionpointers[] =
|
|||
{{A_LookForBetter}, "A_LOOKFORBETTER"},
|
||||
{{A_Boss5BombExplode}, "A_BOSS5BOMBEXPLODE"},
|
||||
{{A_DustDevilThink}, "A_DUSTDEVILTHINK"},
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
{{A_TNTExplode}, "A_TNTEXPLODE"},
|
||||
{{NULL}, "NONE"},
|
||||
|
||||
// This NULL entry must be the last in the list
|
||||
{{NULL}, NULL},
|
||||
|
@ -5686,6 +5686,42 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_OILLAMP",
|
||||
"S_OILLAMPFLARE",
|
||||
|
||||
// TNT barrel
|
||||
"S_TNTBARREL_STND1",
|
||||
"S_TNTBARREL_EXPL1",
|
||||
"S_TNTBARREL_EXPL2",
|
||||
"S_TNTBARREL_EXPL3",
|
||||
"S_TNTBARREL_EXPL4",
|
||||
"S_TNTBARREL_EXPL5",
|
||||
"S_TNTBARREL_EXPL6",
|
||||
"S_TNTBARREL_FLYING",
|
||||
|
||||
// TNT proximity shell
|
||||
"S_PROXIMITY_TNT",
|
||||
"S_PROXIMITY_TNT_TRIGGER1",
|
||||
"S_PROXIMITY_TNT_TRIGGER2",
|
||||
"S_PROXIMITY_TNT_TRIGGER3",
|
||||
"S_PROXIMITY_TNT_TRIGGER4",
|
||||
"S_PROXIMITY_TNT_TRIGGER5",
|
||||
"S_PROXIMITY_TNT_TRIGGER6",
|
||||
"S_PROXIMITY_TNT_TRIGGER7",
|
||||
"S_PROXIMITY_TNT_TRIGGER8",
|
||||
"S_PROXIMITY_TNT_TRIGGER9",
|
||||
"S_PROXIMITY_TNT_TRIGGER10",
|
||||
"S_PROXIMITY_TNT_TRIGGER11",
|
||||
"S_PROXIMITY_TNT_TRIGGER12",
|
||||
"S_PROXIMITY_TNT_TRIGGER13",
|
||||
"S_PROXIMITY_TNT_TRIGGER14",
|
||||
"S_PROXIMITY_TNT_TRIGGER15",
|
||||
"S_PROXIMITY_TNT_TRIGGER16",
|
||||
"S_PROXIMITY_TNT_TRIGGER17",
|
||||
"S_PROXIMITY_TNT_TRIGGER18",
|
||||
"S_PROXIMITY_TNT_TRIGGER19",
|
||||
"S_PROXIMITY_TNT_TRIGGER20",
|
||||
"S_PROXIMITY_TNT_TRIGGER21",
|
||||
"S_PROXIMITY_TNT_TRIGGER22",
|
||||
"S_PROXIMITY_TNT_TRIGGER23",
|
||||
|
||||
// Dust devil
|
||||
"S_DUSTDEVIL",
|
||||
"S_DUSTLAYER1",
|
||||
|
@ -7386,6 +7422,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_ARIDSIGN_CACTI",
|
||||
"MT_ARIDSIGN_SHARPTURN",
|
||||
"MT_OILLAMP",
|
||||
"MT_TNTBARREL",
|
||||
"MT_PROXIMITYTNT",
|
||||
"MT_DUSTDEVIL",
|
||||
"MT_DUSTLAYER",
|
||||
"MT_ARIDDUST",
|
||||
|
|
|
@ -352,6 +352,8 @@ light_t *t_lspr[NUMSPRITES] =
|
|||
&lspr[NOLIGHT], // SPR_WWS3
|
||||
&lspr[NOLIGHT], // SPR_OILL
|
||||
&lspr[NOLIGHT], // SPR_OILF
|
||||
&lspr[NOLIGHT], // SPR_BARR
|
||||
&lspr[NOLIGHT], // SPR_REMT
|
||||
&lspr[NOLIGHT], // SPR_TAZD
|
||||
&lspr[NOLIGHT], // SPR_ADST
|
||||
|
||||
|
|
92
src/info.c
92
src/info.c
|
@ -247,6 +247,8 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"WWS3", // Sharp Turn Sign
|
||||
"OILL", // Oil lamp
|
||||
"OILF", // Oil lamp flare
|
||||
"BARR", // TNT barrel
|
||||
"REMT", // TNT proximity shell
|
||||
"TAZD", // Dust devil
|
||||
"ADST", // Arid dust
|
||||
|
||||
|
@ -2323,6 +2325,42 @@ state_t states[NUMSTATES] =
|
|||
{SPR_OILL, FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_OILLAMP
|
||||
{SPR_OILF, FF_TRANS90|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_OILLAMPFLARE
|
||||
|
||||
// TNT barrel
|
||||
{SPR_BARR, 0, -1, {NULL}, 0, 0, S_NULL}, // S_TNTBARREL_STND1
|
||||
{SPR_BARX, 0|FF_FULLBRIGHT, 3, {A_SetObjectFlags}, MF_NOCLIP|MF_NOGRAVITY|MF_NOBLOCKMAP, 0, S_TNTBARREL_EXPL2}, // S_TNTBARREL_EXPL1
|
||||
{SPR_BARX, 1|FF_FULLBRIGHT, 2, {A_TNTExplode}, MT_TNTDUST, 0, S_TNTBARREL_EXPL3}, // S_TNTBARREL_EXPL2
|
||||
{SPR_BARX, 1|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_TNTBARREL_EXPL4}, // S_TNTBARREL_EXPL3
|
||||
{SPR_BARX, 2|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_TNTBARREL_EXPL5}, // S_TNTBARREL_EXPL4
|
||||
{SPR_BARX, 3|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_TNTBARREL_EXPL6}, // S_TNTBARREL_EXPL5
|
||||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_TNTBARREL_EXPL6
|
||||
{SPR_BARR, 1|FF_ANIMATE, -1, {NULL}, 7, 2, S_NULL}, // S_TNTBARREL_FLYING
|
||||
|
||||
// TNT proximity shell
|
||||
{SPR_REMT, 0, 10, {A_Look}, 33554433, 0, S_PROXIMITY_TNT}, // S_PROXIMITY_TNT
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER2}, // S_PROXIMITY_TNT_TRIGGER1
|
||||
{SPR_REMT, 0, 16, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER3}, // S_PROXIMITY_TNT_TRIGGER2
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER4}, // S_PROXIMITY_TNT_TRIGGER3
|
||||
{SPR_REMT, 0, 16, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER5}, // S_PROXIMITY_TNT_TRIGGER4
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER6}, // S_PROXIMITY_TNT_TRIGGER5
|
||||
{SPR_REMT, 0, 4, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER7}, // S_PROXIMITY_TNT_TRIGGER6
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER8}, // S_PROXIMITY_TNT_TRIGGER7
|
||||
{SPR_REMT, 0, 4, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER9}, // S_PROXIMITY_TNT_TRIGGER8
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER10}, // S_PROXIMITY_TNT_TRIGGER9
|
||||
{SPR_REMT, 0, 4, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER11}, // S_PROXIMITY_TNT_TRIGGER10
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER12}, // S_PROXIMITY_TNT_TRIGGER11
|
||||
{SPR_REMT, 0, 4, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER13}, // S_PROXIMITY_TNT_TRIGGER12
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER14}, // S_PROXIMITY_TNT_TRIGGER13
|
||||
{SPR_REMT, 0, 2, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER15}, // S_PROXIMITY_TNT_TRIGGER14
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER16}, // S_PROXIMITY_TNT_TRIGGER15
|
||||
{SPR_REMT, 0, 2, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER17}, // S_PROXIMITY_TNT_TRIGGER16
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER18}, // S_PROXIMITY_TNT_TRIGGER17
|
||||
{SPR_REMT, 0, 2, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER19}, // S_PROXIMITY_TNT_TRIGGER18
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER20}, // S_PROXIMITY_TNT_TRIGGER19
|
||||
{SPR_REMT, 0, 2, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER21}, // S_PROXIMITY_TNT_TRIGGER20
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_PROXIMITY_TNT_TRIGGER22}, // S_PROXIMITY_TNT_TRIGGER21
|
||||
{SPR_REMT, 0, 2, {NULL}, 0, 0, S_PROXIMITY_TNT_TRIGGER23}, // S_PROXIMITY_TNT_TRIGGER22
|
||||
{SPR_REMT, 1|FF_FULLBRIGHT, 1, {A_PlayActiveSound}, 0, 0, S_TNTBARREL_EXPL1}, // S_PROXIMITY_TNT_TRIGGER23
|
||||
|
||||
// Dust devil
|
||||
{SPR_NULL, 0, 1, {A_DustDevilThink}, 0, 0, S_DUSTDEVIL}, //S_DUSTDEVIL
|
||||
{SPR_TAZD, 1|FF_PAPERSPRITE|FF_TRANS70, 2 * TICRATE, {NULL}, 0, 0, S_DUSTLAYER2}, // S_DUSTLAYER1
|
||||
|
@ -11462,6 +11500,60 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_TNTBARREL
|
||||
1216, // doomednum
|
||||
S_TNTBARREL_STND1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_bowl, // attacksound
|
||||
S_TNTBARREL_EXPL1, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_TNTBARREL_FLYING, // missilestate
|
||||
S_TNTBARREL_EXPL1, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_s3k4e, // deathsound
|
||||
0, // speed
|
||||
24*FRACUNIT, // radius
|
||||
63*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_s3k8d, // activesound
|
||||
MF_SOLID|MF_SHOOTABLE|MF_ENEMY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_PROXIMITYTNT
|
||||
1217, // doomednum
|
||||
S_PROXIMITY_TNT, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_PROXIMITY_TNT_TRIGGER1, // seestate
|
||||
sfx_s3k5c, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_s3k4e, // deathsound
|
||||
0, // speed
|
||||
64*FRACUNIT, // radius
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_s3k89, // activesound
|
||||
MF_SOLID, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_DUSTDEVIL
|
||||
1218, // doomednum
|
||||
S_DUSTDEVIL, // spawnstate
|
||||
|
|
41
src/info.h
41
src/info.h
|
@ -252,6 +252,7 @@ void A_Boss5MakeItRain();
|
|||
void A_LookForBetter();
|
||||
void A_Boss5BombExplode();
|
||||
void A_DustDevilThink();
|
||||
void A_TNTExplode();
|
||||
|
||||
// ratio of states to sprites to mobj types is roughly 6 : 1 : 1
|
||||
#define NUMMOBJFREESLOTS 256
|
||||
|
@ -479,6 +480,8 @@ typedef enum sprite
|
|||
SPR_WWS3, // Sharp Turn Sign
|
||||
SPR_OILL, // Oil lamp
|
||||
SPR_OILF, // Oil lamp flare
|
||||
SPR_BARR, // TNT barrel
|
||||
SPR_REMT, // TNT proximity shell
|
||||
SPR_TAZD, // Dust devil
|
||||
SPR_ADST, // Arid dust
|
||||
|
||||
|
@ -2435,6 +2438,42 @@ typedef enum state
|
|||
S_OILLAMP,
|
||||
S_OILLAMPFLARE,
|
||||
|
||||
// TNT barrel
|
||||
S_TNTBARREL_STND1,
|
||||
S_TNTBARREL_EXPL1,
|
||||
S_TNTBARREL_EXPL2,
|
||||
S_TNTBARREL_EXPL3,
|
||||
S_TNTBARREL_EXPL4,
|
||||
S_TNTBARREL_EXPL5,
|
||||
S_TNTBARREL_EXPL6,
|
||||
S_TNTBARREL_FLYING,
|
||||
|
||||
// TNT proximity shell
|
||||
S_PROXIMITY_TNT,
|
||||
S_PROXIMITY_TNT_TRIGGER1,
|
||||
S_PROXIMITY_TNT_TRIGGER2,
|
||||
S_PROXIMITY_TNT_TRIGGER3,
|
||||
S_PROXIMITY_TNT_TRIGGER4,
|
||||
S_PROXIMITY_TNT_TRIGGER5,
|
||||
S_PROXIMITY_TNT_TRIGGER6,
|
||||
S_PROXIMITY_TNT_TRIGGER7,
|
||||
S_PROXIMITY_TNT_TRIGGER8,
|
||||
S_PROXIMITY_TNT_TRIGGER9,
|
||||
S_PROXIMITY_TNT_TRIGGER10,
|
||||
S_PROXIMITY_TNT_TRIGGER11,
|
||||
S_PROXIMITY_TNT_TRIGGER12,
|
||||
S_PROXIMITY_TNT_TRIGGER13,
|
||||
S_PROXIMITY_TNT_TRIGGER14,
|
||||
S_PROXIMITY_TNT_TRIGGER15,
|
||||
S_PROXIMITY_TNT_TRIGGER16,
|
||||
S_PROXIMITY_TNT_TRIGGER17,
|
||||
S_PROXIMITY_TNT_TRIGGER18,
|
||||
S_PROXIMITY_TNT_TRIGGER19,
|
||||
S_PROXIMITY_TNT_TRIGGER20,
|
||||
S_PROXIMITY_TNT_TRIGGER21,
|
||||
S_PROXIMITY_TNT_TRIGGER22,
|
||||
S_PROXIMITY_TNT_TRIGGER23,
|
||||
|
||||
// Dust devil
|
||||
S_DUSTDEVIL,
|
||||
S_DUSTLAYER1,
|
||||
|
@ -4155,6 +4194,8 @@ typedef enum mobj_type
|
|||
MT_ARIDSIGN_CACTI, // Cacti Sign
|
||||
MT_ARIDSIGN_SHARPTURN, // Sharp Turn Sign
|
||||
MT_OILLAMP,
|
||||
MT_TNTBARREL,
|
||||
MT_PROXIMITYTNT,
|
||||
MT_DUSTDEVIL,
|
||||
MT_DUSTLAYER,
|
||||
MT_ARIDDUST,
|
||||
|
|
115
src/p_enemy.c
115
src/p_enemy.c
|
@ -281,6 +281,7 @@ void A_Boss5MakeItRain(mobj_t *actor);
|
|||
void A_LookForBetter(mobj_t *actor);
|
||||
void A_Boss5BombExplode(mobj_t *actor);
|
||||
void A_DustDevilThink(mobj_t *actor);
|
||||
void A_TNTExplode(mobj_t *actor);
|
||||
//for p_enemy.c
|
||||
|
||||
//
|
||||
|
@ -12664,3 +12665,117 @@ void A_DustDevilThink(mobj_t *actor)
|
|||
if (leveltime % 70 == 0)
|
||||
S_StartSound(actor, sfx_s3kcel);
|
||||
}
|
||||
|
||||
// stuff used by A_TNTExplode
|
||||
static mobj_t *barrel;
|
||||
static fixed_t exploderadius;
|
||||
static fixed_t explodethrust;
|
||||
|
||||
static boolean PIT_TNTExplode(mobj_t *nearby)
|
||||
{
|
||||
fixed_t dx, dy, dz;
|
||||
fixed_t dm;
|
||||
|
||||
if (nearby == barrel)
|
||||
return true;
|
||||
|
||||
dx = nearby->x - barrel->x;
|
||||
dy = nearby->y - barrel->y;
|
||||
dz = nearby->z - barrel->z + (nearby->height - barrel->height/2)/2;
|
||||
dm = P_AproxDistance(P_AproxDistance(dx, dy), dz);
|
||||
|
||||
if (dm >= exploderadius || !P_CheckSight(barrel, nearby)) // out of range or not visible
|
||||
return true;
|
||||
|
||||
if (barrel->type == nearby->type) // nearby is also a barrel
|
||||
{
|
||||
if (nearby->state == &states[nearby->info->spawnstate])
|
||||
{
|
||||
if (barrel->info->attacksound)
|
||||
S_StartSound(nearby, barrel->info->attacksound);
|
||||
nearby->momx = FixedMul(FixedDiv(dx, dm), explodethrust);
|
||||
nearby->momy = FixedMul(FixedDiv(dy, dm), explodethrust);
|
||||
nearby->momz = FixedMul(FixedDiv(dz, dm), explodethrust);
|
||||
nearby->flags = MF_NOBLOCKMAP|MF_MISSILE;
|
||||
P_SetMobjState(nearby, nearby->info->missilestate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (barrel->target == nearby)
|
||||
{
|
||||
mobj_t *tar = barrel->target; // temporarily store barrel's target
|
||||
barrel->target = NULL;
|
||||
P_DamageMobj(nearby, barrel, NULL, 1, 0);
|
||||
barrel->target = tar;
|
||||
}
|
||||
else
|
||||
{
|
||||
P_DamageMobj(nearby,
|
||||
(barrel->target) ? barrel->target : barrel,
|
||||
(barrel->target) ? barrel->target : barrel,
|
||||
1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Function: A_TNTExplode
|
||||
//
|
||||
// Description: Creates a TNT explosion. Used by TNT barrels and the like.
|
||||
//
|
||||
// var1 = Thing type to spawn as dust.
|
||||
// var2 = unused
|
||||
//
|
||||
void A_TNTExplode(mobj_t *actor)
|
||||
{
|
||||
INT32 locvar1 = var1;
|
||||
//INT32 locvar2 = var2;
|
||||
INT32 x, y;
|
||||
INT32 xl, xh, yl, yh;
|
||||
static mappoint_t epicenter = {0,0,0};
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_TNTExplode", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
actor->flags = MF_NOCLIP|MF_NOGRAVITY|MF_NOBLOCKMAP;
|
||||
actor->flags2 = MF2_EXPLOSION;
|
||||
if (actor->info->deathsound)
|
||||
S_StartSound(actor, actor->info->deathsound);
|
||||
|
||||
explodethrust = 32*FRACUNIT;
|
||||
exploderadius = 256*FRACUNIT;
|
||||
|
||||
xl = (unsigned)(actor->x - exploderadius - bmaporgx)>>MAPBLOCKSHIFT;
|
||||
xh = (unsigned)(actor->x + exploderadius - bmaporgx)>>MAPBLOCKSHIFT;
|
||||
yl = (unsigned)(actor->y - exploderadius - bmaporgy)>>MAPBLOCKSHIFT;
|
||||
yh = (unsigned)(actor->y + exploderadius - bmaporgy)>>MAPBLOCKSHIFT;
|
||||
|
||||
BMBOUNDFIX(xl, xh, yl, yh);
|
||||
|
||||
barrel = actor;
|
||||
|
||||
for (x = xl; x <= xh; x++)
|
||||
for (y = yl; y <= yh; y++)
|
||||
P_BlockThingsIterator(x, y, PIT_TNTExplode);
|
||||
|
||||
// cause a quake -- P_StartQuake does not exist yet
|
||||
epicenter.x = actor->x;
|
||||
epicenter.y = actor->y;
|
||||
epicenter.z = actor->z;
|
||||
quake.intensity = 9*FRACUNIT;
|
||||
quake.time = TICRATE/6;
|
||||
quake.epicenter = &epicenter;
|
||||
quake.radius = 512*FRACUNIT;
|
||||
|
||||
if (locvar1)
|
||||
{
|
||||
P_DustRing(locvar1, 4, actor->x, actor->y, actor->z+actor->height, 64, 0, actor->scale);
|
||||
P_DustRing(locvar1, 6, actor->x, actor->y, actor->z+actor->height/2, 96, FRACUNIT, actor->scale);
|
||||
}
|
||||
|
||||
actor->destscale *= 4;
|
||||
}
|
35
src/p_map.c
35
src/p_map.c
|
@ -818,6 +818,41 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (thing->type == MT_TNTBARREL && tmthing->player)
|
||||
{
|
||||
if (tmthing->momz < 0)
|
||||
{
|
||||
if (tmthing->z + tmthing->momz > thing->z + thing->height)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tmthing->momz > 0)
|
||||
{
|
||||
if (tmthing->z + tmthing->height + tmthing->momz < thing->z)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tmthing->z + tmthing->height < thing->z)
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((tmthing->player->pflags & (PF_SPINNING | PF_GLIDING))
|
||||
|| ((tmthing->player->pflags & PF_JUMPED)
|
||||
&& (!(tmthing->player->pflags & PF_NOJUMPDAMAGE)
|
||||
|| (tmthing->player->charability == CA_TWINSPIN && tmthing->player->panim == PA_ABILITY)))
|
||||
|| (tmthing->player->charability2 == CA2_MELEE && tmthing->player->panim == PA_ABILITY2)
|
||||
|| ((tmthing->player->charflags & SF_STOMPDAMAGE || tmthing->player->pflags & PF_BOUNCING)
|
||||
&& (P_MobjFlip(tmthing)*(tmthing->z - (thing->z + thing->height / 2)) > 0) && (P_MobjFlip(tmthing)*tmthing->momz < 0))
|
||||
|| (((tmthing->player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL || (tmthing->player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) && (tmthing->player->pflags & PF_SHIELDABILITY)))
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1, 0);
|
||||
}
|
||||
|
||||
if (tmthing->type == MT_FANG && thing->type == MT_FSGNB)
|
||||
{
|
||||
if (thing->z > tmthing->z + tmthing->height)
|
||||
|
|
|
@ -9159,6 +9159,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
P_SetMobjState(overlay, S_OILLAMPFLARE);
|
||||
break;
|
||||
}
|
||||
case MT_TNTBARREL:
|
||||
mobj->momx = 1; //stack hack
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -195,6 +195,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"boingf", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bouncing"},
|
||||
{"corkp", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cork fired"},
|
||||
{"corkh", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cork hit"},
|
||||
{"bowl", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bowling"},
|
||||
|
||||
// Menu, interface
|
||||
{"chchng", false, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Score"},
|
||||
|
@ -373,7 +374,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"s3k86", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Alarm"},
|
||||
{"s3k87", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bounce"},
|
||||
{"s3k88", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic squeak"},
|
||||
{"s3k89", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Advanced technology"},
|
||||
{"s3k89", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Advanced tech"},
|
||||
{"s3k8a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Boing"},
|
||||
{"s3k8b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Powerful hit"},
|
||||
{"s3k8c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Humming power"},
|
||||
|
|
|
@ -261,6 +261,7 @@ typedef enum
|
|||
sfx_boingf,
|
||||
sfx_corkp,
|
||||
sfx_corkh,
|
||||
sfx_bowl,
|
||||
|
||||
// Menu, interface
|
||||
sfx_chchng,
|
||||
|
|
Loading…
Reference in a new issue