mirror of
				https://github.com/chev2/gmod-addons.git
				synced 2025-10-30 06:31:35 +00:00 
			
		
		
		
	- Split entity code Lua files by realm (server, client, shared) - Use $pp_colour_inv for color inversion - Remove pp/texturize/invert.png as we now use $pp_colour_inv in its place - Fixed an issue where hitting the ball perpendicular to an axis it's locked to would massively slow the ball down - Fixed a bug where ball damage events may have accidentally been applied twice - Use util.AddNetworkString in entity Lua file initialization instead of every time an instance of the entity is initialized - Use better hook initialization and removal (ent identifier which uses IsValid check) - Color invert now only applies to players within the entity's PVS instead of all players on the server - Added some additional IsValid checks to prevent errors - Add small screen shake effect whenever the ball collides with a wall - Hitting the ball now 'locks' the player (freezes them & gives them temporary godmode) until the ball is unfrozen
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
| DEFINE_BASECLASS("base_anim")
 | |
| 
 | |
| ENT.PrintName = "Lethal League Baseball"
 | |
| ENT.Author = "Lua coding & model port: Chev\nBaseball model: Team Reptile"
 | |
| ENT.Purpose = "The baseball from LL/LLB. Hit it to make it go faster!"
 | |
| ENT.Category = "Lethal League"
 | |
| 
 | |
| ENT.AutomaticFrameAdvance = true
 | |
| ENT.Editable = true
 | |
| ENT.Spawnable = true
 | |
| ENT.AdminOnly = false
 | |
| ENT.RenderGroup = RENDERGROUP_OPAQUE
 | |
| 
 | |
| ENT.BounceSound = Sound("llb/wall_bounce.ogg")
 | |
| ENT.HitSound = Sound("llb/medium_hit.ogg")
 | |
| ENT.StrongHitSound = Sound("llb/strong_hit.ogg")
 | |
| ENT.KnockoutSound = Sound("llb/knockout.ogg")
 | |
| 
 | |
| ENT.BallOwner = nil
 | |
| 
 | |
| function ENT:SetupDataTables()
 | |
|     self:NetworkVar("Bool", 0, "LockXAxis", {KeyName = "lockx", Edit = {type = "Boolean", order = 1}})
 | |
|     self:NetworkVar("Bool", 1, "LockYAxis", {KeyName = "locky", Edit = {type = "Boolean", order = 2}})
 | |
|     self:NetworkVar("Bool", 2, "LockZAxis", {KeyName = "lockz", Edit = {type = "Boolean", order = 3}})
 | |
|     self:NetworkVar("Bool", 3, "DamagePlayers", {KeyName = "dmgply", Edit = {type = "Boolean", order = 4}})
 | |
| end
 |