diff options
author | Samuel Villareal | 2010-09-07 03:16:54 +0000 |
---|---|---|
committer | Samuel Villareal | 2010-09-07 03:16:54 +0000 |
commit | d112932e1efaa6588ed7276021847a28eb596900 (patch) | |
tree | bbce4aa0cbb620013e4d68fae1c438c125673db7 /src | |
parent | bdd800ded2c0e2df1b15372135b9cfd5901f6ecd (diff) | |
download | chocolate-doom-d112932e1efaa6588ed7276021847a28eb596900.tar.gz chocolate-doom-d112932e1efaa6588ed7276021847a28eb596900.tar.bz2 chocolate-doom-d112932e1efaa6588ed7276021847a28eb596900.zip |
+ All linedef flags added
+ Translucent line/wall drawing supported
+ Jumpover/Blockfloater flag behavior implemented
+ Puff behavior implemented
+ Some changes to PIT_AttackRadius
+ Some changes to PIT_ChangeSector
Subversion-branch: /branches/strife-branch
Subversion-revision: 2030
Diffstat (limited to 'src')
-rw-r--r-- | src/strife/doomdata.h | 12 | ||||
-rw-r--r-- | src/strife/p_enemy.c | 8 | ||||
-rw-r--r-- | src/strife/p_map.c | 83 | ||||
-rw-r--r-- | src/strife/p_mobj.c | 11 | ||||
-rw-r--r-- | src/strife/p_pspr.c | 4 | ||||
-rw-r--r-- | src/strife/r_segs.c | 10 |
6 files changed, 101 insertions, 27 deletions
diff --git a/src/strife/doomdata.h b/src/strife/doomdata.h index 66733aea..db57a539 100644 --- a/src/strife/doomdata.h +++ b/src/strife/doomdata.h @@ -139,6 +139,18 @@ typedef struct // Set if already seen, thus drawn in automap. #define ML_MAPPED 256 +// villsa [STRIFE] jump over rails? +#define ML_JUMPOVER 512 + +// villsa [STRIFE] block flying things +#define ML_BLOCKFLOATERS 1024 + +// villsa [STRIFE] TODO - 25% or 75% transcluency? +#define ML_TRANSPARENT1 2048 + +// villsa [STRIFE] TODO - 25% or 75% transcluency? +#define ML_TRANSPARENT2 4096 + diff --git a/src/strife/p_enemy.c b/src/strife/p_enemy.c index 3f3b08d8..6cb2aff3 100644 --- a/src/strife/p_enemy.c +++ b/src/strife/p_enemy.c @@ -1619,7 +1619,7 @@ void A_InqGrenade(mobj_t* actor) A_FaceTarget(actor); - actor->z += (32*FRACUNIT); + actor->z += MAXRADIUS; // grenade 1 actor->angle -= (ANG45 / 32); @@ -1631,7 +1631,7 @@ void A_InqGrenade(mobj_t* actor) mo = P_SpawnFacingMissile(actor, actor->target, MT_INQGRENADE); mo->momz += (16*FRACUNIT); - actor->z -= (32*FRACUNIT); + actor->z -= MAXRADIUS; } // @@ -2022,12 +2022,12 @@ void A_BishopAttack(mobj_t* actor) if(!actor->target) return; - actor->z += (32*FRACUNIT); + actor->z += MAXRADIUS; mo = P_SpawnMissile(actor, actor->target, MT_SEEKMISSILE); mo->tracer = actor->target; - actor->z -= (32*FRACUNIT); + actor->z -= MAXRADIUS; } // diff --git a/src/strife/p_map.c b/src/strife/p_map.c index f83851cf..f31cbf86 100644 --- a/src/strife/p_map.c +++ b/src/strife/p_map.c @@ -249,11 +249,19 @@ boolean PIT_CheckLine (line_t* ld) if (!(tmthing->flags & MF_MISSILE) ) { - if ( ld->flags & ML_BLOCKING ) + // villsa [STRIFE] include jumpover flag + if ( ld->flags & ML_BLOCKING && + (!(ld->flags & ML_JUMPOVER) || tmfloorz + (32*FRACUNIT) > tmthing->z) ) return false; // explicitly blocking everything - if ( !tmthing->player && ld->flags & ML_BLOCKMONSTERS ) + // villsa [STRIFE] exclude floaters from blockmonster lines + if ( !tmthing->player && ld->flags & ML_BLOCKMONSTERS && + !(tmthing->flags & MF_FLOAT)) return false; // block monsters only + + // villsa [STRIFE] + if ( ld->flags & ML_BLOCKFLOATERS && tmthing->flags & MF_FLOAT ) + return false; // block floaters only } // set openrange, opentop, openbottom @@ -1053,6 +1061,7 @@ boolean PTR_ShootTraverse (intercept_t* in) line_t* li; mobj_t* th; + mobj_t* th2; // villsa [STRIFE] fixed_t slope; fixed_t dist; @@ -1118,11 +1127,18 @@ boolean PTR_ShootTraverse (intercept_t* in) return false; } - // Spawn bullet puffs. - P_SpawnPuff (x,y,z); + // villsa [STRIFE] + if(la_damage > 0) + { + // villsa [STRIFE] TODO - verify on whats the purpose with this + if(attackrange != (2112*FRACUNIT)) + P_SpawnPuff(x, y, z); // Spawn bullet puffs. + else + P_SpawnMobj(x, y, z, MT_STRIFEPUFF3); - // don't go any farther - return false; + // don't go any farther + return false; + } } // shoot a thing @@ -1132,6 +1148,10 @@ boolean PTR_ShootTraverse (intercept_t* in) if (!(th->flags&MF_SHOOTABLE)) return true; // corpse or something + + // villsa [STRIFE] skip mvis flagged things? + if(th->flags & MF_MVIS) + return true; // check angles to see if the thing can be aimed at dist = FixedMul (attackrange, in->frac); @@ -1154,16 +1174,26 @@ boolean PTR_ShootTraverse (intercept_t* in) y = trace.y + FixedMul (trace.dy, frac); z = shootz + FixedMul (aimslope, FixedMul(frac, attackrange)); + // villsa [STRIFE] TODO - verify purpose of this + if(attackrange == (2112*FRACUNIT)) + { + th2 = P_SpawnMobj(x, y, z, MT_STRIFEPUFF3); + th2->momz = -FRACUNIT; + P_DamageMobj(th, th2, shootthing, la_damage); + return false; + } + + // villsa [STRIFE] TODO - verify disabled check for damage? + //if (la_damage) + P_DamageMobj (th, shootthing, shootthing, la_damage); + // Spawn bullet puffs or blod spots, // depending on target type. if (in->d.thing->flags & MF_NOBLOOD) - P_SpawnPuff (x,y,z); + P_SpawnSparkPuff(x, y, z); // villsa [STRIFE] call spark puff function instead else P_SpawnBlood (x,y,z, la_damage); - if (la_damage) - P_DamageMobj (th, shootthing, shootthing, la_damage); - // don't go any farther return false; @@ -1205,6 +1235,11 @@ P_AimLineAttack if (linetarget) return aimslope; + else // villsa [STRIFE] checks for player pitch + { + if(t1->player) + return (t1->player->pitch << FRACBITS) / 160; + } return 0; } @@ -1225,6 +1260,7 @@ P_LineAttack { fixed_t x2; fixed_t y2; + int traverseflags; angle >>= ANGLETOFINESHIFT; shootthing = t1; @@ -1235,9 +1271,15 @@ P_LineAttack attackrange = distance; aimslope = slope; + // villsa [STRIFE] test lines only if damage is <= 0 + if(damage >= 1) + traverseflags = (PT_ADDLINES|PT_ADDTHINGS); + else + traverseflags = PT_ADDLINES; + P_PathTraverse(t1->x, t1->y, x2, y2, - PT_ADDLINES|PT_ADDTHINGS, + traverseflags, PTR_ShootTraverse); } @@ -1387,6 +1429,14 @@ P_RadiusAttack for (y=yl ; y<=yh ; y++) for (x=xl ; x<=xh ; x++) P_BlockThingsIterator (x, y, PIT_RadiusAttack ); + + // villsa [STRIFE] TODO - verify. what on earth is it trying to do here? + spot->z += MAXRADIUS; + P_LineAttack(spot, 0, dist, 1, 0); + P_LineAttack(spot, ANG90, dist, 1, 0); + P_LineAttack(spot, ANG180, dist, 1, 0); + P_LineAttack(spot, ANG270, dist, 1, 0); + spot->z -= MAXRADIUS; } @@ -1425,8 +1475,15 @@ boolean PIT_ChangeSector (mobj_t* thing) // crunch bodies to giblets if (thing->health <= 0) { - //P_SetMobjState (thing, S_GIBS); // villsa [STRIFE] TODO - update proper gib state + // villsa [STRIFE] do something with the player + if(thing->player && thing->subsector->sector->specialdata) + { + nofit = true; + return false; + } + //P_SetMobjState (thing, S_GIBS); // villsa [STRIFE] unused + A_BodyParts(thing); // villsa [STRIFE] spit out meat/junk stuff thing->flags &= ~MF_SOLID; thing->height = 0; thing->radius = 0; @@ -1454,10 +1511,10 @@ boolean PIT_ChangeSector (mobj_t* thing) if (crushchange && !(leveltime&3) ) { + S_StartSound(thing, sfx_pcrush); // villsa [STRIFE] P_DamageMobj(thing,NULL,NULL,10); // spray blood in a random direction - // villsa [STRIFE] TODO - verify mo = P_SpawnMobj (thing->x, thing->y, thing->z + thing->height/2, MT_BLOOD_DEATH); diff --git a/src/strife/p_mobj.c b/src/strife/p_mobj.c index 79f6398d..3c9d1a69 100644 --- a/src/strife/p_mobj.c +++ b/src/strife/p_mobj.c @@ -961,18 +961,13 @@ P_SpawnPuff th->momz = FRACUNIT; th->tics -= P_Random()&3; - // villsa [STRIFE] TODO - verify and update - /*if(shootdist == (80*FRACUNIT)) - P_SetMobjState(th, S_POW2_00);*/ + // don't make punches spark on the wall + if(attackrange == MELEERANGE) + P_SetMobjState(th, S_POW2_00); // villsa [STRIFE] unused /*if (th->tics < 1) th->tics = 1;*/ - - // don't make punches spark on the wall - // villsa [STRIFE] TODO - proper puff state - //if (attackrange == MELEERANGE) - //P_SetMobjState (th, S_PUFF3); } // diff --git a/src/strife/p_pspr.c b/src/strife/p_pspr.c index 658b7190..6e2ccfad 100644 --- a/src/strife/p_pspr.c +++ b/src/strife/p_pspr.c @@ -562,9 +562,9 @@ void A_FireGrenade(player_t* player, pspdef_t* pspr) st2 = &states[weaponinfo[player->readyweapon].atkstate]; P_SetPsprite(player, ps_flash, st1 - st2); - player->mo->z += (32*FRACUNIT); // ugh + player->mo->z += MAXRADIUS; // ugh mo = P_SpawnMortar(player->mo, type); - player->mo->z -= (32*FRACUNIT); // ugh + player->mo->z -= MAXRADIUS; // ugh // change momz based on player's pitch mo->momz = FixedMul((player->pitch<<FRACBITS) / 160, mo->info->speed) + (8*FRACUNIT); diff --git a/src/strife/r_segs.c b/src/strife/r_segs.c index d6e5e156..bd655654 100644 --- a/src/strife/r_segs.c +++ b/src/strife/r_segs.c @@ -158,6 +158,14 @@ R_RenderMaskedSegRange if (fixedcolormap) dc_colormap = fixedcolormap; + + // villsa [STRIFE] render as transparent (25% or 75%?) + if(curline->linedef->flags & ML_TRANSPARENT1) + colfunc = fuzzcolfunc; + + // villsa [STRIFE] render as transparent (25% or 75%?) + if(curline->linedef->flags & ML_TRANSPARENT2) + colfunc = R_DrawMVisTLColumn; // draw the columns for (dc_x = x1 ; dc_x <= x2 ; dc_x++) @@ -188,6 +196,8 @@ R_RenderMaskedSegRange } spryscale += rw_scalestep; } + + colfunc = basecolfunc; // villsa [STRIFE] reset draw routines } |