shithub: choc

Download patch

ref: 2ca389a5e23bb45ac5fcc093776a51a1f1fbeb47
parent: 6528c14df3fa13bd3d5aed1e715205975b724f14
author: Samuel Villareal <[email protected]>
date: Sun Sep 19 14:03:38 EDT 2010

+ Renaming MF_INCOMBAT to MF_NODIALOG

Subversion-branch: /branches/strife-branch
Subversion-revision: 2116

--- a/src/strife/info.c
+++ b/src/strife/info.c
@@ -1745,7 +1745,7 @@
         10000,      //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SHOOTABLE|MF_NOSECTOR|MF_INCOMBAT,       //flags
+        MF_SHOOTABLE|MF_NOSECTOR|MF_NODIALOG,       //flags
         NULL,       //namepointer
     },
 
@@ -2755,7 +2755,7 @@
         50000,      //mass
         0,      //damage
         sfx_chant,      //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL,      //flags
+        MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL,      //flags
         NULL,       //namepointer
     },
 
@@ -3160,7 +3160,7 @@
         500,        //mass
         0,      //damage
         sfx_revact,     //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL,      //flags
+        MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL,      //flags
         NULL,       //namepointer
     },
 
@@ -3458,7 +3458,7 @@
         400,        //mass
         0,      //damage
         sfx_rb2act,     //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL,      //flags
+        MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL,      //flags
         NULL,       //namepointer
     },
 
@@ -3485,7 +3485,7 @@
         500,        //mass
         0,      //damage
         sfx_rb2act,     //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL
+        MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL
         |MF_NOTDMATCH,       //flags
         NULL,       //namepointer
     },
@@ -3541,7 +3541,7 @@
         0,      //damage
         sfx_tend,       //activesound
         MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST|MF_FLOAT
-        |MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL|MF_NOTDMATCH,       //flags
+        |MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL|MF_NOTDMATCH,       //flags
         "PRIEST",       //namepointer
     },
 
@@ -3569,7 +3569,7 @@
         0,      //damage
         sfx_alnact,     //activesound
         MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
+        |MF_FLOAT|MF_NODIALOG|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
         |MF_MVIS|MF_SPECTRAL,        //flags
         NULL,       //namepointer
     },
@@ -3652,7 +3652,7 @@
         0,      //damage
         sfx_alnact,     //activesound
         MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
+        |MF_FLOAT|MF_NODIALOG|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
         |MF_MVIS|MF_SPECTRAL,        //flags
         NULL,       //namepointer
     },
@@ -3681,7 +3681,7 @@
         0,      //damage
         sfx_alnact,     //activesound
         MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
+        |MF_FLOAT|MF_NODIALOG|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
         |MF_MVIS|MF_SPECTRAL,        //flags
         NULL,       //namepointer
     },
@@ -3710,7 +3710,7 @@
         0,      //damage
         sfx_alnact,     //activesound
         MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
+        |MF_FLOAT|MF_NODIALOG|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
         |MF_MVIS|MF_SPECTRAL,        //flags
         NULL,       //namepointer
     },
@@ -3739,7 +3739,7 @@
         0,      //damage
         sfx_alnact,     //activesound
         MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
+        |MF_FLOAT|MF_NODIALOG|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
         |MF_MVIS|MF_SPECTRAL,        //flags
         NULL,       //namepointer
     },
@@ -3768,7 +3768,7 @@
         0,      //damage
         sfx_alnact,     //activesound
         MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
+        |MF_FLOAT|MF_NODIALOG|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
         |MF_MVIS|MF_SPECTRAL,        //flags
         NULL,       //namepointer
     },
@@ -3797,7 +3797,7 @@
         0,      //damage
         sfx_alnact,     //activesound
         MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
+        |MF_FLOAT|MF_NODIALOG|MF_SHADOW|MF_COUNTKILL|MF_NOTDMATCH
         |MF_MVIS|MF_SPECTRAL,        //flags
         NULL,       //namepointer
     },
@@ -4231,7 +4231,7 @@
         0,      //damage
         sfx_sntact,     //activesound
         MF_SOLID|MF_SHOOTABLE|MF_SPAWNCEILING|MF_NOGRAVITY|MF_GIVEQUEST
-        |MF_FLOAT|MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL,      //flags
+        |MF_FLOAT|MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL,      //flags
         NULL,       //namepointer
     },
 
@@ -4259,7 +4259,7 @@
         0,      //damage
         sfx_spisit,     //activesound
         MF_SOLID|MF_SHOOTABLE|MF_SPAWNCEILING|MF_NOGRAVITY|MF_DROPOFF
-        |MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL,       //flags
+        |MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL,       //flags
         NULL,       //namepointer
     },
 
@@ -5098,7 +5098,7 @@
         10000000,       //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_GIVEQUEST|MF_INCOMBAT|MF_NOBLOOD,      //flags
+        MF_SOLID|MF_SHOOTABLE|MF_GIVEQUEST|MF_NODIALOG|MF_NOBLOOD,      //flags
         NULL,       //namepointer
     },
 
@@ -5125,7 +5125,7 @@
         100000,     //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_GIVEQUEST|MF_INCOMBAT|MF_NOBLOOD,      //flags
+        MF_SOLID|MF_SHOOTABLE|MF_GIVEQUEST|MF_NODIALOG|MF_NOBLOOD,      //flags
         NULL,       //namepointer
     },
 
@@ -5233,7 +5233,7 @@
         10,     //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD,        //flags
+        MF_SPECIAL|MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD,        //flags
         "Degnin_Ore",       //namepointer
     },
 
@@ -7231,7 +7231,7 @@
         100,        //mass
         0,      //damage
         sfx_ratact,     //activesound
-        MF_INCOMBAT|MF_NOBLOOD|MF_COUNTKILL,        //flags
+        MF_NODIALOG|MF_NOBLOOD|MF_COUNTKILL,        //flags
         "rat_buddy",        //namepointer
     },
 
@@ -7258,7 +7258,7 @@
         100,        //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD,       //flags
+        MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD,       //flags
         NULL,       //namepointer
     },
 
@@ -7285,7 +7285,7 @@
         100,        //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD,       //flags
+        MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD,       //flags
         NULL,       //namepointer
     },
 
@@ -7312,7 +7312,7 @@
         9999999,        //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_INCOMBAT|MF_NOBLOOD,       //flags
+        MF_SOLID|MF_SHOOTABLE|MF_NODIALOG|MF_NOBLOOD,       //flags
         NULL,       //namepointer
     },
 
@@ -9553,7 +9553,7 @@
         999999,     //mass
         0,      //damage
         sfx_None,       //activesound
-        MF_SOLID|MF_SHOOTABLE|MF_GIVEQUEST|MF_INCOMBAT|MF_DROPPED
+        MF_SOLID|MF_SHOOTABLE|MF_GIVEQUEST|MF_NODIALOG|MF_DROPPED
         |MF_NOBLOOD|MF_NOTDMATCH,        //flags
         NULL,       //namepointer
     },
--- a/src/strife/p_dialog.c
+++ b/src/strife/p_dialog.c
@@ -1080,7 +1080,7 @@
 
     // Dismiss the dialog if the player is out of alignment, or the thing he was
     // talking to is now engaged in battle.
-    if(angle > ANG45 && angle < (ANG270+ANG45) || dialogtalker->flags & MF_INCOMBAT)
+    if(angle > ANG45 && angle < (ANG270+ANG45) || dialogtalker->flags & MF_NODIALOG)
         P_DialogDoChoice(dialogmenu.numitems - 1);
 
     dialogtalker->reactiontime = 2;
@@ -1283,7 +1283,7 @@
        return;
 
     // already in combat, can't talk to it
-    if(linetarget->flags & MF_INCOMBAT)
+    if(linetarget->flags & MF_NODIALOG)
        return;
 
     // set pointer to the character talking
--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -190,7 +190,7 @@
 //
 static void P_WakeUpThing(mobj_t* puncher, mobj_t* bystander)
 {
-    if(!(bystander->flags & MF_INCOMBAT))
+    if(!(bystander->flags & MF_NODIALOG))
     {
         bystander->target = puncher;
         if(bystander->info->seesound)
@@ -219,7 +219,7 @@
       return;
       
    // has to be something you can wake up and kill too
-   if(!(punchee->flags & MF_COUNTKILL) || punchee->flags & MF_INCOMBAT)
+   if(!(punchee->flags & MF_COUNTKILL) || punchee->flags & MF_NODIALOG)
       return;
    
    // make the punchee hurt - haleyjd 09/05/10: Fixed to use painstate.
@@ -236,7 +236,7 @@
          (P_CheckSight(rover, puncher) || P_CheckSight(rover, punchee)))
       {
          P_WakeUpThing(puncher, rover);
-         rover->flags |= MF_INCOMBAT;
+         rover->flags |= MF_NODIALOG;
       }
    }
 
@@ -248,7 +248,7 @@
          (P_CheckSight(rover, puncher) || P_CheckSight(rover, punchee)))
       {
          P_WakeUpThing(puncher, rover);
-         rover->flags |= MF_INCOMBAT;
+         rover->flags |= MF_NODIALOG;
       }
    }
 }
@@ -961,7 +961,7 @@
             if(P_LookForPlayers(actor, actor->flags & MF_GIVEQUEST))
             {
                 P_SetMobjState(actor, actor->info->seestate);
-                actor->flags |= MF_INCOMBAT;
+                actor->flags |= MF_NODIALOG;
                 return;
             }
         }
@@ -1106,7 +1106,7 @@
         P_SetMobjState (actor, actor->info->missilestate);
 
         // [STRIFE] Add INCOMBAT flag to disable dialog
-        actor->flags |= (MF_INCOMBAT|MF_JUSTATTACKED);
+        actor->flags |= (MF_NODIALOG|MF_JUSTATTACKED);
         return;
     }
 
@@ -2290,7 +2290,7 @@
 {
     // Set INCOMBAT, because you probably wouldn't feel like talking either
     // if somebody just stabbed you in the gut with a punch dagger...
-    actor->flags |= MF_INCOMBAT;
+    actor->flags |= MF_NODIALOG;
 
     if(!(P_Random() % 5))
     {
@@ -2311,7 +2311,7 @@
 void A_Fall (mobj_t *actor)
 {
     // villsa [STRIFE] set incombat flag to stop dialog
-    actor->flags |= MF_INCOMBAT;
+    actor->flags |= MF_NODIALOG;
 
     // actor is on ground, it can be walked over
     // villsa [STRIFE] remove nogravity/shadow flags as well
@@ -3162,7 +3162,7 @@
     actor->flags &= ~MF_SOLID;
 
     // set color and flags
-    mobj->flags |= ((actor->miscdata << MF_TRANSSHIFT) | MF_INCOMBAT);
+    mobj->flags |= ((actor->miscdata << MF_TRANSSHIFT) | MF_NODIALOG);
     mobj->target = NULL;
 
     // double Rebel's health in deathmatch mode
--- a/src/strife/p_mobj.h
+++ b/src/strife/p_mobj.h
@@ -168,8 +168,8 @@
     // For active floaters, e.g. cacodemons, pain elementals.
     MF_FLOAT            = 0x4000,
 
-    // villsa [STRIFE] is mobj in combat?
-    MF_INCOMBAT         = 0x8000,
+    // villsa [STRIFE] can NPC talk?
+    MF_NODIALOG         = 0x8000,
 
     // Don't hit same species, explode on block.
     // Player missiles as well as fireballs of various kinds.