Skip to content

Commit

Permalink
Nades: Add world model for grenades (armoury_entity)
Browse files Browse the repository at this point in the history
  • Loading branch information
z0h1r-LK committed Mar 6, 2024
1 parent 3518b68 commit b963b4f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripting/ze_fire.sma
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,20 @@ public client_disconnected(id, bool:drop, message[], maxlen)
remove_task(id+TASK_BURNING)
}

public ze_game_started()
{
new iEnt = NULLENT
while ((iEnt = rg_find_ent_by_class(iEnt, "armoury_entity")))
{
if (is_nullent(iEnt))
continue

// HE Grenade?
if (get_member(iEnt, m_Armoury_iItem) == ARMOURY_HEGRENADE)
entity_set_model(iEnt, g_w_szFireModel)
}
}

public ze_user_humanized(id)
{
// Turn off the Flame.
Expand Down
14 changes: 14 additions & 0 deletions scripting/ze_flare.sma
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@ public plugin_init()
bind_pcvar_float(register_cvar("ze_flare_damage", "500.0"), g_flFlareDamage)
}

public ze_game_started()
{
new iEnt = NULLENT
while ((iEnt = rg_find_ent_by_class(iEnt, "armoury_entity")))
{
if (is_nullent(iEnt))
continue

// SmokeGrenade?
if (get_member(iEnt, m_Armoury_iItem) == ARMOURY_SMOKEGRENADE)
entity_set_model(iEnt, g_w_szFlareModel)
}
}

public ze_user_humanized(id)
{
if (module_exists(LIBRARY_WPNMODELS))
Expand Down
14 changes: 14 additions & 0 deletions scripting/ze_frost.sma
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,20 @@ public client_disconnected(id, bool:drop, message[], maxlen)
g_iRendering[id][i] = 0
}

public ze_game_started()
{
new iEnt = NULLENT
while ((iEnt = rg_find_ent_by_class(iEnt, "armoury_entity")))
{
if (is_nullent(iEnt))
continue

// Flashbang?
if (get_member(iEnt, m_Armoury_iItem) == ARMOURY_FLASHBANG)
entity_set_model(iEnt, g_w_szFrostModel)
}
}

public ze_user_humanized(id)
{
// Unfreeze victim.
Expand Down

0 comments on commit b963b4f

Please sign in to comment.