Skip to content
Snippets Groups Projects
Select Git revision
  • prefabs
  • macros
  • next default protected
  • fix-binary-mtag
  • binary-multitagging
  • final-hours
  • lua-minmax-plus-bruh-moments
  • release-candidate
  • load-netgame-error-fixes
  • unix-rdynamic
  • easings
  • ksf-wadfiles
  • raise-skin-limit
  • software-slope-plane-uv-fix-attempt
  • more-slope-copying
  • pantelegraph
  • master
  • prerelease
  • prerelease-serious
  • test-next
  • SRB2_release_2.2.8
  • SRB2_release_2.2.7
  • SRB2_release_2.2.6
  • SRB2_release_2.2.5
  • SRB2_release_2.2.4
  • SRB2_release_2.2.3
  • SRB2_release_2.2.2
  • SRB2_release_2.2.1
  • SRB2_release_2.2.0
  • SRB2_release_2.1.25
  • SRB2_release_2.1.24
  • SRB2_release_2.1.23
  • SRB2_release_2.1.22
  • SRB2_release_2.1.21
  • SRB2_release_2.1.20
  • SRB2_release_2.1.19
  • SRB2_release_2.1.18
  • td-release-v1.0.0
  • SRB2_release_2.1.17
  • SRB2_release_2.1.16a
40 results

lua_maplib.c

Blame
  • Forked from STJr / SRB2
    9642 commits behind the upstream repository.
    Monster Iestyn's avatar
    Monster Iestyn authored
    Write a new hack for getting sector->linecount from sector->lines in Lua, to put my mind at rest about it at last.
    
    1) In sector_get, actually push the memory address of the lines array within sector_t, rather than push the value of "lines" itself (essentially, we we want a pointer to a double pointer, or rather a TRIPLE pointer haha)
    2) In the sectorlines_* functions, use offsetof to shift the memory address so we can obtain the value of linecount within the sector_t struct, and dereference the result to obtain the value of linecount itself
    3) ??? profit
    
    Untested and uncompiled atm, but I have some confidence this might work
    75ee3193
    History
    lua_maplib.c 51.69 KiB