Skip to content
Permalink
Browse files

game: fixed build with FEATURE_LUA disabled, refs #1278

  • Loading branch information...
rmarquis committed May 18, 2019
1 parent a6189bc commit f35b70fac24888e1b3e1108f3530f33372385c62
Showing with 8 additions and 0 deletions.
  1. +4 −0 src/game/g_misc.c
  2. +2 −0 src/game/g_script.c
  3. +2 −0 src/game/g_weapon.c
@@ -1340,7 +1340,9 @@ void aagun_fire(gentity_t *other)
// snap to integer coordinates for more efficient network bandwidth usage
SnapVector(muzzle);

#ifdef FEATURE_LUA
if (!G_LuaHook_AAGunFire(other->s.number))
#endif
{
Fire_Lead_Ext(self, other, AAGUN_SPREAD, AAGUN_DAMAGE, muzzle, forward, right, up, MOD_MACHINEGUN);
}
@@ -1493,7 +1495,9 @@ void mg42_fire(gentity_t *other)
// snap to integer coordinates for more efficient network bandwidth usage
SnapVector(muzzle);

#ifdef FEATURE_LUA
if (!G_LuaHook_FixedMGFire(other->s.number))
#endif
{
Fire_Lead_Ext(self, other, GetWeaponTableData(WP_DUMMY_MG42)->spread, GetWeaponTableData(WP_DUMMY_MG42)->damage, muzzle, forward, right, up, MOD_MACHINEGUN);
}
@@ -904,7 +904,9 @@ void mountedmg42_fire(gentity_t *other)
//self->s.eFlags |= EF_MG42_ACTIVE;
other->s.eFlags |= EF_MG42_ACTIVE;

#ifdef FEATURE_LUA
if (!G_LuaHook_MountedMGFire(other->s.number))
#endif
{
if (self->s.density & 8)
{
@@ -4151,7 +4151,9 @@ void FireWeapon(gentity_t *ent)
if (weapFireTable[ent->s.weapon].fire)
{
gentity_t *pFiredShot = NULL; // Omni-bot To tell bots about projectiles
#ifdef FEATURE_LUA
if (!G_LuaHook_WeaponFire(ent->s.number, ent->s.weapon, &pFiredShot))
#endif
{
pFiredShot = weapFireTable[ent->s.weapon].fire(ent);
}

0 comments on commit f35b70f

Please sign in to comment.
You can’t perform that action at this time.