Skip to content
Extraits de code Groupes Projets
Valider cf3a1bf4 rédigé par ElTata's avatar ElTata :ok_hand:
Parcourir les fichiers

fixed bug

players did not move, fixed
parent 95d76835
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -207,8 +207,7 @@ sub moveplayers { ...@@ -207,8 +207,7 @@ sub moveplayers {
my @who_fought = (); my @who_fought = ();
for my $player (keys(%$rps)) { for my $player (keys(%$rps)) {
next unless ($rps->{$player}{online}); next unless ($rps->{$player}{online});
next if (!$questers[0] || grep { $player eq $_ } @questers); next if (@questers && grep { $player eq $_ } @questers);
#if (@questers) {next if (grep { $player eq $_ } @questers)};
$rps->{$player}{x} += int(rand(3))-1; $rps->{$player}{x} += int(rand(3))-1;
$rps->{$player}{y} += int(rand(3))-1; $rps->{$player}{y} += int(rand(3))-1;
# if player goes over edge, wrap them back around # if player goes over edge, wrap them back around
...@@ -238,7 +237,7 @@ sub moveplayers { ...@@ -238,7 +237,7 @@ sub moveplayers {
# at the last move, evil users who has not fought # at the last move, evil users who has not fought
# chase near players # chase near players
if ($i == $opts->{self_clock}-1 if ($i == $opts->{self_clock}-1
&& $rps->{$player}{alignment} == 'Evil' && $rps->{$player}{alignment} eq 'Evil'
&& !(grep { $player eq $_ } @who_fought)) { && !(grep { $player eq $_ } @who_fought)) {
evilchase($player, \%positions); evilchase($player, \%positions);
} }
......
...@@ -146,7 +146,7 @@ sub questpencheck { ...@@ -146,7 +146,7 @@ sub questpencheck {
} }
sub movequesters { sub movequesters {
return undef unless ($quest{type} == 2 && @{$quest{questers}}); return () unless ($quest{type} == 2 && @{$quest{questers}});
my $allgo = 1; # have all users reached <p1|p2>? my $allgo = 1; # have all users reached <p1|p2>?
for (@{$quest{questers}}) { for (@{$quest{questers}}) {
if ($quest{stage}==1) { if ($quest{stage}==1) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter