ref: b335b29a98bf2f86fb66a385e913d5e013317e2a
parent: 04a3bc8c48b80f979de8f4983eaa7093ca9fa11e
author: Samuel Villareal <[email protected]>
date: Sat Sep 18 03:05:42 EDT 2010
+ Change in P_DamageMobj due to fluke with specrtal checks + P_TouchSpecialThing updated to damage toucher if special's flag is spectral Subversion-branch: /branches/strife-branch Subversion-revision: 2106
--- a/src/strife/p_inter.c
+++ b/src/strife/p_inter.c
@@ -412,9 +412,16 @@
// Dead thing touching.
// Can happen with a sliding player corpse.
- if (toucher->health <= 0)
+ if(toucher->health <= 0)
return;
+ // villsa [STRIFE] damage toucher if special has spectral flag
+ if(special->flags & MF_SPECTRAL)
+ {
+ P_DamageMobj(toucher, NULL, NULL, 5);
+ return;
+ }
+
// villsa [STRIFE]
pickupmsg[0] = 0;
@@ -961,38 +968,15 @@
// notes on projectile health:
// -2 == enemy spectral projectile
// -1 == player spectral projectile
- if(target->flags & MF_SPECTRAL) // target is spectral
- {
- // check for these specific actors
- // seems a bit redundant since they already got the spectral flag
- // to check for this stuff
- if(target->type == MT_RLEADER2
- || target->type == MT_ORACLE
- || target->type == MT_SPECTRE_C)
- {
- // don't do damage if player has no sigil type
- if(source->player->sigiltype < 1)
- return;
- }
- if(inflictor)
- {
- // only spectral inflictors can damage other spectral actors
- if(!(inflictor->flags & MF_SPECTRAL))
- return;
+ if(!(!inflictor ||
+ !(inflictor->flags & MF_SPECTRAL) ||
+ (target->type != MT_PLAYER || inflictor->health != -1) &&
+ (!(target->flags & MF_SPECTRAL) || inflictor->health != -2) &&
+ (target->type != MT_RLEADER2 && target->type != MT_ORACLE && target->type != MT_SPECTRE_C ||
+ (source->player->sigiltype) >= 1)))
+ return;
- if(inflictor->health == -2) // don't damage itself
- return;
- }
- }
-
- // villsa [STRIFE] handle player's spectral projectile
- if(target->type == MT_PLAYER) // target is a player
- {
- if(inflictor && inflictor->flags & MF_SPECTRAL && inflictor->health == -1)
- return; // don't damage itself
- }
-
// villsa [STRIFE] new checks for various actors
if(inflictor)
{
@@ -1277,6 +1261,5 @@
&& target->info->seestate != S_NULL)
P_SetMobjState (target, target->info->seestate);
}
-
}