/**/
MUTATOR_HOOKABLE(CSQC_Parse_TempEntity, EV_CSQC_Parse_TempEntity);
+/** Called when a projectile is linked with CSQC */
+#define EV_Ent_Projectile(i, o) \
+ /** entity id */ i(entity, self) \
+ /**/
+MUTATOR_HOOKABLE(Ent_Projectile, EV_Ent_Projectile);
+
+/** Called when a projectile's properties are being modified */
+#define EV_EditProjectile(i, o) \
+ /** entity id */ i(entity, self) \
+ /**/
+MUTATOR_HOOKABLE(EditProjectile, EV_EditProjectile);
+
+/* Called when projectiles are precached */
+MUTATOR_HOOKABLE(PrecacheProjectiles, EV_NO_ARGS);
+
#endif
case PROJECTILE_RPC: setmodel(self, "models/weapons/ok_rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); break;
default:
+ if(MUTATOR_CALLHOOK(Ent_Projectile, self))
+ break;
+
if (Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
{
setmodel(self, "models/weapons/v_ok_grenade.md3");
self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
}
+ MUTATOR_CALLHOOK(EditProjectile, self);
+
setsize(self, self.mins, self.maxs);
}
precache_sound("weapons/fireball_fly2.wav");
precache_sound("weapons/tag_rocket_fly.wav");
+ MUTATOR_CALLHOOK(PrecacheProjectiles);
}
const int PROJECTILE_MAGE_SPIKE = 32;
const int PROJECTILE_SHAMBLER_LIGHTNING = 33;
+// projectile IDs 40-50 reserved
+
const int PROJECTILE_RPC = 60;
const int SPECIES_HUMAN = 0;