From 4bd14e742436ff804ec6f4fc95c61aec3fcaf1ec Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 31 Aug 2015 17:48:52 +0200 Subject: [PATCH] Revert commit that removed useful parameter for plugins that made backwards-incompatible changes Revert "@PEMapModder Removed redundant parameters for Living::knockBack. Closes #3427." This reverts commit 9adcc19154e1a448ff5ff894a9ff804f17b066f1. --- src/pocketmine/entity/Living.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index d336fae22..4bfe52ccf 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -132,18 +132,7 @@ abstract class Living extends Entity implements Damageable{ $this->attackTime = 10; //0.5 seconds cooldown } - /** - * Note: Variadic function is used to preserve BC - * @param int $x - * @param int $z - * @param float $base Default 0.4 - */ - public function knockBack($x, $z, $base = 0.4){ - if(func_num_args() >= 4){ - $args = func_get_args(); - list(, , $x, $z) = $args; - $base = isset($args[4]) ? $args[4] : 0.4; - } + public function knockBack(Entity $attacker, $damage, $x, $z, $base = 0.4){ $f = sqrt($x * $x + $z * $z); if($f <= 0){ return;