Decomp fix for CScriptTrigger::Touch

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-20 18:23:38 +03:00
parent a9a43c1a20
commit d6e8d373ac
No known key found for this signature in database
GPG Key ID: E224F951761145F8
1 changed files with 4 additions and 2 deletions

View File

@ -233,8 +233,10 @@ void CScriptTrigger::Touch(CActor& act, CStateManager& mgr) {
auto testFlags = ETriggerFlags::None;
const TCastToPtr<CPlayer> pl(act);
if (pl) {
if (x128_forceMagnitude > 0.f && True(x12c_flags & ETriggerFlags::DetectPlayer) &&
mgr.GetLastTriggerId() == kInvalidUniqueId) {
if (x128_forceMagnitude > 0.f && True(x12c_flags & ETriggerFlags::DetectPlayer)) {
if (mgr.GetLastTriggerId() != kInvalidUniqueId) {
return;
}
mgr.SetLastTriggerId(x8_uid);
}