In EventSetMood, check for Bored/Nervous/Curious/Alert

This commit is contained in:
smallmodel 2023-10-15 14:03:44 +02:00
parent 851fd240d3
commit df9aead324
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -5481,21 +5481,9 @@ Make actor dumb.
*/
void Actor::Dumb(Event *ev)
{
Event e1(EV_Listener_ExecuteScript);
e1.AddConstString(STRING_GLOBAL_DISABLE_AI_SCR);
ExecuteScript(&e1);
}
/*
===============
Actor::PhysicsOn
Enable physics.
===============
*/
void Actor::PhysicsOn(Event *ev)
{
m_bDoPhysics = true;
Event event(EV_Listener_ExecuteScript);
event.AddConstString(STRING_GLOBAL_DISABLE_AI_SCR);
ExecuteScript(&event);
}
/*
@ -5510,6 +5498,18 @@ void Actor::PhysicsOff(Event *ev)
m_bDoPhysics = false;
}
/*
===============
Actor::PhysicsOn
Enable physics.
===============
*/
void Actor::PhysicsOn(Event *ev)
{
m_bDoPhysics = true;
}
/*
===============
Actor::EventGetMood
@ -5532,7 +5532,7 @@ Set current mood.
void Actor::EventSetMood(Event *ev)
{
m_csMood = ev->GetConstString(1);
if (m_csMood > STRING_ALERT) {
if (m_csMood != STRING_BORED && m_csMood != STRING_NERVOUS && m_csMood != STRING_CURIOUS && m_csMood != STRING_ALERT) {
m_csMood = STRING_BORED;
ScriptError("invalid mood - setting to bored");
}