Remove useless "== true" bits.

master^2
C Nelson 2013-06-08 13:03:09 -05:00
parent 4237bf2f9c
commit cd52408b9a
1 changed files with 3 additions and 3 deletions

View File

@ -273,7 +273,7 @@ function mobs:register_mob(name, def)
self.v_start = true
self.set_velocity(self, self.walk_velocity)
else
if self.jump == true and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
if self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
local v = self.object:getvelocity()
v.y = 5
self.object:setvelocity(v)
@ -306,7 +306,7 @@ function mobs:register_mob(name, def)
if math.random(1, 100) <= 30 then
self.object:setyaw(self.object:getyaw()+((math.random(0,360)-180)/180*math.pi))
end
if self.jump == true and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
if self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
local v = self.object:getvelocity()
v.y = 5
self.object:setvelocity(v)
@ -352,7 +352,7 @@ function mobs:register_mob(name, def)
self.v_start = true
self.set_velocity(self, self.run_velocity)
else
if self.jump == true and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
if self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
local v = self.object:getvelocity()
v.y = 5
self.object:setvelocity(v)