Skip to content
Snippets Groups Projects

Expose P_ButteredSlope to lua

Merged Nami i requested to merge namiishere/SRB2:buttered-lua into next

not much else to say here

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Contributor

    Looking at the code for P_ButteredSlope, it seems possible and quite easy to port this to Lua.

    That may be a better solution than waiting for 2.2.9 or even 2.2.10 to release with P_ButteredSlope exposure..

  • Contributor

    P_ButteredSlope is portable to Lua, yeah, but I don't think that's a good reason against exposing it; there are plenty of functions already exposed to Lua that could have been ported manually. I don't think it's a stretch to say that most of SRB2's scripting community isn't prepared to dig through the source code, much less figure out the specifics of how to translate C to Lua. Abstracting a function through exposure makes life easier for scripters, and also improves forward-compatibility if the implementation of a function like P_ButteredSlope is changed in the future.

    If the function had a very niche usecase, I could see the case against it, but it's not at all out of the question that a scripter would want to create an object that slides down slopes the same way some hardcoded objects do - I've had to port this exact function to Lua myself in the past, so I'm speaking from experience here.

  • Nami i added 99 commits

    added 99 commits

    Compare with previous version

  • sphere added Lua label

    added Lua label

  • merged

  • Nev3r mentioned in commit de0a9172

    mentioned in commit de0a9172

  • Nev3r changed milestone to %2.2.10

    changed milestone to %2.2.10

Please register or sign in to reply
Loading