ItemSpawn: Clean up filters.

This commit is contained in:
zaCade
2018-08-12 16:43:30 +02:00
parent 40fbe720eb
commit 652387ca9e
3 changed files with 73 additions and 27 deletions
+5 -5
View File
@@ -84,7 +84,7 @@ public void SpawnBalrog(float fOrigin[3])
// trigger_once strip.
int iTriggerStrip = CreateEntityAtOrigin("trigger_once", fOrigin);
DispatchKeyFormat(iTriggerStrip, "targetname", "item_balrog_strip_%d", g_iCounter);
DispatchKeyFormat(iTriggerStrip, "filtername", "item_spawn_zombie_filter");
DispatchKeyFormat(iTriggerStrip, "filtername", "item_filter_zombie");
DispatchKeyFormat(iTriggerStrip, "spawnflags", "1");
DispatchKeyFormat(iTriggerStrip, "startdisabled", "1");
DispatchKeyFormat(iTriggerStrip, "OnStartTouch", "item_spawn_weaponstrip,StripWeaponsAndSuit,,0,1");
@@ -103,7 +103,7 @@ public void SpawnBalrog(float fOrigin[3])
// trigger_hurt walk.
int iTriggerWalk = CreateEntityAtOrigin("trigger_hurt", fOriginTemp);
DispatchKeyFormat(iTriggerWalk, "targetname", "item_balrog_walk_%d", g_iCounter);
DispatchKeyFormat(iTriggerWalk, "filtername", "item_spawn_human_filter");
DispatchKeyFormat(iTriggerWalk, "filtername", "item_filter_zombie_ignored");
DispatchKeyFormat(iTriggerWalk, "spawnflags", "9");
DispatchKeyFormat(iTriggerWalk, "startdisabled", "1");
DispatchKeyFormat(iTriggerWalk, "damagetype", "128");
@@ -125,7 +125,7 @@ public void SpawnBalrog(float fOrigin[3])
// trigger_hurt roar.
int iTriggerRoar = CreateEntityAtOrigin("trigger_hurt", fOriginTemp);
DispatchKeyFormat(iTriggerRoar, "targetname", "item_balrog_roar_%d", g_iCounter);
DispatchKeyFormat(iTriggerRoar, "filtername", "item_spawn_zombie_filter");
DispatchKeyFormat(iTriggerRoar, "filtername", "item_filter_zombie");
DispatchKeyFormat(iTriggerRoar, "spawnflags", "1");
DispatchKeyFormat(iTriggerRoar, "startdisabled", "1");
DispatchKeyFormat(iTriggerRoar, "damagetype", "0");
@@ -153,7 +153,7 @@ public void SpawnBalrog(float fOrigin[3])
// trigger_hurt attack.
int iTriggerAttack = CreateEntityAtOrigin("trigger_hurt", fOriginTemp);
DispatchKeyFormat(iTriggerAttack, "targetname", "item_balrog_attack_%d", g_iCounter);
DispatchKeyFormat(iTriggerAttack, "filtername", "item_spawn_human_filter");
DispatchKeyFormat(iTriggerAttack, "filtername", "item_filter_zombie_ignored");
DispatchKeyFormat(iTriggerAttack, "spawnflags", "9");
DispatchKeyFormat(iTriggerAttack, "startdisabled", "1");
DispatchKeyFormat(iTriggerAttack, "damagetype", "128");
@@ -301,7 +301,7 @@ public void SpawnBalrog(float fOrigin[3])
DispatchKeyFormat(iHealth, "disablereceiveshadows", "1");
DispatchKeyFormat(iHealth, "damagetype", "0");
DispatchKeyFormat(iHealth, "damagetoenablemotion", "0");
DispatchKeyFormat(iHealth, "damagefilter", "item_spawn_human_filter");
DispatchKeyFormat(iHealth, "damagefilter", "item_filter_humans");
DispatchKeyFormat(iHealth, "OnBreak", "item_balrog_knife_%d,Kill,,0,1", g_iCounter);
DispatchKeyFormat(iHealth, "OnBreak", "item_balrog_strip_%d,Kill,,0,1", g_iCounter);
DispatchKeyFormat(iHealth, "OnBreak", "item_balrog_walk_%d,Kill,,0,1", g_iCounter);
+9 -9
View File
@@ -82,7 +82,7 @@ public void SpawnWhiteKnight(float fOrigin[3])
// trigger_once strip.
int iTriggerStrip = CreateEntityAtOrigin("trigger_once", fOrigin);
DispatchKeyFormat(iTriggerStrip, "targetname", "item_knight_strip_%d", g_iCounter);
DispatchKeyFormat(iTriggerStrip, "filtername", "item_spawn_human_filter");
DispatchKeyFormat(iTriggerStrip, "filtername", "item_filter_human");
DispatchKeyFormat(iTriggerStrip, "spawnflags", "1");
DispatchKeyFormat(iTriggerStrip, "startdisabled", "1");
DispatchKeyFormat(iTriggerStrip, "OnStartTouch", "item_spawn_weaponstrip,StripWeaponsAndSuit,,0,1");
@@ -101,7 +101,7 @@ public void SpawnWhiteKnight(float fOrigin[3])
// trigger_push attack.
int iTriggerAttack1 = CreateEntityAtOrigin("trigger_push", fOriginTemp);
DispatchKeyFormat(iTriggerAttack1, "targetname", "item_knight_attack_1_%d", g_iCounter);
DispatchKeyFormat(iTriggerAttack1, "filtername", "item_spawn_zombie_filter");
DispatchKeyFormat(iTriggerAttack1, "filtername", "item_filter_zombie");
DispatchKeyFormat(iTriggerAttack1, "spawnflags", "1");
DispatchKeyFormat(iTriggerAttack1, "startdisabled", "1");
DispatchKeyFormat(iTriggerAttack1, "pushdir", "-45 0 0");
@@ -116,7 +116,7 @@ public void SpawnWhiteKnight(float fOrigin[3])
// trigger_push attack.
int iTriggerAttack2 = CreateEntityAtOrigin("trigger_push", fOriginTemp);
DispatchKeyFormat(iTriggerAttack2, "targetname", "item_knight_attack_2_%d", g_iCounter);
DispatchKeyFormat(iTriggerAttack2, "filtername", "item_spawn_zombie_filter");
DispatchKeyFormat(iTriggerAttack2, "filtername", "item_filter_zombie");
DispatchKeyFormat(iTriggerAttack2, "spawnflags", "1");
DispatchKeyFormat(iTriggerAttack2, "startdisabled", "1");
DispatchKeyFormat(iTriggerAttack2, "pushdir", "-45 0 0");
@@ -136,7 +136,7 @@ public void SpawnWhiteKnight(float fOrigin[3])
// trigger_hurt attack.
int iTriggerAttack3 = CreateEntityAtOrigin("trigger_hurt", fOriginTemp);
DispatchKeyFormat(iTriggerAttack3, "targetname", "item_knight_attack_3_%d", g_iCounter);
DispatchKeyFormat(iTriggerAttack3, "filtername", "item_spawn_zombie_filter");
DispatchKeyFormat(iTriggerAttack3, "filtername", "item_filter_human_ignored");
DispatchKeyFormat(iTriggerAttack3, "spawnflags", "9");
DispatchKeyFormat(iTriggerAttack3, "startdisabled", "1");
DispatchKeyFormat(iTriggerAttack3, "damagetype", "512");
@@ -158,7 +158,7 @@ public void SpawnWhiteKnight(float fOrigin[3])
// trigger_hurt nuke.
int iTriggerNuke = CreateEntityAtOrigin("trigger_hurt", fOriginTemp);
DispatchKeyFormat(iTriggerNuke, "targetname", "item_knight_nuke_%d", g_iCounter);
DispatchKeyFormat(iTriggerNuke, "filtername", "item_spawn_zombie_filter");
DispatchKeyFormat(iTriggerNuke, "filtername", "item_filter_human_ignored");
DispatchKeyFormat(iTriggerNuke, "spawnflags", "9");
DispatchKeyFormat(iTriggerNuke, "startdisabled", "1");
DispatchKeyFormat(iTriggerNuke, "damagetype", "512");
@@ -303,8 +303,8 @@ public void SpawnWhiteKnight(float fOrigin[3])
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_shield_compare_%d,SetCompareValue,-1,0,-1", g_iCounter);
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_model_%d,SetAnimation,dog_defense,0,-1", g_iCounter);
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_model_%d,SetDefaultAnimation,dog_defense,0,-1", g_iCounter);
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_health_%d,SetDamageFilter,item_spawn_nodamage,0,-1", g_iCounter);
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_health_%d,SetDamageFilter,item_spawn_zombie_filter,2,-1", g_iCounter);
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_health_%d,SetDamageFilter,item_filter_nodamage,0,-1", g_iCounter);
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_health_%d,SetDamageFilter,item_filter_zombies,2,-1", g_iCounter);
DispatchKeyFormat(iCompareShield, "OnEqualTo", "item_knight_walk_%d,Trigger,,2,-1", g_iCounter);
SpawnAndActivate(iCompareShield);
ParentToEntity(iCompareShield, iKnife);
@@ -500,7 +500,7 @@ public void SpawnWhiteKnight(float fOrigin[3])
DispatchKeyFormat(iHealth, "disablereceiveshadows", "1");
DispatchKeyFormat(iHealth, "damagetype", "0");
DispatchKeyFormat(iHealth, "damagetoenablemotion", "0");
DispatchKeyFormat(iHealth, "damagefilter", "item_spawn_zombie_filter");
DispatchKeyFormat(iHealth, "damagefilter", "item_filter_zombies");
DispatchKeyFormat(iHealth, "OnBreak", "item_knight_knife_%d,Kill,,0,1", g_iCounter);
DispatchKeyFormat(iHealth, "OnBreak", "item_knight_strip_%d,Kill,,0,1", g_iCounter);
DispatchKeyFormat(iHealth, "OnBreak", "item_knight_attack_1_%d,Kill,,0,1", g_iCounter);
@@ -531,7 +531,7 @@ public void SpawnWhiteKnight(float fOrigin[3])
DispatchKeyFormat(iHealth, "OnBreak", "item_knight_model_%d,SetAnimation,dog_die,0,1", g_iCounter);
DispatchKeyFormat(iHealth, "OnBreak", "item_knight_model_%d,SetDefaultAnimation,dog_die_loop,0,1", g_iCounter);
DispatchKeyFormat(iHealth, "OnPlayerUse", "item_knight_attack_branch_%d,Toggle,,0,-1", g_iCounter);
DispatchKeyFormat(iHealth, "OnUser1", "!activator,SetDamageFilter,item_spawn_human_filter,0,-1");
DispatchKeyFormat(iHealth, "OnUser1", "!activator,SetDamageFilter,item_filter_zombie_ignored,0,-1");
DispatchKeyFormat(iHealth, "OnUser1", "!activator,AddOutput,rendermode 10,0,-1");
DispatchKeyFormat(iHealth, "OnUser1", "!activator,AddOutput,renderfx 6,0,-1");
DispatchKeyFormat(iHealth, "OnUser1", "!self,FireUser1,,1,-1");