season_xmas: update to latest version

This commit is contained in:
hubdom 2020-12-02 16:10:16 +01:00
parent 90a9edf69a
commit cc7c7bfaab

View File

@ -827,10 +827,23 @@ public void OnEntitySpawned(int Entity, const char[] sClassname)
if (g_iCollected[iOwner] < g_hCVar_MilestoneGrenade.IntValue)
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];
GetEntPropVector(Entity, Prop_Send, "m_vecOrigin", fNadeOrigin);
GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fNadeOrigin);
int iNadeProp = CreateEntityAtOrigin("prop_dynamic_override", fNadeOrigin);
DispatchKeyFormat(iNadeProp, "targetname", "season_nade_prop_%d", g_iCounter);
@ -870,7 +883,7 @@ public void OnEntitySpawned(int Entity, const char[] sClassname)
}
SpawnAndActivate(iNadeProp);
ParentToEntity(iNadeProp, Entity);
ParentToEntity(iNadeProp, iEntity);
}
//----------------------------------------------------------------------------------------------------