Skip to content

Commit

Permalink
Add more safety checks to head aim ray
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed May 27, 2019
1 parent eb01bf1 commit e9c295c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _work/data/Scripts/Content/GFA/_intern/aimRay.d
Expand Up @@ -64,7 +64,7 @@ func void GFA_AllowSoftSkinTraceRay(var int on) {
func int GFA_AimRayHead(var int npcPtr, var int fromPosPtr, var int dirPosPtr, var int vecPtr) {
var int hit; hit = FALSE;
var oCNpc npc; npc = _^(npcPtr);
if (!Hlp_StrCmp(npc.head_visualName, "") && (npc.anictrl)) {
if (!Hlp_StrCmp(npc.head_visualName, "") && (npc.anictrl) && (npc._zCVob_homeWorld)) {
// Perform a lot of safety checks, to prevent crashes
var zCAIPlayer playerAI; playerAI = _^(npc.anictrl);
if (playerAI.modelHeadNode) {
Expand Down

0 comments on commit e9c295c

Please sign in to comment.