GithubHelp home page GithubHelp logo

xplanemp2's People

Contributors

airac avatar bsupnik avatar frungy2 avatar kuroneko avatar oktal3700 avatar wadesworld2112 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

xplanemp2's Issues

Missing Include in Obj8InstanceData.h

I get an error of the missing Obj8CSL class/variable in Obj8InstanceData.h which is solved by adding:

#include "Obj8CSL.h"

In Obj8InstanceData.h.

Just my problem or a general problem?
Reto

Compile error on Mac

xplanemp2/src/CSLLibrary.cpp:50:10: fatal error: 'AplFSUtil.h' file not found

Need a Multiplayer Mutex handover Protocol

Need to implement some logic to do gentle/soft handover of the Multiplayer Mutex.

Recommended strategy:

Register the shared dataref xplanemp/want_planes as an int.

Acquiring Planes:

  • write our PluginID to the shared dataref xplanemp/want_planes
  • Try to get the XPLMAcquirePlanes with a registered callback for late acquisition.
  • if the aquisition was successful:
    • complete the setup steps that require the plane mutex (tcas callbacks, etc)

Releasing Planes:

  • get the value of xplanemp/want_planes
  • disable our XPMP Planes dependent callbacks
  • XPLMReleasePlanes
  • if the value of the dataref is our plugin ID:
    • set the dataref to 0 (or -1 if 0 is a valid plugin ID)

deferred aquisition callback:

  • Get the value of xplanemp/want_planes
  • if the value of the dataref is our plugin_id:
    • make an XPLMAcquirePlanes call
    • complete the setup steps for the plane mutex

shared dataref update callback:

  • Get the value of xplanemp/want_planes
  • if the value of the dataref is NOT our plugin_id and not 0 (or -1 per above) and we have the mutex:
    • disable our XPMP Planes dependent callbacks
    • XPLMReleasePlanes

This approach should allow multiple xplanemp consumers to hand off the plane mutex to the most recently invoked tool, rather than holding onto it. For plugins that want to voluntarily take the lowest precedence and not have explicit enable steps, they can monitor for the 0/-1 value in xplanemp/want_planes and use that as a cue to take ownership.

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.