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

Comparing deliantra/server/lib/cf/mapscript.pm (file contents):
Revision 1.4 by root, Thu Jan 8 21:35:54 2009 UTC vs.
Revision 1.7 by root, Tue Nov 3 23:44:21 2009 UTC

1#! perl 1#! perl
2
3#
4# This file is part of Deliantra, the Roguelike Realtime MMORPG.
5#
6# Copyright (©) 2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
7#
8# Deliantra is free software: you can redistribute it and/or modify it under
9# the terms of the Affero GNU General Public License as published by the
10# Free Software Foundation, either version 3 of the License, or (at your
11# option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the Affero GNU General Public License
19# and the GNU General Public License along with this program. If not, see
20# <http://www.gnu.org/licenses/>.
21#
22# The authors can be reached via e-mail to <support@deliantra.net>
23#
2 24
3=head1 NAME 25=head1 NAME
4 26
5cf::mapscript 27cf::mapscript
6 28
20 42
21=cut 43=cut
22 44
23package safe::mapscript; 45package safe::mapscript;
24 46
25use strict qw(subs vars); 47use common::sense;
26 48
27=item $self 49=item $self
28 50
29The mapscript object itself 51The mapscript object itself.
30 52
31=item $state 53=item $state
32 54
33The state value (0 means release, <>0 means push/trigger/enable) that 55The state value (0 means release, <>0 means push/trigger/enable) that
34triggered the map script. 56triggered the map script.
78 100
79=cut 101=cut
80 102
81sub timer($$) { 103sub timer($$) {
82 my $ob = (&find)[0]; 104 my $ob = (&find)[0];
83 $ob->speed_left ($_[1] / -cf::TICK); 105 $ob->speed_left (-$_[1] / cf::TICK);
84 $ob->set_speed (1); 106 $ob->set_speed (1);
85} 107}
86 108
87package cf::mapscript; 109package cf::mapscript;
88 110

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines