Results 1 to 2 of 2

Thread: How to make sense of the source code

  1. Registered TeamPlayer
    Join Date
    10-29-07
    Posts
    4,953
    Post Thanks / Like
    Stat Links

    How to make sense of the source code
    #1

    How to make sense of the source code

    For any lonestar release, the source code will be in a zip file located at
    lonestar-<version>/addons/lonestar/lonestar.src.zip

    The mod is composed of two logical parts;
    1) The C++ metamod plugin that bridges the Valve engine to the python code
    2) The python code that actually implements most of the mod

    The HL2 engine does not understand or know what to do with python code. HL2 mods are normally C++. Our C++ code embeds a python interpreter, and bridges the HL2 engine to python so we can write our real mod logic in python.

    The "src" directory contains the code for the bridge.
    The "lib" directory contains all of the python files. Python files that ship with python that we depend on are directly in the "lib" directory. Our lonestar mod files are in the "lib/lonestar" directory.

    The C++ bridge expects to find various "plugin_*" hooks inside of the "lonestar" python module, which are used as callbacks to handle various HL2 events.

    Additionally, when the python code needs to call functions on the HL2 engine, it can't do so directly and has to use the bridge as an intermediary. The C++ bridge implements a "hl2sdk" python module in C, which is used to allow the python code to call the hl2sdk functions, which in turn will call the real HL2 engine functions.

    To understand how the mod features work, read the code

  2. shcdi4Ggong
    Guest
    #2

    RBL Checker Match - shcdi4Ggong from 121.207.162.127

    ALERT!

    Someone has tried to register using the IP Address 121.207.162.127 which is MATCHED IN THE RBL DATABASE of the proxies.dnsbl.sorbs.net RBL.

    This registration attempt has been allowed and the account has been permanently banned.

    Registration Details: shcdi4Ggong ( sunglassestom@gmail.com )

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Title