View Single Post
Old January 24, 2020, 23:17   #15
DavidMedley
Swordsman
 
Join Date: Oct 2019
Posts: 426
DavidMedley is on a distinguished road
It may have changed
Code:
int player_noise = 1 << (30 - stealth);
int notice = randint0(1024);
...
if ((notice * notice * notice) <= player_noise)
{reduce sleep}
notice can be 0 or 1, so notice^3 can be, too. player_noise can't get less than 1. If they're both 1, sleep is reduced.
DavidMedley is offline   Reply With Quote