[b43] canProject fix
Posted: Fri Nov 30, 2012 7:27 pm
The patch below (and attached) fixes a long-standing problem in the function "canProject". Uh, don't ask how this can currently be exploited 

Code: Select all
diff --git a/game/engines/default/engine/interface/ActorProject.lua b/game/engines/default/engine/interface/ActorProject.lua
index f1b7797..e7d7e8f 100644
--- a/game/engines/default/engine/interface/ActorProject.lua
+++ b/game/engines/default/engine/interface/ActorProject.lua
@@ -268,8 +268,8 @@ function _M:canProject(t, x, y)
return
end
- if stop_x == x and stop_y == y then return true, stop_x, stop_y, stop_x, stop_y end
- return false, stop_x, stop_y, stop_radius_x, stop_radius_y
+ local is_hit = stop_x == x and stop_y == y
+ return is_hit, stop_x, stop_y, stop_radius_x, stop_radius_y
end
--- Project damage to a distance using a moving projectile