Skip to content

Commit

Permalink
Improvement Relicta-Team#556
Browse files Browse the repository at this point in the history
  • Loading branch information
Yobas committed Nov 17, 2024
1 parent 43c826f commit 925e379
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Src/host/GameObjects/GameObject.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -1313,9 +1313,11 @@ region(throwing and bullets functions)
_thDamModif = callFunc(_matObj,getDamageCoefOnAttack);
};

private _weapDamage = round(_dam*_thDamModif) - _drObj;
//! THIS CAN BE THROWS ERROR BECAUSE _throwed.loc - is flyingObject
callFuncParams(_throwed,applyDamage,_weapDamage arg _type arg _p arg "throwed");
if ([getVar(_throwed,ht)] call gurps_probSuccess) then {
private _weapDamage = round(_dam*_thDamModif) - _drObj;
//! THIS CAN BE THROWS ERROR BECAUSE _throwed.loc - is flyingObject
callFuncParams(_throwed,applyDamage,_weapDamage arg _type arg _p arg "throwed");
};
};

//Тут обязательно нужно удалить пулю чтобы не вызывать утечек памяти
Expand Down
6 changes: 4 additions & 2 deletions Src/host/GameObjects/Mobs/Mob_Combat.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ func(attackOtherObj)

callFuncParams(_target,applyDamage,_basicDamage arg _dType arg callSelf(getLastInteractEndPos) arg "attack"); //conv attack to -> _dir arg di_partDamage arg vec2(_attItem,_attWeapon)

//weapon damage after attack
callFuncParams(_attItem,applyDamage,_weapDamage max 0 arg _dType arg callSelf(getLastInteractStartPos) arg "weap_attack");
if ([getVar(_attItem,ht)] call gurps_probSuccess) then {
//weapon damage after attack
callFuncParams(_attItem,applyDamage,_weapDamage max 0 arg _dType arg callSelf(getLastInteractStartPos) arg "weap_attack");
};

//callSelfParams(onDamageMessage,_target arg _attWeapMes arg _attackedZoneText arg _attRealTargetZone arg _postMessageEffect);
};// _delegate_damage
Expand Down

0 comments on commit 925e379

Please sign in to comment.