From 72b5c7d5b4abe476d9d0b8cfd88133616b233757 Mon Sep 17 00:00:00 2001 From: krystalgamer Date: Mon, 11 Mar 2024 18:00:20 +0100 Subject: [PATCH] one more cturret method --- turret.cpp | 10 ++++++++++ turret.h | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/turret.cpp b/turret.cpp index 1b0a1cb..1ff6dbc 100644 --- a/turret.cpp +++ b/turret.cpp @@ -7,9 +7,19 @@ void __inline CTurret::TargetLockAbsolute(const CVector &a1){ this->field_218 |= 4; } +void __inline CTurret::TargetLockDynamic(CBody *a2) +{ + if ( !a2->IsDead() ) + { + this->field_378 = a2; + this->field_218 |= 0x10u; + } +} + void validate_CTurret(void){ VALIDATE_SIZE(CTurret, 0x37C); VALIDATE(CTurret, field_324, 0x324); VALIDATE(CTurret, field_344, 0x344); + VALIDATE(CTurret, field_378, 0x378); } diff --git a/turret.h b/turret.h index a5bc07f..a89edcb 100644 --- a/turret.h +++ b/turret.h @@ -7,12 +7,14 @@ class CTurret : public CBaddy { public: EXPORT void TargetLockAbsolute(const CVector &); + EXPORT void TargetLockDynamic(CBody *a2); CVector field_324; unsigned char padAfter324[0x20 - sizeof(CVector)]; CVector field_344; - unsigned char padFull[41]; + unsigned char padAfter344[0x378-0x344 - sizeof(CVector)]; + CBody *field_378; }; void validate_CTurret(void);