Code Monkey home page Code Monkey logo

laserstool's Issues

Remove the additional overhead caused by `mtBeam:IsMemory(index, pos)`

Have to check on what conditions bent is actually needed

--[[
 * Checks for memory refraction start-refract
 * from the last medium stored in memory and
 * ignores the beam start entity. Checks when
 * the given position is inside the beam source
]]
function mtBeam:IsMemory(index, pos)
  local sent = self.BmSource
  local vmin = sent:OBBMins()
  local vmax = sent:OBBMaxs()
  local vpos = sent:WorldToLocal(pos)
  local bent = vpos:WithinAABox(vmax, vmin)
  return ((index ~= self.TrMedium.M[1][1]) and not bent)
end

Contribution Guidelines

About your contribution guidelines

Use two spaces instead of one tab for indentation
All new files must be lower case for linux support
Line endings must always be unix complaint LF
Trim the tailing space before you save

Just use a .editorconfig

root = true

[*]
end_of_line = lf
insert_final_newline = true


[*.{lua,md}]
charset = utf-8
indent_style = space

[*lua]
indent_size = 2

[*.md]
indent_size = 4

And since when does Linux require lower case filenames??

Dupe and paste a laser emiter rises lua error

Reporter: https://steamcommunity.com/id/havocking92
Gmod branch: x86-64

  1. Install Laser tool from repo or workshop
  2. Install Advanced Dupicator 2
  3. Install Henry's animation tool
  4. Copy and paste a gmod_laser with AdvDupe2
  5. See the error is reproduced below:
[AdvDupe2NotifyPaste]	 Player: [Sk$Bh]Trick or treat KID! Pasted, 1 Entities and 0 Constraints.
[AdvDupe2Notify]	Pasting...
addons/laserstool/lua/entities/gmod_laser/shared.lua:305: attempt to perform arithmetic on local 'm' (a table value)[AdvDupe2Notify]	Finished Pasting!

[laserstool] addons/laserstool/lua/entities/gmod_laser/shared.lua:244: bad argument #1 to 'EmitSound' (string expected, got nil)
  1. EmitSound - [C]:-1
   2. DoSound - addons/laserstool/lua/entities/gmod_laser/shared.lua:244
    3. GetOn - addons/laserstool/lua/entities/gmod_laser/shared.lua:266
     4. unknown - addons/laserstool/lua/entities/gmod_laser/init.lua:145

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.