Permalink
Browse files

game: factorize a bit

  • Loading branch information...
Aranud committed Jan 8, 2019
1 parent 2c6f0f4 commit 8dd33d65c6184c244e35ea2c2362e24e0ae30bec
Showing with 2 additions and 3 deletions.
  1. +2 −0 src/game/g_misc.c
  2. +0 −3 src/game/g_missile.c
@@ -2819,6 +2819,8 @@ void G_PreFilledMissileEntity(gentity_t *ent, int weaponNum, int realWeapon, int
//

// generic
ent->think = GetWeaponFireTableData(weaponNum)->think;
ent->free = GetWeaponFireTableData(weaponNum)->free;
ent->nextthink = GetWeaponFireTableData(weaponNum)->nextThink ? level.time + GetWeaponFireTableData(weaponNum)->nextThink : 0;
ent->clipmask = GetWeaponFireTableData(weaponNum)->clipMask;
ent->accuracy = GetWeaponFireTableData(weaponNum)->accuracy;
@@ -1715,9 +1715,6 @@ gentity_t *fire_missile(gentity_t *self, vec3_t start, vec3_t dir, int weapon)
self->client->ps.grenadeTimeLeft = 0; // reset grenade timer
}

bolt->think = GetWeaponFireTableData(weapon)->think;
bolt->free = GetWeaponFireTableData(weapon)->free;

if (weapon == WP_DYNAMITE)
{
trap_SendServerCommand(self - g_entities, "cp \"Dynamite is set, but NOT armed!\"");

0 comments on commit 8dd33d6

Please sign in to comment.