ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.34 by elmex, Tue Jun 13 14:35:17 2006 UTC vs.
Revision 1.36 by root, Thu Jun 15 15:33:58 2006 UTC

132sub feed_map1a { 132sub feed_map1a {
133 my ($self, $data) = @_; 133 my ($self, $data) = @_;
134 134
135 $self->{map}->map1a_update ($data); 135 $self->{map}->map1a_update ($data);
136 $self->{map_widget}->update; 136 $self->{map_widget}->update;
137}
138
139sub magicmap {
140 my ($self, $w, $h, $x, $y, $data) = @_;
141
142 $self->{map_widget}->set_magicmap ($w, $h, $x, $y, $data);
137} 143}
138 144
139sub flush_map { 145sub flush_map {
140 my ($self) = @_; 146 my ($self) = @_;
141 147
306 # I love transactions 312 # I love transactions
307 for (1..100) { 313 for (1..100) {
308 my $txn = $CFClient::DB_ENV->txn_begin; 314 my $txn = $CFClient::DB_ENV->txn_begin;
309 my $status = $self->{facemap}->db_get (id => $id); 315 my $status = $self->{facemap}->db_get (id => $id);
310 if ($status == 0 || $status == BerkeleyDB::DB_NOTFOUND) { 316 if ($status == 0 || $status == BerkeleyDB::DB_NOTFOUND) {
311 $id = ($id || 16) + 1; 317 $id = ($id || 64) + 1;
312 if ($self->{facemap}->put (id => $id) == 0 318 if ($self->{facemap}->put (id => $id) == 0
313 && $self->{facemap}->put ($hash => $id) == 0) { 319 && $self->{facemap}->put ($hash => $id) == 0) {
314 $txn->txn_commit; 320 $txn->txn_commit;
315 321
316 goto gotid; 322 goto gotid;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines