void Shockwave_SpawnProjectile(ServerEntity_t *ent) { ServerEntity_t *eLaser; Sound(ent,CHAN_WEAPON,"weapons/shockwave/fire.wav",255,ATTN_NORM); ent->v.punchangle[0] -= 10.0f; eLaser = Entity_Spawn(); if(eLaser) { Weapon_Projectile(ent, eLaser, 2000.0f); Math_VectorCopy(ent->v.origin,eLaser->v.origin); Math_MVToVector(plVectorToAngles(eLaser->v.velocity),eLaser->v.angles); eLaser->local.owner = ent; eLaser->v.movetype = MOVETYPE_FLY; eLaser->v.TouchFunction = ShockLaser_Touch; eLaser->v.origin[2] += 25.0f; eLaser->Physics.solid = SOLID_BBOX; Entity_SetModel(eLaser,"models/slaser.md2"); Entity_SetSizeVector(eLaser, pl_origin3f, pl_origin3f); } ent->local.shockwave_ammo--; ent->v.primary_ammo = ent->local.shockwave_ammo; }
void Hermes_PrimaryAttack(ServerEntity_t *ent) { ServerEntity_t *cloud = Entity_Spawn(); cloud->v.classname = "cloud"; cloud->v.movetype = MOVETYPE_FLYMISSILE; cloud->Physics.solid = SOLID_TRIGGER; cloud->local.hit = 10; cloud->local.owner = ent; //SetSize(cloud,-16,-16,-16,16,16,16); Entity_SetOrigin(cloud,ent->v.origin); Weapon_Projectile(ent, cloud, 100.0f); cloud->v.nextthink = Server.time+0.3; cloud->v.think = Hermes_CloudThink; cloud->v.TouchFunction = HermesCloudTouch; plAddVector3Df(&cloud->v.avelocity, 300); if(ent->local.attackb_finished > Server.time) // No attack boost... ent->local.dAttackFinished = Server.time+0.35; else ent->local.dAttackFinished = Server.time+0.7; #if 0 if(rand()%3 == 1) //Weapon_Animate(ent,FALSE,12,17,0.07f,10,19,0,FALSE); else if(rand()%3 == 2) //Weapon_Animate(ent,FALSE,18,23,0.07f,10,19,0,FALSE); else //Weapon_Animate(ent,FALSE,24,29,0.07f,10,19,0,FALSE); #endif }
void GreekFire_Throw(ServerEntity_t *ent) { ServerEntity_t *greekfire = Entity_Spawn(); greekfire->v.cClassname = "greekfire"; greekfire->v.movetype = MOVETYPE_BOUNCE; greekfire->v.effects = EF_DIMLIGHT; greekfire->Physics.iSolid = SOLID_BBOX; greekfire->local.eOwner = ent; Weapon_Projectile(ent,greekfire,800.0f); Entity_SetModel(greekfire,"models/w_greekfire.md2"); Math_MVToVector(Math_VectorToAngles(greekfire->v.velocity),greekfire->v.angles); // Use SetOrigin since it automatically links. Entity_SetOrigin(greekfire, ent->v.origin); Entity_SetSizeVector(greekfire,g_mvOrigin3f,g_mvOrigin3f); greekfire->v.TouchFunction = GreekfireTouch; }