Ignore:
Timestamp:
07/19/10 17:47:11 (22 months ago)
Author:
tolteque
Message:

o LOTATC

  • Add filtering in LUA, and add a parameter (isDetectable) in NEW_OBJECT frame
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lotatc_server/lotatc_luaServer.py

    r2088 r2118  
    429429      # items[5] -> coalition 
    430430      # items[6] -> groupName 
     431      # items[7] -> isDetectable 
    431432      objectId = int(items[1]) 
    432433      unitName = unicode(items[3], self.luaServer.lo_encoding) 
     
    453454          # Process found unit 
    454455          self.localObjectsDb[objectId].setGroupName( items[6]) 
     456          self.localObjectsDb[objectId].setDetectionFlag( items[7]) 
    455457          self.foundUnit[items[4]] = items[6] 
    456           readIndex = 7 
     458          readIndex = 8 
    457459                           
    458460                           
     
    550552    # Loop over the localObjectsDb to detect objects which are visible. 
    551553    for (key, thisObject) in self.localObjectsDb.iteritems(): 
     554      # ------------------------------------------------------------------------------------- 
     555      # Check if the object if detectable by Lotatc 
     556      if not thisObject.isDetectable(): 
     557        continue 
     558         
    552559      # ------------------------------------------------------------------------------------- 
    553560      # Check if object is catchable 
Note: See TracChangeset for help on using the changeset viewer.