Gets rid of the sleep() altogether and also that client rotation thing that breaks everything

This commit is contained in:
Screemonster
2018-02-20 10:15:17 +00:00
parent 6769c04a44
commit 421aa33c40
2 changed files with 176 additions and 177 deletions

View File

@@ -159,7 +159,7 @@
handling_hal = 1 handling_hal = 1
if(client && feral >= 10) // largely a copy of handle_hallucinations() without the fake attackers. Unlike hallucinations, only fires once - if they're still feral they'll get hit again anyway. if(client && feral >= 10) // largely a copy of handle_hallucinations() without the fake attackers. Unlike hallucinations, only fires once - if they're still feral they'll get hit again anyway.
sleep(rand(200,500)/(feral/10)) spawn(rand(200,500)/(feral/10))
var/halpick = rand(1,100) var/halpick = rand(1,100)
switch(halpick) switch(halpick)
if(0 to 15) //15% chance if(0 to 15) //15% chance
@@ -335,11 +335,12 @@
if(client) client.images -= halbody if(client) client.images -= halbody
halbody = null halbody = null
if(86 to 100) //15% chance if(86 to 100) //15% chance
//disorientation //hear voices. Could make the voice pick from nearby creatures, but nearby creatures make feral hallucinations rare so don't bother.
if(client) var/list/hiddenspeakers = list("Someone distant", "A voice nearby","A familiar voice", "An echoing voice", "A cautious voice", "A scared voice", "Someone around the corner", "Someone", "Something", "Something scary", "An urgent voice", "An angry voice")
client.dir = pick(2,4,8) var/list/speakerverbs = list("calls out", "yells", "screams", "exclaims", "shrieks", "shouts", "hisses", "snarls")
spawn(rand(20,50)) var/list/spookyphrases = list("It's over here!","Stop it!", "Hunt it down!", "Get it!", "Quick, over here!", "Anyone there?", "Who's there?", "Catch that thing!", "Stop it! Kill it!", "Anyone there?", "Where is it?", "Find it!", "There it is!")
client.dir = 1 to_chat(src, "<span class='game say'><span class='name'>[pick(hiddenspeakers)]</span> [pick(speakerverbs)], \"[pick(spookyphrases)]\"</span>")
handling_hal = 0 handling_hal = 0
return return

View File

@@ -144,10 +144,8 @@
H << "<span class='danger'> Every movement, every flick, every sight and sound has your full attention, your hunting instincts on high alert... In fact, [M] looks extremely appetizing...</span>" H << "<span class='danger'> Every movement, every flick, every sight and sound has your full attention, your hunting instincts on high alert... In fact, [M] looks extremely appetizing...</span>"
if(H.stat == CONSCIOUS) if(H.stat == CONSCIOUS)
H.emote("twitch") H.emote("twitch")
spawn(0)
H.handle_feral() H.handle_feral()
else // nobody around else // nobody around
spawn(0)
H.handle_feral() H.handle_feral()
if(prob(2)) //periodic nagmessages if(prob(2)) //periodic nagmessages
if(H.nutrition <= 100) //If hungry, nag them to go and find someone or something to eat. if(H.nutrition <= 100) //If hungry, nag them to go and find someone or something to eat.