Rope timing fixes
This commit is contained in:
parent
37283c146d
commit
003c6b5dc3
@ -872,7 +872,7 @@ function rope:update()
|
||||
|
||||
elseif self.state.name=="destroy" then -- destroy
|
||||
self.state.frame+=1
|
||||
if (self.state.frame>=5) self.state={name="done",reelin=self.state.reelin}
|
||||
if (self.state.frame>=4) self.state={name="done",reelin=self.state.reelin}
|
||||
else
|
||||
-- done state
|
||||
end
|
||||
@ -922,7 +922,7 @@ function rope:draw(artificial_px,artificial_py)
|
||||
local n,perc_to_show,from_end = self.state.name,1.0,false
|
||||
if (n=="done") return
|
||||
if (n=="cast") perc_to_show=self.state.frame/2
|
||||
if (n=="destroy") perc_to_show=(1.0-self.state.frame/8)^2
|
||||
if (n=="destroy") perc_to_show=(1.0-self.state.frame/4)^2
|
||||
if (self.state.reelin) from_end=true
|
||||
|
||||
points[#points]={x=artificial_px,y=artificial_py}
|
||||
|
Loading…
Reference in New Issue
Block a user