Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions addons/sourcemod/scripting/zombie_riot/object/obj_barracks.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,14 +1411,15 @@ static void Barracks_MortarSupport_Mode(BarrackBody npc, int client, bool mounte
else WorldSpaceCenter(Target, vecTarget);

float SpeedReturn[3];
int RocketGet = npc.FireRocket(vecTarget, 0.0, projectile_speed,_,_,_,45.0);
int RocketGet = npc.FireRocket(vecTarget, 0.0, projectile_speed,_,_,_,45.0, client);
if(RocketGet != -1)
{
ArcToLocationViaSpeedProjectile(SelfPos, vecTarget, SpeedReturn, 1.75, 1.0);
TeleportEntity(RocketGet, NULL_VECTOR, NULL_VECTOR, SpeedReturn);
Better_Gravity_Rocket(RocketGet, 55.0);
fl_Extra_Damage[RocketGet] = BlastDamage;
fl_Dead_Ringer_Invis[RocketGet] = BlastRange;
h_ArrowInflictorRef[RocketGet] = GetClientUserId(client);
SDKHook(RocketGet, SDKHook_StartTouch, HEGrenade_StartTouch);
}
EmitSoundToAll("weapons/grenade_launcher_shoot.wav", (mounted ? client : npc.index), _, 80, _, 0.7);
Expand All @@ -1434,14 +1435,11 @@ static Action HEGrenade_StartTouch(int entity, int target)
owner = 0;
int inflictor = h_ArrowInflictorRef[entity];
if(inflictor != -1)
inflictor = EntRefToEntIndex(h_ArrowInflictorRef[entity]);

if(inflictor == -1)
inflictor = owner;
owner = GetClientOfUserId(h_ArrowInflictorRef[entity]);

float ProjectileLoc[3];
GetEntPropVector(entity, Prop_Data, "m_vecAbsOrigin", ProjectileLoc);
Explode_Logic_Custom(fl_Extra_Damage[entity], owner, inflictor, -1, ProjectileLoc, fl_Dead_Ringer_Invis[entity]);
Explode_Logic_Custom(fl_Extra_Damage[entity], owner, owner, -1, ProjectileLoc, fl_Dead_Ringer_Invis[entity]);
return Plugin_Handled;
}

Expand Down Expand Up @@ -1554,7 +1552,7 @@ static void Barracks_ModernDefense_Mode(BarrackBody npc, int client, bool mounte
{
float vecTarget[3]; WorldSpaceCenter(Target, vecTarget);
ShootLaser(npc.index, "bullet_tracer02_red", SelfPos, vecTarget, false);
SDKHooks_TakeDamage(Target, npc.index, npc.index, BulletDamage, DMG_BULLET, -1, _, vecTarget);
SDKHooks_TakeDamage(Target, npc.index, client, BulletDamage, DMG_BULLET, -1, _, vecTarget);
npc.m_iAmmo--;
switch(ModernLeveL)
{
Expand Down Expand Up @@ -1612,7 +1610,7 @@ static void Barracks_ModernDefense_Mode(BarrackBody npc, int client, bool mounte
{
float vecTarget[3]; WorldSpaceCenter(Target, vecTarget);
ShootLaser(npc.index, "bullet_tracer02_red_crit", SelfPos, vecTarget, false);
SDKHooks_TakeDamage(Target, npc.index, npc.index, BulletDamage, DMG_BULLET, -1, _, vecTarget);
SDKHooks_TakeDamage(Target, npc.index, client, BulletDamage, DMG_BULLET, -1, _, vecTarget);
EmitSoundToAll("weapons/sniper_shoot.wav", (mounted ? client : npc.index), _, 80, _, 0.7);
npc.m_flNextRangedAttack = GameTime + AttackDelay;
}
Expand Down