Changeset 3241
- Timestamp:
- 02/02/10 21:33:15 (7 months ago)
- Location:
- trunk
- Files:
-
- 10 modified
-
lua/gui/gui.chat.lua (modified) (1 diff)
-
lua/lib.compass.lua (modified) (2 diffs)
-
lua/lib.macrolist.lua (modified) (1 diff)
-
lua/net/net.cursor.lua (modified) (1 diff)
-
lua/net/net.mobile.lua (modified) (2 diffs)
-
lua/net/net.objectpicker.lua (modified) (2 diffs)
-
lua/net/net.partysystem.lua (modified) (1 diff)
-
lua/net/net.uoam.lua (modified) (2 diffs)
-
lua/net/net.walk.lua (modified) (6 diffs)
-
premake.lua (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lua/gui/gui.chat.lua
r3179 r3241 110 110 if (channel.class_ok) then for k,v in pairs(channel.class_ok) do if (src == v) then bMatch = true break end end end 111 111 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 end112 if (channel.bNormalChat and src == "normal" and serial ~= 0xFFFFFFFF and serial ~= 0 and clilocid == nil and name ~= "System") then bMatch = true end 113 113 if (bMatch) then self:AddLineToChannel(channel,line2,color) end 114 114 end -
trunk/lua/lib.compass.lua
r3224 r3241 574 574 575 575 if gbCompassShowMobiles then 576 -- update dots 576 -- update dots 577 local dots = {} 577 578 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 579 608 580 609 local mygfx = gIrisCompassDialog.mapdot.gfx 581 610 mygfx:RenderableBegin(4 * count,6 * count,true,false,OT_TRIANGLE_LIST) 582 583 611 local halfwidth = 3 584 585 612 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) 593 616 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) 594 617 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) … … 597 620 mygfx:RenderableIndex3(index+0,index+1,index+2) 598 621 mygfx:RenderableIndex3(index+1,index+3,index+2) 599 600 622 index = index + 4 601 623 end 602 -- show marked spots603 for k,mark in pairs(gPositionMarkers[gCompassMapIndex] or {}) do604 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 + 4615 end616 617 624 mygfx:RenderableEnd() 618 625 -
trunk/lua/lib.macrolist.lua
r3240 r3241 1072 1072 end 1073 1073 1074 function MacroCmd_WalkInDir (iDir,bRunFlag ) ExecWalkRequestIfPossible(iDir,bRunFlag) end1074 function MacroCmd_WalkInDir (iDir,bRunFlag,bTrySides) WalkStep_WalkInDir(iDir,bRunFlag,bTrySides) end 1075 1075 1076 1076 -- run from a job (uses wait) !!!! -
trunk/lua/net/net.cursor.lua
r3240 r3241 53 53 -- Send Targetcursor (0x6c) 54 54 function 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)) 56 56 --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) 57 57 -
trunk/lua/net/net.mobile.lua
r3240 r3241 184 184 stats.mobstatversion = MySave_PopNetUint8() 185 185 186 print("stats.mobstatversion",hex(stats.mobstatversion))186 --~ print("stats.mobstatversion",hex(stats.mobstatversion)) 187 187 188 188 -- mobstatversion : http://docs.polserver.com/packets/index.php?Packet=0x11 … … 250 250 end 251 251 252 if (iBytesLeft == 2 and gPolServer) then stats.unknown_pol = MySave_PopNetUint16() end -- avoid annoying warning in console 252 253 --printf("NET : kPacket_Mobile_Stats mobile=0x%08x name=%s\n",mobileserial,stats.name) 253 254 -
trunk/lua/net/net.objectpicker.lua
r3237 r3241 52 52 data.entrynum = input:PopNetUint8() 53 53 sizeleft = sizeleft - 1 54 print("kPacket_Object_Picker",SmartDump(data))54 --~ print("kPacket_Object_Picker",SmartDump(data)) 55 55 data.entrylist = {} 56 56 for i = 1,data.entrynum do … … 73 73 74 74 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)) 76 76 table.insert(data.entrylist,entry) 77 77 end -
trunk/lua/net/net.partysystem.lua
r3240 r3241 30 30 gPartyMemberPosList = {} -- Hook_PartyPos -- {[serial]={serial=?,xloc=?,yloc=?,facet=?},...} , 0xF0 packet, protocol extension 31 31 RegisterListener("Hook_PartyPos", function (partyposlist) gPartyMemberPosList = partyposlist end) 32 33 function PartySystem_GetMemberPosList () return gPartyMemberPosList end -- key=serial,val=pos{xloc=?,yloc=?,facet=?} 32 34 33 35 -- can see party members not in sightrange using 0xF0 packet -
trunk/lua/net/net.uoam.lua
r3179 r3241 64 64 return kUOAM_Facet.felu 65 65 end 66 67 66 68 67 function UOAM_Start (name,pass,server,port) … … 262 261 end 263 262 function 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) 265 266 UOAM_TrafficStep() 266 267 end -
trunk/lua/net/net.walk.lua
r3233 r3241 211 211 if (not WalkQueueOkForNextSend()) then 212 212 if (Client_GetTicks() > gWalkRequestAntiStuckTimeout) then 213 print("++++++++++++++++++++++++++++++ walk:walk-request-timeout,sending resync-request")213 --~ print("++++++++++++++++++++++++++++++ walk:walk-request-timeout,sending resync-request") 214 214 Send_Movement_Resync_Request() 215 215 else … … 283 283 out:PushNetUint32(iFastKey) 284 284 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))) 286 286 end 287 287 … … 292 292 local id = input:PopNetUint8() 293 293 local iSeqNum = input:PopNetUint8() 294 print("++++++++++++++++++++++++++++++ walk:accept",iSeqNum)294 --~ print("++++++++++++++++++++++++++++++ walk:accept",iSeqNum) 295 295 local player_notoriety = input:PopNetUint8() 296 296 local playermobile = GetPlayerMobile() … … 317 317 function ResetWalkQueue () 318 318 --~ WalkLog("ResetWalkQueue start") 319 print("ResetWalkQueue,gNextWalkSequenceNumber=0")320 print(_TRACEBACK())319 --~ print("ResetWalkQueue,gNextWalkSequenceNumber=0") 320 --~ print(_TRACEBACK()) 321 321 gNextWalkSequenceNumber = 0 322 322 gWalkRequests = {} … … 368 368 out:PushNetUint8(hex2num("0x00")) 369 369 out:SendPacket() 370 print("++++++++++++++++++++++++++++++ Send_Accept_Block_Movement",seqnumber)370 --~ print("++++++++++++++++++++++++++++++ Send_Accept_Block_Movement",seqnumber) 371 371 end 372 372 … … 387 387 out:PushNetUint8(0) 388 388 out:SendPacket() 389 print("++++++++++++++++++++++++++++++ Send_Movement_Resync_Request,0,0")389 --~ print("++++++++++++++++++++++++++++++ Send_Movement_Resync_Request,0,0") 390 390 end 391 391 -
trunk/premake.lua
r3238 r3241 55 55 if (options["nosound"]) then gLugreUseOpenAlSoft = false gbUseSoundOpenAl = false gbUseSoundFmod = false print(">>> nosound") end 56 56 if (options["soundfmodonly"]) then gLugreUseOpenAlSoft = false gbUseSoundOpenAl = false gbUseSoundFmod = true print(">>> soundfmodonly") end 57 if (options["soundopenalonly"]) then gLugreUseOpenAlSoft = false gbUseSoundOpenAl =true gbUseSoundFmod = false print(">>> soundopenalonly") end 57 58 58 59 gLugreDir = "lugre"
