mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
[MIRROR] Fixes monkey humans having their AI turned on when revived (and having a client) [MDB IGNORE] (#18906)
* Fixes monkey humans having their AI turned on when revived (and having a client) (#72799) ## About The Pull Request Stops on_stat_changed turning on AI with a client makes monkey humans not wack ## Why It's Good For The Game fixes #72432 ## Changelog 🆑 fix: Monkey Humans no longer have their AI turned on upon revival /🆑 * Merge skew fixed by 72908 Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
jimmyl
GoldenAlpharex
parent
27b6422568
commit
8def7b367d
@@ -110,6 +110,7 @@ multiple modular subtrees with behaviors
|
||||
set_ai_status(AI_STATUS_ON)
|
||||
else
|
||||
set_ai_status(get_setup_mob_ai_status(new_pawn))
|
||||
RegisterSignal(pawn, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_changed))
|
||||
|
||||
RegisterSignal(pawn, COMSIG_MOB_LOGIN, PROC_REF(on_sentience_gained))
|
||||
|
||||
@@ -123,7 +124,6 @@ multiple modular subtrees with behaviors
|
||||
if(ai_traits & CAN_ACT_WHILE_DEAD)
|
||||
return final_status
|
||||
|
||||
RegisterSignal(pawn, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_changed))
|
||||
if(mob_pawn.stat == DEAD)
|
||||
final_status = AI_STATUS_OFF
|
||||
|
||||
@@ -300,7 +300,7 @@ multiple modular subtrees with behaviors
|
||||
/// Turn the controller on or off based on if you're alive, we only register to this if the flag is present so don't need to check again
|
||||
/datum/ai_controller/proc/on_stat_changed(mob/living/source, new_stat)
|
||||
SIGNAL_HANDLER
|
||||
var/new_ai_status = (new_stat == DEAD) ? AI_STATUS_OFF : AI_STATUS_ON
|
||||
var/new_ai_status = get_setup_mob_ai_status(source)
|
||||
set_ai_status(new_ai_status)
|
||||
|
||||
/datum/ai_controller/proc/on_sentience_gained()
|
||||
|
||||
Reference in New Issue
Block a user