Pol  Revision:794
pol/los2.cpp
Go to the documentation of this file.
00001 /*
00002 History
00003 =======
00004 
00005 
00006 Notes
00007 =======
00008 
00009 */
00010 
00011 #include "../clib/stl_inc.h"
00012 
00013 #include "charactr.h"
00014 #include "los.h"
00015 namespace Pol {
00016   namespace Core {
00017     bool uo_has_los( const UObject& iatt, const UObject& itgt )
00018     {
00019       LosObj att( iatt );
00020       LosObj tgt( itgt );
00021 
00022       if ( iatt.isa( UObject::CLASS_CHARACTER ) )
00023       {
00024         const Character& chr = static_cast<const Character&>( iatt );
00025         if ( chr.ignores_line_of_sight() )
00026           return true;
00027       }
00028 
00029       return uo_has_los( att, tgt );
00030     }
00031 
00032     bool uo_has_los( const Character& iatt, const UObject& itgt )
00033     {
00034       LosObj att( iatt );
00035       LosObj tgt( itgt );
00036 
00037       if ( iatt.ignores_line_of_sight() )
00038         return true;
00039 
00040       return uo_has_los( att, tgt );
00041     }
00042   }
00043 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines