Skip to content

Commit

Permalink
port: fix #541
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfdsfgs committed Nov 29, 2024
1 parent 9c4aded commit 67675d8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/game/chraicommands.c
Original file line number Diff line number Diff line change
Expand Up @@ -2114,14 +2114,18 @@ bool aiIfGunUnclaimed(void)
g_Vars.aioffset += 5;
}
} else {
struct weaponobj *weapon = g_Vars.chrdata->gunprop->weapon;

if (weapon && weapon->base.prop) {
weapon->base.flags |= OBJFLAG_FORCENOBOUNCE;
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
} else {
g_Vars.aioffset += 5;
struct prop *prop = g_Vars.chrdata->gunprop;

if (prop && prop->weapon && prop->parent == NULL && prop->type == PROPTYPE_WEAPON) {
struct weaponobj *weapon = prop->weapon;
if (weapon->base.prop) {
weapon->base.flags |= OBJFLAG_FORCENOBOUNCE;
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]);
return false;
}
}

g_Vars.aioffset += 5;
}

return false;
Expand Down

0 comments on commit 67675d8

Please sign in to comment.