Converts the flags of ship_weapon to use the new flag system

This commit is contained in:
Fabian Woltermann committed 2016-08-13 10:42:47 +02:00
1 parent c17c58265a
commit 64153da3bd
11 files changed
+120 -71

No files matched your search

+2 -6
View File
@@ -7689,14 +7689,10 @@ ADE_VIRTVAR(TurretLocked, l_Subsystem, "boolean", "Whether the turret is locked.
if(ADE_SETTING_VAR)
{
if (newVal) {
sso->ss->weapons.flags |= SW_FLAG_TURRET_LOCK;
} else {
sso->ss->weapons.flags &= (~SW_FLAG_TURRET_LOCK);
}
sso->ss->weapons.flags.set(Ship::Weapon_Flags::Turret_Lock, newVal);
}
return ade_set_args(L, "b", (sso->ss->weapons.flags & SW_FLAG_TURRET_LOCK));
return ade_set_args(L, "b", (sso->ss->weapons.flags[Ship::Weapon_Flags::Turret_Lock]));
}
ADE_VIRTVAR(NextFireTimestamp, l_Subsystem, "number", "The next time the turret may attempt to fire", "number", "Mission time (seconds) or -1 on error")