Permalink
Browse files

Multiple small changes

* Removed npc_bullseye from kill feed ( Dummy NPC )
* Changed default killer for npc to worldspawn
* Floor turret isn't killed by world when knocked down
* Disallow giving weapons from spawnmenu when not alive
* Added Gravity Gun and Zombine Grenade to spawnmenu
* Added Physgun, Toolgun and Camera to the spawnmenu
* Cleaned up game_ep2.lua
* Updated language files
* Removed unused settings files
  • Loading branch information...
1 parent 96df9c2 commit 9ff1adcdf76d1fe0d884e673dfb9a51a30d644d7 @robotboy655 robotboy655 committed Feb 19, 2014
@@ -8,6 +8,9 @@ util.AddNetworkString( "NPCKilledNPC" )
-----------------------------------------------------------]]
function GM:OnNPCKilled( ent, attacker, inflictor )
+ -- Don't spam the killfeed with scripted stuff
+ if ( ent:GetClass() == "npc_bullseye" ) then return end
+
-- Convert the inflictor to the weapon that they're holding if we can.
if ( inflictor && inflictor != NULL && attacker == inflictor && (inflictor:IsPlayer() || inflictor:IsNPC()) ) then
@@ -16,8 +19,8 @@ function GM:OnNPCKilled( ent, attacker, inflictor )
end
- local InflictorClass = "World"
- local AttackerClass = "World"
+ local InflictorClass = "worldspawn"
+ local AttackerClass = "worldspawn"
if ( IsValid( inflictor ) ) then InflictorClass = inflictor:GetClass() end
if ( IsValid( attacker ) ) then
@@ -43,7 +46,8 @@ function GM:OnNPCKilled( ent, attacker, inflictor )
end
-
+ if ( ent:GetClass() == "npc_turret_floor" ) then AttackerClass = ent:GetClass() end
+
net.Start( "NPCKilledNPC" )
net.WriteString( ent:GetClass() )
@@ -30,7 +30,7 @@ SWEP.Slot = 5
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
-SWEP.Spawnable = false
+SWEP.Spawnable = true
if ( SERVER ) then
@@ -11,8 +11,6 @@ SWEP.SlotPos = 6
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
-SWEP.Spawnable = false
-
SWEP.WepSelectIcon = surface.GetTextureID( "vgui/gmod_tool" )
SWEP.Gradient = surface.GetTextureID( "gui/gradient" )
SWEP.InfoIcon = surface.GetTextureID( "gui/info" )
@@ -10,6 +10,7 @@ SWEP.WorldModel = "models/weapons/w_toolgun.mdl"
SWEP.AnimPrefix = "python"
SWEP.UseHands = true
+SWEP.Spawnable = true
-- Be nice, precache the models
util.PrecacheModel( SWEP.ViewModel )
@@ -682,9 +682,10 @@ concommand.Add( "gm_spawnsent", function( ply, cmd, args ) Spawn_SENT( ply, args
function CCGiveSWEP( player, command, arguments )
if ( arguments[1] == nil ) then return end
+ if ( !player:Alive() ) then return end
-- Make sure this is a SWEP
- local swep = list.Get( "Weapon" )[ arguments[1] ];
+ local swep = list.Get( "Weapon" )[ arguments[1] ]
if (swep == nil) then return end
-- You're not allowed to spawn this!
@@ -1,63 +1,59 @@
-
if ( !IsMounted( "ep2" ) ) then return end
--
--- Strider Buster
+-- NPC's
--
-local Category = "Half-Life 2"
-
+local Category = "Humans + Resistance"
+list.Set( "NPC", "npc_magnusson", { Name = "Dr.Magnusson", Class = "npc_magnusson", Category = Category } )
-game.AddParticles( "particles/striderbuster.pcf" )
+Category = "Zombies + Enemy Aliens"
+list.Set( "NPC", "npc_zombine", { Name = "Zombine", Class = "npc_zombine", Category = Category } )
+list.Set( "NPC", "npc_antlion_worker", { Name = "Antlion Worker", Class = "npc_antlion_worker", Category = Category } )
+list.Set( "NPC", "npc_antlion_grub", { Name = "Antlion Grub", Class = "npc_antlion_grub", Category = Category, NoDrop = true, Offset = 1 } )
+list.Set( "NPC", "npc_antlionguardian", { Name = "Antlion Guardian", Class = "npc_antlionguard", Category = Category, KeyValues = { cavernbreed = 1, incavern = 1 }, Material = "Models/antlion_guard/antlionGuard2" } )
-list.Set( "SpawnableEntities", "weapon_striderbuster", {
- -- Required information
- PrintName = "Magnusson",
- ClassName = "weapon_striderbuster",
- Category = Category,
-
- -- Optional information
- NormalOffset = 32,
- DropToFloor = true,
- Author = "VALVe",
- AdminOnly = false,
- Information = "The strider bustin' Magnusson Device from HL2: Episode 2"
- } )
+Category = "Combine"
+list.Set( "NPC", "npc_hunter", { Name = "Hunter", Class = "npc_hunter", Category = Category } )
--
--- NPC's
+-- Strider Buster
--
-Category = "Humans + Resistance"
- list.Set( "NPC", "npc_magnusson", { Name = "Dr.Magnusson", Class = "npc_magnusson", Category = Category } )
+Category = "Half-Life 2"
-Category = "Zombies + Enemy Aliens"
- list.Set( "NPC", "npc_zombine", { Name = "Zombine", Class = "npc_zombine", Category = Category } )
- list.Set( "NPC", "npc_antlion_worker", { Name = "Antlion Worker", Class = "npc_antlion_worker", Category = Category } )
- list.Set( "NPC", "npc_antlion_grub", { Name = "Antlion Grub", Class = "npc_antlion_grub", Category = Category, NoDrop = true, Offset = 1 } )
- list.Set( "NPC", "npc_antlionguardian", { Name = "Antlion Guardian", Class = "npc_antlionguard", Category = Category, KeyValues = { cavernbreed = 1, incavern = 1 }, Material = "Models/antlion_guard/antlionGuard2" } )
+game.AddParticles( "particles/striderbuster.pcf" )
+
+list.Set( "SpawnableEntities", "weapon_striderbuster", {
+ -- Required information
+ PrintName = "Magnusson",
+ ClassName = "weapon_striderbuster",
+ Category = Category,
+
+ -- Optional information
+ NormalOffset = 32,
+ DropToFloor = true,
+ Author = "VALVe",
+ Information = "The strider bustin' Magnusson Device from HL2: Episode 2"
+} )
-Category = "Combine"
- list.Set( "NPC", "npc_hunter", { Name = "Hunter", Class = "npc_hunter", Category = Category } )
-
-
--
-- Vehicles
--
list.Set( "Vehicles", "Jalopy", {
- -- Required information
- Name = "Jalopy",
- Class = "prop_vehicle_jeep",
- Category = "Half-Life 2",
-
- -- Optional information
- Author = "VALVe",
- Information = "The muscle car from Episode 2",
- Model = "models/vehicle.mdl",
+ -- Required information
+ Name = "Jalopy",
+ Class = "prop_vehicle_jeep",
+ Category = Category,
+
+ -- Optional information
+ Author = "VALVe",
+ Information = "The muscle car from Episode 2",
+ Model = "models/vehicle.mdl",
- KeyValues = {
- vehiclescript = "scripts/vehicles/jalopy.txt"
- }
- } )
+ KeyValues = {
+ vehiclescript = "scripts/vehicles/jalopy.txt"
+ }
+} )
@@ -4,14 +4,14 @@ local Category = ""
local function ADD_ITEM( name, class )
- list.Set( "SpawnableEntities", class, { PrintName = name, ClassName = class, Category = Category, NormalOffset = 32, DropToFloor = true, Author = "VALVe", AdminOnly = false } )
+ list.Set( "SpawnableEntities", class, { PrintName = name, ClassName = class, Category = Category, NormalOffset = 32, DropToFloor = true, Author = "VALVe" } )
duplicator.Allow( class )
end
local function ADD_WEAPON( name, class )
- list.Set( "Weapon", class, { ClassName = class, PrintName = name, Category = Category, AdminOnly = false, Spawnable = true } )
+ list.Set( "Weapon", class, { ClassName = class, PrintName = name, Category = Category, Author = "VALVe", Spawnable = true } )
duplicator.Allow( class )
end
@@ -29,7 +29,6 @@ ADD_ITEM( "Crossbow Bolts", "item_ammo_crossbow" )
ADD_ITEM( "SMG Grenade", "item_ammo_smg1_grenade" )
ADD_ITEM( "RPG", "item_rpg_round" )
-
-- Items
ADD_ITEM( "Suit Battery", "item_battery" )
ADD_ITEM( "Health Vial", "item_healthvial" )
@@ -38,33 +37,26 @@ ADD_ITEM( "Suit Charger", "item_suitcharger" )
ADD_ITEM( "Health Charger", "item_healthcharger" )
ADD_ITEM( "Suit", "item_suit" )
--- Weapons
-ADD_ITEM( "Helicopter Grenade", "grenade_helicopter" )
---ADD_WEAPON( "Zombine Grenade", "npc_grenade_frag" )
+ADD_ITEM( "Thumper", "prop_thumper" )
ADD_ITEM( "Combine Mine", "combine_mine" )
+ADD_ITEM( "Helicopter Grenade", "grenade_helicopter" )
+ADD_ITEM( "Zombine Grenade", "npc_grenade_frag" )
+
+-- Weapons
ADD_WEAPON( "357", "weapon_357" )
-ADD_WEAPON( "Annabelle", "weapon_annabelle" )
+ADD_WEAPON( "Annabelle", "weapon_annabelle" )
ADD_WEAPON( "AR2", "weapon_ar2" )
ADD_WEAPON( "Bug Bait", "weapon_bugbait" )
ADD_WEAPON( "Crossbow", "weapon_crossbow" )
ADD_WEAPON( "Crowbar", "weapon_crowbar" )
---ADD_WEAPON( "Physcannon", "weapon_physcannon" )
+ADD_WEAPON( "Gravity Gun", "weapon_physcannon" )
ADD_WEAPON( "Frag Grenade", "weapon_frag" )
---ADD_WEAPON( "Physgun", "weapon_physgun" )
-ADD_WEAPON( "Pistol", "weapon_pistol" )
+ADD_WEAPON( "Pistol", "weapon_pistol" )
ADD_WEAPON( "RPG Launcher", "weapon_rpg" )
ADD_WEAPON( "Shotgun", "weapon_shotgun" )
ADD_WEAPON( "SLAM", "weapon_slam" )
ADD_WEAPON( "SMG", "weapon_smg1" )
-ADD_WEAPON( "Stunstick", "weapon_stunstick" )
-
-list.Set("SpawnableEntities", "prop_thumper",
-{
- PrintName = "Thumper",
- ClassName = "prop_thumper",
- Category = Category,
- DropToFloor = true,
- Author = "VALVe",
- AdminOnly = false
-})
+ADD_WEAPON( "Stunstick", "weapon_stunstick" )
+Category = "Other"
+ADD_WEAPON( "Physics Gun", "weapon_physgun" )
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -307,6 +307,8 @@ effecttype.waterexplosion=Water Surface Explosion
effecttype.watersplash=Water Splash
effecttype.dirtywatersplash=Dirty Water Splash
effecttype.glassimpact=Glass Impact
+effecttype.bloodimpact=Blood Impact
+effecttype.muzzleeffect=Muzzle Flash
tool.faceposer.name=Face Poser
tool.faceposer.desc=Alter the expressions of NPCs and Ragdolls
Oops, something went wrong.

2 comments on commit 9ff1adc

@ajloveslily14

What exactly does "Zombine Grenade" do?

@robotboy655
Collaborator

Spawns a zombine grenade? You can pick it up and throw and it'll explode.

Please sign in to comment.