Skip to content

Commit 48f76f7

Browse files
committed
Fix l_weapon Team set var logic
1 parent eb16512 commit 48f76f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

code/scripting/api/objs/weapon.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "vecmath.h"
1010
#include "team.h"
1111
#include "mc_info.h"
12+
#include "iff_defs/iff_defs.h"
1213

1314
namespace scripting {
1415
namespace api {
@@ -285,7 +286,7 @@ ADE_VIRTVAR(Team, l_Weapon, "team", "Weapon's team", "team", "Weapon team, or in
285286

286287
weapon *wp = &Weapons[oh->objp->instance];
287288

288-
if(ADE_SETTING_VAR && nt > -1 && nt < Num_teams) {
289+
if(ADE_SETTING_VAR && nt > -1 && nt < Num_iffs) {
289290
wp->team = nt;
290291
}
291292

0 commit comments

Comments
 (0)