mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-11-19 14:11:15 +00:00
Add critter_flag_set
This commit is contained in:
parent
e9f3b34888
commit
369a54f836
@ -1396,4 +1396,22 @@ bool _critter_flag_check(int pid, int flag)
|
||||
return (proto->critter.data.flags & flag) != 0;
|
||||
}
|
||||
|
||||
// 0x42E6F0
|
||||
void critter_flag_set(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
|
||||
|
@ -70,6 +70,7 @@ int critterGetMovementPointCostAdjustedForCrippledLegs(Object* critter, int a2);
|
||||
bool critterIsEncumbered(Object* critter);
|
||||
bool critterIsFleeing(Object* a1);
|
||||
bool _critter_flag_check(int pid, int flag);
|
||||
void critter_flag_set(int pid, int flag);
|
||||
|
||||
} // namespace fallout
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user