diff options
| author | Maide <34639600+Kelebek1@users.noreply.github.com> | 2025-07-28 23:44:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-28 18:44:12 -0400 |
| commit | 8ee539cdbc7120178efac84e3630f6990650a54d (patch) | |
| tree | 3100f162b3888f80a4ae7af8076ea8b433b4f7af /src/d/actor/d_a_obj_hha.cpp | |
| parent | 7a308968256a70604af6dd6af77dfe1dc314e37e (diff) | |
d_a_knob00 (#823)
* d_a_knob00
* PR
Diffstat (limited to 'src/d/actor/d_a_obj_hha.cpp')
| -rw-r--r-- | src/d/actor/d_a_obj_hha.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/src/d/actor/d_a_obj_hha.cpp b/src/d/actor/d_a_obj_hha.cpp index 2d30c94c..65422760 100644 --- a/src/d/actor/d_a_obj_hha.cpp +++ b/src/d/actor/d_a_obj_hha.cpp @@ -145,18 +145,8 @@ void daObjHhaPart_c::init_mtx(cXyz currentPos, csXyz shapeAngle, cXyz scale) { void daObjHhaPart_c::exe_normal(daObjHha_c* parent) { init_mtx(parent->current.pos, parent->shape_angle, parent->scale); - bool doMove; - if(mpBgw != NULL){ - if(0 <= mpBgw->GetId() && mpBgw->GetId() < 0x100){ - doMove = true; - } - else { - doMove = false; - } - - if(doMove){ - mpBgw->Move(); - } + if (mpBgw != NULL && mpBgw->ChkUsed()) { + mpBgw->Move(); } } @@ -382,21 +372,11 @@ bool daObjHha_c::_delete() { #endif for(i = 0; i < 2; i++){ cBgW* bgw = mPartA[i].mpBgw; - if(bgw != NULL){ - bool toErase; - if(bgw->GetId() >= 0 && bgw->GetId() < 0x100){ - toErase = true; - } - else { - toErase = false; - } - - if(toErase){ - dComIfG_Bgsp()->Release(bgw); + if(bgw != NULL && bgw->ChkUsed()) { + dComIfG_Bgsp()->Release(bgw); #if VERSION > VERSION_DEMO - mPartA[i].mpBgw = NULL; + mPartA[i].mpBgw = NULL; #endif - } } } #if VERSION > VERSION_DEMO |
