fix an array index bug in servercode.
use rand() instead of get_random() for side shuffle

1) i think it's better to use a simple rand function for things that are
never synced, because everyone knows that rand() isn't synced.
2) my plan is to delete the get_random() function.
fix a oos bug on sighed enemy units in mp.

movements is still treated specialy and doesn't use
run_in_synced_context by default, because some funtions use the return
value of move_unit.