ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.583 by root, Mon Oct 29 23:12:37 2012 UTC vs.
Revision 1.584 by root, Tue Oct 30 17:07:50 2012 UTC

3503=cut 3503=cut
3504 3504
3505############################################################################# 3505#############################################################################
3506# the server's init and main functions 3506# the server's init and main functions
3507 3507
3508our %FACEHASH; # hash => idx, #d# HACK for http server
3509
3508sub load_facedata($) { 3510sub load_facedata($) {
3509 my ($path) = @_; 3511 my ($path) = @_;
3510 3512
3511 # HACK to clear player env face cache, we need some signal framework 3513 # HACK to clear player env face cache, we need some signal framework
3512 # for this (global event?) 3514 # for this (global event?)
3539 cf::face::set_visibility $idx, $info->{visibility}; 3541 cf::face::set_visibility $idx, $info->{visibility};
3540 cf::face::set_magicmap $idx, $info->{magicmap}; 3542 cf::face::set_magicmap $idx, $info->{magicmap};
3541 cf::face::set_data $idx, 0, $info->{data32}, $info->{hash32}; 3543 cf::face::set_data $idx, 0, $info->{data32}, $info->{hash32};
3542 cf::face::set_data $idx, 1, $info->{data64}, $info->{hash64}; 3544 cf::face::set_data $idx, 1, $info->{data64}, $info->{hash64};
3543 cf::face::set_data $idx, 2, $info->{glyph} , $info->{glyph} ; 3545 cf::face::set_data $idx, 2, $info->{glyph} , $info->{glyph} ;
3546 $FACEHASH{$info->{hash64}} = $idx;#d#
3544 3547
3545 cf::cede_to_tick; 3548 cf::cede_to_tick;
3546 } 3549 }
3547 3550
3548 while (my ($face, $info) = each %$faces) { 3551 while (my ($face, $info) = each %$faces) {
3582 my $idx = (cf::face::find $name) || cf::face::alloc $name; 3585 my $idx = (cf::face::find $name) || cf::face::alloc $name;
3583 3586
3584 cf::face::set_data $idx, 0, $info->{data}, $info->{hash}; 3587 cf::face::set_data $idx, 0, $info->{data}, $info->{hash};
3585 cf::face::set_type $idx, $type; 3588 cf::face::set_type $idx, $type;
3586 cf::face::set_meta $idx, $type & 1 ? undef : $info->{meta}; # preserve meta unless prepended already 3589 cf::face::set_meta $idx, $type & 1 ? undef : $info->{meta}; # preserve meta unless prepended already
3590 $FACEHASH{$info->{hash}} = $idx;#d#
3587 } else { 3591 } else {
3588# $RESOURCE{$name} = $info; # unused 3592# $RESOURCE{$name} = $info; # unused
3589 } 3593 }
3590 3594
3591 cf::cede_to_tick; 3595 cf::cede_to_tick;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines