season_xmas: update to latest version
This commit is contained in:
parent
90a9edf69a
commit
cc7c7bfaab
@ -827,10 +827,23 @@ public void OnEntitySpawned(int Entity, const char[] sClassname)
|
|||||||
if (g_iCollected[iOwner] < g_hCVar_MilestoneGrenade.IntValue)
|
if (g_iCollected[iOwner] < g_hCVar_MilestoneGrenade.IntValue)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SetEntityRenderMode(Entity, RENDER_NONE);
|
RequestFrame(PostNadeSpawn, EntIndexToEntRef(Entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
// Purpose:
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
public void PostNadeSpawn(int iEntRef)
|
||||||
|
{
|
||||||
|
int iEntity = EntRefToEntIndex(iEntRef);
|
||||||
|
if (!IsValidEntity(iEntity))
|
||||||
|
return;
|
||||||
|
|
||||||
|
SetEntityRenderMode(iEntity, RENDER_NONE);
|
||||||
|
|
||||||
float fNadeOrigin[3];
|
float fNadeOrigin[3];
|
||||||
GetEntPropVector(Entity, Prop_Send, "m_vecOrigin", fNadeOrigin);
|
GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fNadeOrigin);
|
||||||
|
|
||||||
int iNadeProp = CreateEntityAtOrigin("prop_dynamic_override", fNadeOrigin);
|
int iNadeProp = CreateEntityAtOrigin("prop_dynamic_override", fNadeOrigin);
|
||||||
DispatchKeyFormat(iNadeProp, "targetname", "season_nade_prop_%d", g_iCounter);
|
DispatchKeyFormat(iNadeProp, "targetname", "season_nade_prop_%d", g_iCounter);
|
||||||
@ -870,7 +883,7 @@ public void OnEntitySpawned(int Entity, const char[] sClassname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SpawnAndActivate(iNadeProp);
|
SpawnAndActivate(iNadeProp);
|
||||||
ParentToEntity(iNadeProp, Entity);
|
ParentToEntity(iNadeProp, iEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user