Znalazlem ostatnio pewien ciekawy komentarz w ktorym niejaki igor pisal o wyjatkowo ciekawym usprawnieniu moda CT MailMod:
Cytuj:
Apply the patch below to make CT_MailMod _much_ faster (2-5x as fast) and also not screw up when you are lagged like it does now.
--- CT_MailMod.lua.orig 2009-04-22 19:46:17.-509811200 -0700
+++ CT_MailMod.lua 2005-07-08 19:39:34.500000000 -0700
@@ -309,6 +309,8 @@
subjectstr = subjectstr .. "[" .. name .. "]";
end
+ this.bag = val.bag;
+ this.item = val.item;
SendMail(val.to, subjectstr, format(CT_MAIL_ITEMNUM, key, this.total));
end
@@ -334,24 +336,20 @@
end
function CT_Mail_ProcessQueue(elapsed)
- this.update = this.update - elapsed;
- this.sendmail = this.sendmail + elapsed;
- if ( this.update < 0 ) then
- local bandwidthIn, bandwidthOut, latency = GetNetStats()
- this.latency = latency/100;
- if ( this.latency < 3.5 ) then
- this.latency = 3.5;
- elseif ( this.latency > 6 ) then
- this.latency = 6;
+ if ( this.bag ~= nil and this.item ~= nil ) then
+ if ( GetContainerItemInfo(this.bag, this.item) == nil ) then
+ this.bag = nil;
+ this.item = nil;
end
- this.update = 0.5;
end
- if ( this.sendmail > this.latency ) then
- this.sendmail = 0;
- if ( this.total > 0 ) then
- CT_Mail_SendMail();
- end
+
+ if ( this.total == 0 ) then
+ return;
end
+
+ if ( this.bag == nil and this.item == nil ) then
+ CT_Mail_SendMail();
+ end
end
local CT_oldMM_CF_U = ContainerFrame_Update
Czy ktos z Was to zna? probowal zastosowac ?