Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (32 sloc) 678 Bytes
#Bring ball out on ball_half_court
MAP 'ball_half_court';
my($TEAM)=undef;
my($DEAD)=0;
HOOKS {
'mapChange' => sub {
$TEAM=undef;
ball::set_win(-1, -1);
},
'ballLost' => sub {
$TEAM=undef;
},
'goal' => sub {
my($e, $p)=@_;
ball::rollback_score($p->{'team'}) if($e->{'time'}<$DEAD);
$TEAM=undef;
},
'powerupPickup' => sub {
my($e, $p)=@_;
return unless($e->{'powerup'} eq 'Ball');
return unless($e->{'time'}>$DEAD);
if($TEAM) {
if($p->{'team'} != $TEAM) {
server::send('resetBallTeam', -1);
plus::spawn_here($p, 1235, 360, 'w');
plus::clear_spawn($p);
$DEAD=$e->{'time'}+3000;
}
}
$TEAM=$p->{'team'};
},
};
You can’t perform that action at this time.