Skip to content

Commit

Permalink
added setownerstat request frame
Browse files Browse the repository at this point in the history
  • Loading branch information
higps committed Oct 2, 2023
1 parent 9b44c3a commit 6f1a3a3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions free_damage_rockets_soldier_ivory.sp
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,14 @@ void SplitRocket(int rocket, bool converge)
SetEntProp(mirv, Prop_Send, "m_bCritical", crit);
SetEntDataFloat(mirv, FindSendPropInfo(netname, "m_iDeflected") + 4, 50.0);


DataPack info = new DataPack();
info.Reset();
info.WriteCell(mirv);
info.WriteCell(launcher);

RequestFrame(SetOwnerStats, info);

if (converge)
{
MirvConverge[mirv] = true;
Expand All @@ -550,6 +558,20 @@ void SplitRocket(int rocket, bool converge)
}
}

void SetOwnerStats(DataPack info)
{
//Get our player indexes and free up the handle
info.Reset();
int child = info.ReadCell();
int owner = info.ReadCell();
delete info;
// PrintToChatAll("Owner was %N", owner);
//m_hLauncher or m_hThrower
// SetEntPropEnt(child, Prop_Send, "m_hOriginalLauncher", owner);
SetEntPropEnt(child, Prop_Send, "m_hLauncher", owner);
}


public bool FilterCollision(int entity, int ContentsMask)
{
if (entity == 0)
Expand Down

0 comments on commit 6f1a3a3

Please sign in to comment.