Changeset 178 for trunk/src/game/Unit.h

Show
Ignore:
Timestamp:
11/19/08 13:43:40 (17 years ago)
Author:
yumileroy
Message:

[svn] Rewrite canSeeOrDetect function.
Minor change on trigger creatures.
Remove some unused hacks in scripts.

Original author: megamage
Date: 2008-11-06 10:27:58-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Unit.h

    r174 r178  
    438438    VISIBILITY_ON                 = 1, 
    439439    VISIBILITY_GROUP_STEALTH      = 2,                      // detect chance, seen and can see group members 
    440     VISIBILITY_GROUP_INVISIBILITY = 3,                      // invisibility, can see and can be seen only another invisible unit or invisible detection unit, set only if not stealthed, and in checks not used (mask used instead) 
    441     VISIBILITY_GROUP_NO_DETECT    = 4,                      // state just at stealth apply for update Grid state. Don't remove, otherwise stealth spells will break 
     440    //VISIBILITY_GROUP_INVISIBILITY = 3,                      // invisibility, can see and can be seen only another invisible unit or invisible detection unit, set only if not stealthed, and in checks not used (mask used instead) 
     441    //VISIBILITY_GROUP_NO_DETECT    = 4,                      // state just at stealth apply for update Grid state. Don't remove, otherwise stealth spells will break 
    442442    VISIBILITY_RESPAWN            = 5                       // special totally not detectable visibility for force delete object at respawn command 
    443443}; 
     
    11361136 
    11371137        // common function for visibility checks for player/creatures with detection code 
     1138        virtual bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList) const; 
    11381139        bool isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList = false) const; 
    11391140        bool canDetectInvisibilityOf(Unit const* u) const; 
     1141        bool canDetectStealthOf(Unit const* u, float distance) const; 
    11401142 
    11411143        // virtual functions for all world objects types 
    11421144        bool isVisibleForInState(Player const* u, bool inVisibleList) const; 
    11431145        // function for low level grid visibility checks in player/creature cases 
    1144         virtual bool IsVisibleInGridForPlayer(Player* pl) const = 0; 
     1146        virtual bool IsVisibleInGridForPlayer(Player const* pl) const = 0; 
    11451147 
    11461148        bool waterbreath;