Mortar Shell entity
Entity defined in entities/entities/combine_mortar_shell.lua
Defines the combine_mortar_shell entity (print name Mortar Shell), a shell that falls straight down trailing smoke
and explodes on impact.
Its spawn function places it just under the ceiling or skybox above the aimed position. On the server it moves down
every tick and, once a hull trace below it hits something, creates an env_explosion with magnitude 200 and radius
460, shakes nearby screens and removes itself. On the client it draws glowing sprites on its tail.
Summary
Methods
Methods
Draws the shell model.
ENT:DrawTranslucent()
client gamemodes/cwhl2rp/schema/entities/entities/combine_mortar_shell.lua:113Draws the glowing sprites on the shell's tail while it is visible.
Explodes the shell and shakes the screens of nearby players once a hull trace below it hits something.
Hits on sammyservers_textscreen entities are ignored. The shell removes itself after exploding.
Shared
Sets up the shell model, flight movement and smoke trail on the server.
On the client
Creates the pixel visibility handle used by ENT:DrawTranslucent.
Defined in
Removes the shell's smoke trail.
ENT:SpawnFunction(ply, trace)
server gamemodes/cwhl2rp/schema/entities/entities/combine_mortar_shell.lua:48Spawns a shell high above the aimed position, just under the ceiling or skybox.
Parameters
- ply
- trace
Returns
- Entity The spawned shell
Moves the shell downwards and checks for impact every tick on the server.
Returns
- Boolean Always
trueto keep thinking every frame