Rope timing fixes

This commit is contained in:
Pyrex 2022-12-30 22:45:12 -08:00
parent 37283c146d
commit 003c6b5dc3

View File

@ -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}