ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/bin/cfmap-tagify
(Generate patch)

Comparing deliantra/Deliantra/bin/cfmap-tagify (file contents):
Revision 1.2 by root, Sun Sep 16 20:29:43 2007 UTC vs.
Revision 1.3 by root, Mon Sep 17 16:39:02 2007 UTC

122while (defined (my $path = do { local $/ = "\x00"; <$fh> })) { 122while (defined (my $path = do { local $/ = "\x00"; <$fh> })) {
123 chop $path; 123 chop $path;
124 my $map = $map{$path}; 124 my $map = $map{$path};
125 125
126 for my $fx (0 .. $map->{info}{width} - 1) { 126 for my $fx (0 .. $map->{info}{width} - 1) {
127 for my $fy (0 .. $map->{info}{width} - 1) { 127 for my $fy (0 .. $map->{info}{height} - 1) {
128 my $space = $map->{map}[$fx][$fy] 128 my $space = $map->{map}[$fx][$fy]
129 or next; 129 or next;
130 130
131 for my $o (@$space) { 131 for my $o (@$space) {
132 my $a = $Crossfire::ARCH{$o->{_name}} 132 my $a = $Crossfire::ARCH{$o->{_name}}
133 or next; 133 or next;
134 134
135 if ($is_exit{$o->{type} || $a->{type}}) { 135 if ($is_exit{$o->{type} || $a->{type}}) {
136 my ($exit, $x, $y) = ($o->{slaying}, $o->{hp}, $o->{sp}); 136 my ($exit, $x, $y) = ($o->{slaying}, $o->{hp}, $o->{sp});
137 if ($exit =~ /^[\/0-9a-zA-Z]/ && $exit ne "/!") { 137 if ($exit =~ /^[\/0-9a-zA-Z\.]/ && $exit ne "/!") {
138 $exit = expand $exit, $path; 138 $exit = expand $exit, $path;
139 if ($exit ne $path && ($target{$path} || $target{$exit} || 0)) { 139 if ($exit ne $path && ($target{$path} || $target{$exit} || 0)) {
140 if (my $tag = patch_exit $path, $fx, $fy, $exit, $x, $y) { 140 if (my $tag = patch_exit $path, $fx, $fy, $exit, $x, $y) {
141 delete $o->{sp}; 141 delete $o->{sp};
142 delete $o->{hp}; 142 delete $o->{hp};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines