Changeset 3241

Show
Ignore:
Timestamp:
02/02/10 21:33:15 (5 weeks ago)
Author:
ghoulsblade
Message:
uoam and partypositions visible in compass, premake option:soundopenalonly, chattabs:filtered some system stuff from chat, MacroCmd_WalkInDir bgugfix, removed some debug output
Location:
trunk
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/lua/gui/gui.chat.lua

    r3179 r3241  
    110110                if (channel.class_ok) then for k,v in pairs(channel.class_ok) do if (src == v) then bMatch = true break end end end 
    111111                if (channel.filter) then for k,v in pairs(channel.filter) do if (string.find(line2 ,"^"..v)) then bMatch = true break end end end 
    112                 if (channel.bNormalChat and src == "normal" and serial ~= 0xFFFFFFFF and clilocid == nil) then bMatch = true end 
     112                if (channel.bNormalChat and src == "normal" and serial ~= 0xFFFFFFFF and serial ~= 0 and clilocid == nil and name ~= "System") then bMatch = true end 
    113113                if (bMatch) then self:AddLineToChannel(channel,line2,color) end 
    114114        end 
  • trunk/lua/lib.compass.lua

    r3224 r3241  
    574574         
    575575        if gbCompassShowMobiles then 
    576             -- update dots 
     576                        -- update dots 
     577            local dots = {} 
    577578            local l = GetMobileList() 
    578             local count = countarr(l) + countarr(gPositionMarkers[gCompassMapIndex] or {}) 
     579            -- show mobiles 
     580            for k,mobile in pairs(l) do  
     581                local r,g,b = GetNotorietyColor(mobile.notoriety) 
     582                local a = 1 
     583                                table.insert(dots,{mobile.xloc, mobile.yloc,r,g,b,a}) 
     584                        end 
     585            -- show marked spots 
     586            for k,mark in pairs(gPositionMarkers[gCompassMapIndex] or {}) do  
     587                local xloc,yloc,r,g,b,a = unpack(mark) 
     588                                table.insert(dots,{xloc,yloc,r,g,b,a}) 
     589                        end 
     590                        -- show uoam positions 
     591                        local uoamPosList = UOAM_GetOtherPositions() 
     592                        for name,data in pairs(uoamPosList) do -- {xloc=?,yloc=?,bIsOnSameFacet=?} 
     593                                if (data.bIsOnSameFacet) then  
     594                                        local r,g,b,a = 0,0.5,0,1 
     595                                        table.insert(dots,{data.xloc,data.yloc,r,g,b,a}) 
     596                                end 
     597                        end 
     598                        -- show party positions 
     599                        for serial,pos in pairs(PartySystem_GetMemberPosList()) do  
     600                                if (pos.facet == MapGetMapIndex()) then  
     601                                        local r,g,b,a = 0,0.8,0,1 
     602                                        table.insert(dots,{pos.xloc,pos.yloc,r,g,b,a}) 
     603                                end 
     604                        end 
     605                         
     606                         
     607                        local count = #dots 
    579608             
    580609            local mygfx = gIrisCompassDialog.mapdot.gfx 
    581610            mygfx:RenderableBegin(4 * count,6 * count,true,false,OT_TRIANGLE_LIST) 
    582  
    583611            local halfwidth = 3 
    584              
    585612            local index = 0 
    586              
    587             -- show mobiles 
    588             for k,mobile in pairs(l) do  
    589                 local px,py = GetRelativeCompasUOPositionInPx(mobile.xloc, mobile.yloc) 
    590                 local r,g,b = GetNotorietyColor(mobile.notoriety) 
    591                 local a = 1 
    592                                  
     613            for k,dot in ipairs(dots) do  
     614                local xloc,yloc,r,g,b,a = unpack(dot) 
     615                local px,py = GetRelativeCompasUOPositionInPx(xloc,yloc) 
    593616                mygfx:RenderableVertex(((mx - halfwidth + px)/vw * 2.0 - 1.0),((my - halfwidth + py)/vh * (-2.0) + 1.0),z, 0,0, r,g,b,a) 
    594617                mygfx:RenderableVertex(((mx + halfwidth + px)/vw * 2.0 - 1.0),((my - halfwidth + py)/vh * (-2.0) + 1.0),z, 1,0, r,g,b,a) 
     
    597620                mygfx:RenderableIndex3(index+0,index+1,index+2) 
    598621                mygfx:RenderableIndex3(index+1,index+3,index+2) 
    599                  
    600622                index = index + 4 
    601623            end 
    602             -- show marked spots 
    603             for k,mark in pairs(gPositionMarkers[gCompassMapIndex] or {}) do  
    604                 local xloc,yloc,r,g,b,a = unpack(mark) 
    605                 local px,py = GetRelativeCompasUOPositionInPx(xloc, yloc) 
    606                  
    607                 mygfx:RenderableVertex(((mx - halfwidth + px)/vw * 2.0 - 1.0),((my - halfwidth + py)/vh * (-2.0) + 1.0),z, 0,0, r,g,b,a) 
    608                 mygfx:RenderableVertex(((mx + halfwidth + px)/vw * 2.0 - 1.0),((my - halfwidth + py)/vh * (-2.0) + 1.0),z, 1,0, r,g,b,a) 
    609                 mygfx:RenderableVertex(((mx - halfwidth + px)/vw * 2.0 - 1.0),((my + halfwidth + py)/vh * (-2.0) + 1.0),z, 0,1, r,g,b,a) 
    610                 mygfx:RenderableVertex(((mx + halfwidth + px)/vw * 2.0 - 1.0),((my + halfwidth + py)/vh * (-2.0) + 1.0),z, 1,1, r,g,b,a) 
    611                 mygfx:RenderableIndex3(index+0,index+1,index+2) 
    612                 mygfx:RenderableIndex3(index+1,index+3,index+2) 
    613                  
    614                 index = index + 4 
    615             end 
    616              
    617624            mygfx:RenderableEnd() 
    618625         
  • trunk/lua/lib.macrolist.lua

    r3240 r3241  
    10721072end 
    10731073 
    1074 function MacroCmd_WalkInDir     (iDir,bRunFlag) ExecWalkRequestIfPossible(iDir,bRunFlag) end 
     1074function MacroCmd_WalkInDir     (iDir,bRunFlag,bTrySides) WalkStep_WalkInDir(iDir,bRunFlag,bTrySides) end 
    10751075 
    10761076-- run from a job (uses wait) !!!!  
  • trunk/lua/net/net.cursor.lua

    r3240 r3241  
    5353-- Send Targetcursor (0x6c) 
    5454function Send_Target (bIsPos,flag,serial,x,y,z,model,bIsCancel) 
    55         print("Send_Target",bIsPos,hex(flag),hex(serial),x,y,z,hex(model)) 
     55        --~ print("Send_Target",bIsPos,hex(flag),hex(serial),x,y,z,hex(model)) 
    5656        --printf("NET: Send_Target: %d 0x%02x 0x%08x %d %d %d 0x%04x\n",bIsPos and 1 or 0,flag,serial,x or 0,y or 0,z or 0,model or 0) 
    5757         
  • trunk/lua/net/net.mobile.lua

    r3240 r3241  
    184184        stats.mobstatversion    = MySave_PopNetUint8() 
    185185         
    186         print("stats.mobstatversion",hex(stats.mobstatversion)) 
     186        --~ print("stats.mobstatversion",hex(stats.mobstatversion)) 
    187187         
    188188        -- mobstatversion : http://docs.polserver.com/packets/index.php?Packet=0x11 
     
    250250        end 
    251251 
     252        if (iBytesLeft == 2 and gPolServer) then stats.unknown_pol = MySave_PopNetUint16() end -- avoid annoying warning in console 
    252253        --printf("NET : kPacket_Mobile_Stats mobile=0x%08x name=%s\n",mobileserial,stats.name) 
    253254         
  • trunk/lua/net/net.objectpicker.lua

    r3237 r3241  
    5252        data.entrynum           = input:PopNetUint8() 
    5353        sizeleft = sizeleft - 1 
    54         print("kPacket_Object_Picker",SmartDump(data)) 
     54        --~ print("kPacket_Object_Picker",SmartDump(data)) 
    5555        data.entrylist = {} 
    5656        for i = 1,data.entrynum do 
     
    7373                 
    7474                if (entry.namelen > 0) then entry.name = input:PopFilledString(entry.namelen) end 
    75                 print("kPacket_Object_Picker entry",SmartDump(entry)) 
     75                --~ print("kPacket_Object_Picker entry",SmartDump(entry)) 
    7676                table.insert(data.entrylist,entry) 
    7777        end 
  • trunk/lua/net/net.partysystem.lua

    r3240 r3241  
    3030gPartyMemberPosList = {} -- Hook_PartyPos -- {[serial]={serial=?,xloc=?,yloc=?,facet=?},...}  , 0xF0 packet, protocol extension 
    3131RegisterListener("Hook_PartyPos", function (partyposlist) gPartyMemberPosList = partyposlist end) 
     32 
     33function PartySystem_GetMemberPosList () return gPartyMemberPosList end -- key=serial,val=pos{xloc=?,yloc=?,facet=?} 
    3234 
    3335-- can see party members not in sightrange using 0xF0 packet 
  • trunk/lua/net/net.uoam.lua

    r3179 r3241  
    6464        return kUOAM_Facet.felu 
    6565end 
    66  
    6766 
    6867function UOAM_Start (name,pass,server,port) 
     
    262261end 
    263262function UOAM_SendChat (text) 
    264         UOAM_PushChat(gUOAMSendFIFO,gUOAMName,gUOAMPass,text) 
     263        print("############################") 
     264        print("UOAM_SendChat","#"..tostring(text).."#") 
     265        UOAM_PushChat(gUOAMSendFIFO,gUOAMName,gUOAMPass,"    "..text) 
    265266        UOAM_TrafficStep() 
    266267end 
  • trunk/lua/net/net.walk.lua

    r3233 r3241  
    211211                if (not WalkQueueOkForNextSend()) then 
    212212                        if (Client_GetTicks() > gWalkRequestAntiStuckTimeout) then 
    213                                 print("++++++++++++++++++++++++++++++ walk:walk-request-timeout,sending resync-request") 
     213                                --~ print("++++++++++++++++++++++++++++++ walk:walk-request-timeout,sending resync-request") 
    214214                                Send_Movement_Resync_Request() 
    215215                        else 
     
    283283        out:PushNetUint32(iFastKey) 
    284284        out:SendPacket() 
    285         print("++++++++++++++++++++++++++++++ walk:request",sprintf("0x%04x",iFullDir),iSeqNum,WalkGetInterval(TestBit(iFullDir,kWalkFlag_Run))) 
     285        --~ print("++++++++++++++++++++++++++++++ walk:request",sprintf("0x%04x",iFullDir),iSeqNum,WalkGetInterval(TestBit(iFullDir,kWalkFlag_Run))) 
    286286end 
    287287 
     
    292292        local id = input:PopNetUint8() 
    293293        local iSeqNum = input:PopNetUint8() 
    294         print("++++++++++++++++++++++++++++++ walk:accept",iSeqNum) 
     294        --~ print("++++++++++++++++++++++++++++++ walk:accept",iSeqNum) 
    295295        local player_notoriety = input:PopNetUint8() 
    296296        local playermobile = GetPlayerMobile() 
     
    317317function ResetWalkQueue () 
    318318        --~ WalkLog("ResetWalkQueue start") 
    319         print("ResetWalkQueue,gNextWalkSequenceNumber=0") 
    320         print(_TRACEBACK()) 
     319        --~ print("ResetWalkQueue,gNextWalkSequenceNumber=0") 
     320        --~ print(_TRACEBACK()) 
    321321        gNextWalkSequenceNumber = 0 
    322322        gWalkRequests = {} 
     
    368368        out:PushNetUint8(hex2num("0x00")) 
    369369        out:SendPacket() 
    370         print("++++++++++++++++++++++++++++++ Send_Accept_Block_Movement",seqnumber) 
     370        --~ print("++++++++++++++++++++++++++++++ Send_Accept_Block_Movement",seqnumber) 
    371371end 
    372372 
     
    387387        out:PushNetUint8(0) 
    388388        out:SendPacket() 
    389         print("++++++++++++++++++++++++++++++ Send_Movement_Resync_Request,0,0") 
     389        --~ print("++++++++++++++++++++++++++++++ Send_Movement_Resync_Request,0,0") 
    390390end 
    391391 
  • trunk/premake.lua

    r3238 r3241  
    5555if (options["nosound"]) then            gLugreUseOpenAlSoft = false gbUseSoundOpenAl = false gbUseSoundFmod = false print(">>> nosound") end 
    5656if (options["soundfmodonly"]) then      gLugreUseOpenAlSoft = false gbUseSoundOpenAl = false gbUseSoundFmod = true  print(">>> soundfmodonly") end 
     57if (options["soundopenalonly"]) then    gLugreUseOpenAlSoft = false gbUseSoundOpenAl =true gbUseSoundFmod = false  print(">>> soundopenalonly") end 
    5758 
    5859gLugreDir = "lugre"