Bukz

Untitled

Apr 14th, 2011
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. // "Rewind" workaround by V-Man
  2. // rewind x, where "x" is the number of minutes back to rewind
  3. // setmr x, where "x" is the "minutes remaining" mark to skip to
  4.  
  5. alias rewind [
  6. if (watchingdemo) [
  7. alias rewindtime (*f $arg1 60000)
  8. alias timemark (* $minutesremaining 60000)
  9. alias mapstartonce [
  10. tmp_soundVol = $soundvol
  11. alias demosleeplength (- (* $minutesremaining 60000) (+ $rewindtime $timemark))
  12. gamespeed 1000
  13. soundvol 0
  14. sleep $demosleeplength [gamespeed 30; soundvol $tmp_soundVol]
  15. ]
  16. demo $_demofile
  17. ] [echo Not currently watching a demo.]]
  18.  
  19. alias setmr [
  20. if (watchingdemo) [
  21. alias millisrem (*f $arg1 60000)
  22. alias mapstartonce [
  23. tmp_soundVol = $soundvol
  24. alias demosleeplength (- (* $minutesremaining 60000) $millisrem)
  25. gamespeed 1000
  26. soundvol 0
  27. sleep $demosleeplength [gamespeed 30; soundvol $tmp_soundVol]
  28. ]
  29. demo $_demofile
  30. ] [echo Not currently watching a demo.]]
  31.  
  32. // Thanks to GeneralDisarray for saving our ears:
  33. // tmp = $soundvol; soundvol 0 and afterwards soundvol $tmp
Advertisement
Add Comment
Please, Sign In to add comment