Add critter_flag_unset

This commit is contained in:
Alexander Batalov 2023-07-24 09:07:02 +03:00
parent 369a54f836
commit f3f61abc18
2 changed files with 19 additions and 0 deletions

View File

@ -1414,4 +1414,22 @@ void critter_flag_set(int pid, int flag)
proto->critter.data.flags |= flag;
}
// 0x42E71C
void critter_flag_unset(int pid, int flag)
{
Proto* proto;
if (pid == -1) {
return;
}
if (PID_TYPE(pid) != OBJ_TYPE_CRITTER) {
return;
}
protoGetProto(pid, &proto);
proto->critter.data.flags &= ~flag;
}
} // namespace fallout

View File

@ -71,6 +71,7 @@ bool critterIsEncumbered(Object* critter);
bool critterIsFleeing(Object* a1);
bool _critter_flag_check(int pid, int flag);
void critter_flag_set(int pid, int flag);
void critter_flag_unset(int pid, int flag);
} // namespace fallout